diff options
| author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-14 00:10:22 +0000 |
|---|---|---|
| committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-08-14 00:10:22 +0000 |
| commit | 6069e787991de587979306af768738945046ff94 (patch) | |
| tree | 804f826eb7af0132b5305fa492097c0726d8db48 | |
| parent | 63cd2b169354de68ab878b53a043d5b9efa75183 (diff) | |
| download | instadisc-6069e787991de587979306af768738945046ff94.tar.gz instadisc-6069e787991de587979306af768738945046ff94.tar.bz2 instadisc-6069e787991de587979306af768738945046ff94.zip | |
Client: Added Java Web Start support
This has been discovered to be a much better way of Java distributation. Because of this, the loader script is no longer necessary.
| -rw-r--r-- | client/trunk/master.jnlp | 24 | ||||
| -rw-r--r-- | client/trunk/nbproject/build-impl.xml | 3 | ||||
| -rw-r--r-- | client/trunk/nbproject/configs/JWS_generated.properties | 4 | ||||
| -rw-r--r-- | client/trunk/nbproject/genfiles.properties | 6 | ||||
| -rw-r--r-- | client/trunk/nbproject/jnlp-impl.xml | 456 | ||||
| -rw-r--r-- | client/trunk/nbproject/project.properties | 20 | ||||
| -rw-r--r-- | client/trunk/nbproject/project.xml | 5 | ||||
| -rwxr-xr-x | client/trunk/packaging/instadisc | 20 |
8 files changed, 501 insertions, 37 deletions
| diff --git a/client/trunk/master.jnlp b/client/trunk/master.jnlp new file mode 100644 index 0000000..5f43198 --- /dev/null +++ b/client/trunk/master.jnlp | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <jnlp spec="1.0+" codebase="${jnlp.codebase}" href="launch.jnlp"> | ||
| 3 | <information> | ||
| 4 | <title>${APPLICATION.TITLE}</title> | ||
| 5 | <vendor>${APPLICATION.VENDOR}</vendor> | ||
| 6 | <description>${APPLICATION.DESC}</description> | ||
| 7 | <description kind="short">${APPLICATION.DESC.SHORT}</description> | ||
| 8 | <homepage href="${APPLICATION.HOMEPAGE}"/> | ||
| 9 | <!--${JNLP.ICONS}--> | ||
| 10 | <!--${JNLP.OFFLINE.ALLOWED}--> | ||
| 11 | </information> | ||
| 12 | <!--${JNLP.SECURITY}--> | ||
| 13 | <resources> | ||
| 14 | <!--${JNLP.RESOURCES.RUNTIME}--> | ||
| 15 | <!--${JNLP.RESOURCES.MAIN.JAR}--> | ||
| 16 | <!--${JNLP.RESOURCES.JARS}--> | ||
| 17 | </resources> | ||
| 18 | <security> | ||
| 19 | <all-permissions/> | ||
| 20 | </security> | ||
| 21 | <application-desc main-class="${jnlp.main.class}"> | ||
| 22 | <!--${JNLP.APPLICATION.ARGS}--> | ||
| 23 | </application-desc> | ||
| 24 | </jnlp> | ||
| diff --git a/client/trunk/nbproject/build-impl.xml b/client/trunk/nbproject/build-impl.xml index 3d947ad..a01a488 100644 --- a/client/trunk/nbproject/build-impl.xml +++ b/client/trunk/nbproject/build-impl.xml | |||
| @@ -20,6 +20,7 @@ is divided into following sections: | |||
| 20 | 20 | ||
| 21 | --> | 21 | --> |
| 22 | <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="InstaDisc-impl"> | 22 | <project xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1" xmlns:j2seproject2="http://www.netbeans.org/ns/j2se-project/2" xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:jaxrpc="http://www.netbeans.org/ns/j2se-project/jax-rpc" basedir=".." default="default" name="InstaDisc-impl"> |
| 23 | <import file="jnlp-impl.xml"/> | ||
| 23 | <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> | 24 | <target depends="test,jar,javadoc" description="Build and test whole project." name="default"/> |
| 24 | <!-- | 25 | <!-- |
| 25 | ====================== | 26 | ====================== |
| @@ -407,7 +408,7 @@ is divided into following sections: | |||
| 407 | <!-- Empty placeholder for easier customization. --> | 408 | <!-- Empty placeholder for easier customization. --> |
| 408 | <!-- You can override this target in the ../build.xml file. --> | 409 | <!-- You can override this target in the ../build.xml file. --> |
| 409 | </target> | 410 | </target> |
| 410 | <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar" description="Build JAR." name="jar"/> | 411 | <target depends="init,compile,-pre-jar,-do-jar-with-manifest,-do-jar-without-manifest,-do-jar-with-mainclass,-do-jar-with-libraries,-post-jar,jnlp" description="Build JAR." name="jar"/> |
| 411 | <!-- | 412 | <!-- |
| 412 | ================= | 413 | ================= |
| 413 | EXECUTION SECTION | 414 | EXECUTION SECTION |
| diff --git a/client/trunk/nbproject/configs/JWS_generated.properties b/client/trunk/nbproject/configs/JWS_generated.properties new file mode 100644 index 0000000..469ea7c --- /dev/null +++ b/client/trunk/nbproject/configs/JWS_generated.properties | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #Wed Aug 13 13:04:12 EDT 2008 | ||
| 2 | $label=Web Start | ||
| 3 | $target.debug=jws-debug | ||
| 4 | $target.run=jws-run | ||
| diff --git a/client/trunk/nbproject/genfiles.properties b/client/trunk/nbproject/genfiles.properties index 2f0f521..412c8d2 100644 --- a/client/trunk/nbproject/genfiles.properties +++ b/client/trunk/nbproject/genfiles.properties | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | build.xml.data.CRC32=cc16f453 | 1 | build.xml.data.CRC32=065660f1 |
| 2 | build.xml.script.CRC32=9d2b0f7e | 2 | build.xml.script.CRC32=9d2b0f7e |
| 3 | build.xml.stylesheet.CRC32=be360661 | 3 | build.xml.stylesheet.CRC32=be360661 |
| 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. | 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. |
| 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. | 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. |
| 6 | nbproject/build-impl.xml.data.CRC32=cc16f453 | 6 | nbproject/build-impl.xml.data.CRC32=065660f1 |
| 7 | nbproject/build-impl.xml.script.CRC32=477290b4 | 7 | nbproject/build-impl.xml.script.CRC32=173512fe |
| 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 | 8 | nbproject/build-impl.xml.stylesheet.CRC32=f1d9da08 |
| diff --git a/client/trunk/nbproject/jnlp-impl.xml b/client/trunk/nbproject/jnlp-impl.xml new file mode 100644 index 0000000..92eb364 --- /dev/null +++ b/client/trunk/nbproject/jnlp-impl.xml | |||
| @@ -0,0 +1,456 @@ | |||
| 1 | <?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | <!-- | ||
| 3 | DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. | ||
| 4 | |||
| 5 | Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. | ||
| 6 | |||
| 7 | |||
| 8 | The contents of this file are subject to the terms of either the GNU | ||
| 9 | General Public License Version 2 only ("GPL") or the Common | ||
| 10 | Development and Distribution License("CDDL") (collectively, the | ||
| 11 | "License"). You may not use this file except in compliance with the | ||
| 12 | License. You can obtain a copy of the License at | ||
| 13 | http://www.netbeans.org/cddl-gplv2.html | ||
| 14 | or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the | ||
| 15 | specific language governing permissions and limitations under the | ||
| 16 | License. When distributing the software, include this License Header | ||
| 17 | Notice in each file and include the License file at | ||
| 18 | nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this | ||
| 19 | particular file as subject to the "Classpath" exception as provided | ||
| 20 | by Sun in the GPL Version 2 section of the License file that | ||
| 21 | accompanied this code. If applicable, add the following below the | ||
| 22 | License Header, with the fields enclosed by brackets [] replaced by | ||
| 23 | your own identifying information: | ||
| 24 | "Portions Copyrighted [year] [name of copyright owner]" | ||
| 25 | |||
| 26 | Contributor(s): | ||
| 27 | |||
| 28 | The Original Software is NetBeans. The Initial Developer of the Original | ||
| 29 | Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun | ||
| 30 | Microsystems, Inc. All Rights Reserved. | ||
| 31 | |||
| 32 | If you wish your version of this file to be governed by only the CDDL | ||
| 33 | or only the GPL Version 2, indicate your decision by adding | ||
| 34 | "[Contributor] elects to include this software in this distribution | ||
| 35 | under the [CDDL or GPL Version 2] license." If you do not indicate a | ||
| 36 | single choice of license, a recipient has the option to distribute | ||
| 37 | your version of this file under either the CDDL, the GPL Version 2 or | ||
| 38 | to extend the choice of license to its licensees as provided above. | ||
| 39 | However, if you add GPL Version 2 code and therefore, elected the GPL | ||
| 40 | Version 2 license, then the option applies only if the new code is | ||
| 41 | made subject to such option by the copyright holder. | ||
| 42 | --> | ||
| 43 | |||
| 44 | <project name="jnlp-impl" default="default" basedir=".."> | ||
| 45 | |||
| 46 | <property name="master.jnlp.file" location="master.jnlp"/> | ||
| 47 | <property name="launch.jnlp.file" value="launch.jnlp"/> | ||
| 48 | <property name="jnlp.dest.dir" location="dist"/> | ||
| 49 | |||
| 50 | <!-- helper file to create list of arguments, etc. --> | ||
| 51 | <property name="helper.file" location="helper.txt"/> | ||
| 52 | |||
| 53 | <target name="default"> | ||
| 54 | <echo message="Default target is not set."/> | ||
| 55 | </target> | ||
| 56 | |||
| 57 | <!-- Main target --> | ||
| 58 | |||
| 59 | <target name="jnlp" depends="-init-check,-test-jnlp-enabled" if="is.jnlp.enabled"> | ||
| 60 | <delete file="dist/lib/javaws.jar" failonerror="false"/> | ||
| 61 | <antcall target="generate-jnlp"/> | ||
| 62 | </target> | ||
| 63 | |||
| 64 | <!-- Generate master --> | ||
| 65 | |||
| 66 | <target name="-check-for-master.jnlp"> | ||
| 67 | <available file="${master.jnlp.file}" property="master.jnlp.exists"/> | ||
| 68 | </target> | ||
| 69 | <target name="jnlp-init-generate-master" depends="-check-for-master.jnlp" unless="master.jnlp.exists"> | ||
| 70 | <echo file="${master.jnlp.file}" encoding="UTF-8"><![CDATA[<?xml version="1.0" encoding="UTF-8"?> | ||
| 71 | <jnlp spec="1.0+" codebase="$${jnlp.codebase}" href="launch.jnlp"> | ||
| 72 | <information> | ||
| 73 | <title>$${APPLICATION.TITLE}</title> | ||
| 74 | <vendor>$${APPLICATION.VENDOR}</vendor> | ||
| 75 | <description>$${APPLICATION.DESC}</description> | ||
| 76 | <description kind="short">$${APPLICATION.DESC.SHORT}</description> | ||
| 77 | <homepage href="$${APPLICATION.HOMEPAGE}"/> | ||
| 78 | <!--$${JNLP.ICONS}--> | ||
| 79 | <!--$${JNLP.OFFLINE.ALLOWED}--> | ||
| 80 | </information> | ||
| 81 | <!--$${JNLP.SECURITY}--> | ||
| 82 | <resources> | ||
| 83 | <!--$${JNLP.RESOURCES.RUNTIME}--> | ||
| 84 | <!--$${JNLP.RESOURCES.MAIN.JAR}--> | ||
| 85 | <!--$${JNLP.RESOURCES.JARS}--> | ||
| 86 | </resources> | ||
| 87 | <security> | ||
| 88 | <all-permissions/> | ||
| 89 | </security> | ||
| 90 | <application-desc main-class="$${jnlp.main.class}"> | ||
| 91 | <!--$${JNLP.APPLICATION.ARGS}--> | ||
| 92 | </application-desc> | ||
| 93 | </jnlp> | ||
| 94 | ]]></echo> | ||
| 95 | </target> | ||
| 96 | |||
| 97 | <!-- Initial check --> | ||
| 98 | |||
| 99 | <target name="-init-check"> | ||
| 100 | <fail unless="application.title" message="Must set application title."/> | ||
| 101 | <fail unless="application.vendor" message="Must set application vendor."/> | ||
| 102 | </target> | ||
| 103 | |||
| 104 | <!-- Icons --> | ||
| 105 | |||
| 106 | <target name="-init-icons" depends="-preinit-icons,-set-icon-elem,-set-splash-elem"> | ||
| 107 | <property name="jnlp.icon.elem" value=""/> | ||
| 108 | <property name="application.splash.elem" value=""/> | ||
| 109 | <property name="icon.separator" value=""/> | ||
| 110 | <property name="jnlp.icons.value" value="${jnlp.icon.elem}${icon.separator}${application.splash.elem}"/> | ||
| 111 | </target> | ||
| 112 | <target name="-preinit-icons" depends="-copy-app-icon,-copy-app-splash"/> | ||
| 113 | <target name="-copy-app-icon" if="jnlp.icon" depends="-get-app-icon-name"> | ||
| 114 | <copy file="${jnlp.icon}" todir="${jnlp.dest.dir}" failonerror="false"/> | ||
| 115 | <available file="${jnlp.dest.dir}${file.separator}${jnlp.icon.name}" property="jnlp.icon.copied"/> | ||
| 116 | </target> | ||
| 117 | <target name="-copy-app-splash" if="application.splash" depends="-get-app-splash-name"> | ||
| 118 | <copy file="${application.splash}" todir="${jnlp.dest.dir}" failonerror="false"/> | ||
| 119 | <available file="${jnlp.dest.dir}${file.separator}${application.splash.name}" property="application.splash.copied"/> | ||
| 120 | </target> | ||
| 121 | <target name="-get-app-icon-name" if="jnlp.icon"> | ||
| 122 | <dirname file="${jnlp.icon}" property="jnlp.icon.basedir"/> | ||
| 123 | <pathconvert property="jnlp.icon.name" setonempty="false"> | ||
| 124 | <path location="${jnlp.icon}"/> | ||
| 125 | <map from="${jnlp.icon.basedir}${file.separator}" to=""/> | ||
| 126 | </pathconvert> | ||
| 127 | </target> | ||
| 128 | <target name="-get-app-splash-name" if="application.splash"> | ||
| 129 | <dirname file="${application.splash}" property="application.splash.basedir"/> | ||
| 130 | <pathconvert property="application.splash.name" setonempty="false"> | ||
| 131 | <path location="${application.splash}"/> | ||
| 132 | <map from="${application.splash.basedir}${file.separator}" to=""/> | ||
| 133 | </pathconvert> | ||
| 134 | </target> | ||
| 135 | <target name="-set-icon-elem" if="jnlp.icon.copied"> | ||
| 136 | <property name="jnlp.icon.elem" value=' <icon href="${jnlp.icon.name}" kind="default"/>'/> | ||
| 137 | </target> | ||
| 138 | <target name="-set-splash-elem" if="application.splash.copied" depends="-set-icon-elem"> | ||
| 139 | <property name="application.splash.elem" value=' <icon href="${application.splash.name}" kind="splash"/>'/> | ||
| 140 | <condition property="icon.separator" value="${line.separator}"> | ||
| 141 | <isset property="jnlp.icon.elem"/> | ||
| 142 | </condition> | ||
| 143 | </target> | ||
| 144 | |||
| 145 | <!-- Offline-Allowed --> | ||
| 146 | |||
| 147 | <target name="-init-offline" if="offline.allowed.set" depends="-preinit-offline"> | ||
| 148 | <property name="jnlp.offline.allowed.value" value=" <offline-allowed/>"/> | ||
| 149 | </target> | ||
| 150 | <target name="-preinit-offline"> | ||
| 151 | <condition property="offline.allowed.set"> | ||
| 152 | <equals arg1="${jnlp.offline-allowed}" arg2="true" trim="true"/> | ||
| 153 | </condition> | ||
| 154 | </target> | ||
| 155 | |||
| 156 | <!-- Descriptions --> | ||
| 157 | |||
| 158 | <target name="-init-descriptions" depends="-descriptions-props-check,-init-desc-value,-init-desc-value-short"> | ||
| 159 | <property name="application.desc.value" value="${application.title}"/> | ||
| 160 | <property name="application.desc.short.value" value="${application.title}"/> | ||
| 161 | </target> | ||
| 162 | <target name="-descriptions-props-check"> | ||
| 163 | <condition property="application.desc.set"> | ||
| 164 | <and> | ||
| 165 | <isset property="application.desc"/> | ||
| 166 | <not> | ||
| 167 | <equals arg1="${application.desc}" arg2="" trim="true"/> | ||
| 168 | </not> | ||
| 169 | </and> | ||
| 170 | </condition> | ||
| 171 | <condition property="application.desc.short.set"> | ||
| 172 | <and> | ||
| 173 | <isset property="application.desc.short"/> | ||
| 174 | <not> | ||
| 175 | <equals arg1="${application.desc.short}" arg2="" trim="true"/> | ||
| 176 | </not> | ||
| 177 | </and> | ||
| 178 | </condition> | ||
| 179 | </target> | ||
| 180 | <target name="-init-desc-value" if="application.desc.set"> | ||
| 181 | <property name="application.desc.value" value="${application.desc}"/> | ||
| 182 | </target> | ||
| 183 | <target name="-init-desc-value-short" if="application.desc.short.set"> | ||
| 184 | <property name="application.desc.short.value" value="${application.desc.short}"/> | ||
| 185 | </target> | ||
| 186 | |||
| 187 | <!-- Security --> | ||
| 188 | |||
| 189 | <target name="-init-security" depends="-check-signing-possible" if="jnlp.signed.true+signjarstask.available"> | ||
| 190 | <property name="jnlp.security" value=" <security>${line.separator} <all-permissions/>${line.separator} </security>"/> | ||
| 191 | </target> | ||
| 192 | <target name="-security-props-check"> | ||
| 193 | <condition property="jnlp.signed.true"> | ||
| 194 | <istrue value="${jnlp.signed}"/> | ||
| 195 | </condition> | ||
| 196 | </target> | ||
| 197 | <target name="-jnlp-init-keystore" depends="-jnlp-init-keystore-props,-check-keystore-exists" unless="jnlp.signjar.keystore.exists"> | ||
| 198 | <echo message="${application.vendor}" file="${helper.file}"/> | ||
| 199 | <loadfile property="application.vendor.filtered" srcfile="${helper.file}"> | ||
| 200 | <filterchain> | ||
| 201 | <deletecharacters chars=","/> | ||
| 202 | </filterchain> | ||
| 203 | </loadfile> | ||
| 204 | <delete file="${helper.file}"/> | ||
| 205 | <property name="jnlp.signjar.vendor" value="CN=${application.vendor.filtered}"/> | ||
| 206 | <echo message="Going to create default keystore in ${jnlp.signjar.keystore}"/> | ||
| 207 | <genkey dname="${jnlp.signjar.vendor}" alias="${jnlp.signjar.alias}" keystore="${jnlp.signjar.keystore}" | ||
| 208 | storepass="${jnlp.signjar.storepass}" keypass="${jnlp.signjar.keypass}"/> | ||
| 209 | </target> | ||
| 210 | <target name="-check-keystore-exists"> | ||
| 211 | <available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}"/> | ||
| 212 | </target> | ||
| 213 | <target name="-jnlp-init-keystore-props"> | ||
| 214 | <property name="jnlp.signjar.keystore" value="${basedir}/build/nb-jws.ks"/> | ||
| 215 | <property name="jnlp.signjar.storepass" value="storepass"/> | ||
| 216 | <property name="jnlp.signjar.keypass" value="keypass"/> | ||
| 217 | <property name="jnlp.signjar.alias" value="nb-jws"/> | ||
| 218 | </target> | ||
| 219 | |||
| 220 | <!-- Generating JNLP file --> | ||
| 221 | |||
| 222 | <target name="generate-jnlp" depends="jnlp-init-generate-master,-init-codebase,-init-resources-runtime,-init-security,-init-resources-jars,-init-application-args,-init-icons,-init-offline,-init-descriptions,jnlp-init-notinited"> | ||
| 223 | <copy file="${master.jnlp.file}" tofile="${jnlp.dest.dir}/${launch.jnlp.file}__" overwrite="true" encoding="UTF-8"> | ||
| 224 | <filterchain> | ||
| 225 | <replacestring from="$${jnlp.codebase}" to="${jnlp.codebase.value}"/> | ||
| 226 | <replacestring from="<!--$${JNLP.ICONS}-->" to="${jnlp.icons.value}"/> | ||
| 227 | <replacestring from="<!--$${JNLP.SECURITY}-->" to="${jnlp.security}"/> | ||
| 228 | <replacestring from="<!--$${JNLP.OFFLINE.ALLOWED}-->" to="${jnlp.offline.allowed.value}"/> | ||
| 229 | <replacestring from="<!--$${JNLP.RESOURCES.RUNTIME}-->" to="${jnlp.resources.runtime.value}"/> | ||
| 230 | <replacestring from="<!--$${JNLP.RESOURCES.MAIN.JAR}-->" to="${jnlp.resources.main.jar.value}"/> | ||
| 231 | <replacestring from="<!--$${JNLP.RESOURCES.JARS}-->" to="${jnlp.resources.jars.value}"/> | ||
| 232 | <replacestring from="<!--$${JNLP.APPLICATION.ARGS}-->" to="${jnlp.application.args.value}"/> | ||
| 233 | <replacestring from="$${APPLICATION.TITLE}" to="${application.title}"/> | ||
| 234 | <replacestring from="$${APPLICATION.VENDOR}" to="${application.vendor}"/> | ||
| 235 | <replacestring from="$${APPLICATION.DESC}" to="${application.desc.value}"/> | ||
| 236 | <replacestring from="$${APPLICATION.DESC.SHORT}" to="${application.desc.short.value}"/> | ||
| 237 | <replacestring from="$${APPLICATION.HOMEPAGE}" to="${application.homepage}"/> | ||
| 238 | <replacestring from="$${jnlp.main.class}" to="${main.class}"/> | ||
| 239 | </filterchain> | ||
| 240 | </copy> | ||
| 241 | <antcall target="-strip-empty-lines"/> | ||
| 242 | <antcall target="-generate-html-page"/> | ||
| 243 | </target> | ||
| 244 | <target name="jnlp-init-notinited"> | ||
| 245 | <property name="jnlp.security" value=""/> | ||
| 246 | <property name="jnlp.offline.allowed.value" value=""/> | ||
| 247 | <property name="application.homepage" value=""/> | ||
| 248 | <property name="jnlp.application.args.value" value=""/> | ||
| 249 | </target> | ||
| 250 | <target name="-strip-empty-lines"> | ||
| 251 | <move file="${jnlp.dest.dir}/${launch.jnlp.file}__" tofile="${jnlp.dest.dir}/${launch.jnlp.file}" overwrite="true" encoding="UTF-8"> | ||
| 252 | <filterchain> | ||
| 253 | <linecontainsregexp> | ||
| 254 | <regexp pattern=".+"/> | ||
| 255 | </linecontainsregexp> | ||
| 256 | </filterchain> | ||
| 257 | </move> | ||
| 258 | </target> | ||
| 259 | |||
| 260 | <!-- Codebase processing --> | ||
| 261 | |||
| 262 | <target name="-init-codebase" depends="-codebase-props-check,-init-non-user-codebase,-init-user-codebase"/> | ||
| 263 | <target name="-codebase-props-check"> | ||
| 264 | <condition property="local.codebase"> | ||
| 265 | <or> | ||
| 266 | <not> | ||
| 267 | <isset property="jnlp.codebase.type"/> | ||
| 268 | </not> | ||
| 269 | <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/> | ||
| 270 | </or> | ||
| 271 | </condition> | ||
| 272 | <condition property="non.user.codebase"> | ||
| 273 | <or> | ||
| 274 | <not> | ||
| 275 | <isset property="jnlp.codebase.type"/> | ||
| 276 | </not> | ||
| 277 | <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/> | ||
| 278 | <equals arg1="${jnlp.codebase.type}" arg2="web" trim="true"/> | ||
| 279 | </or> | ||
| 280 | </condition> | ||
| 281 | <condition property="user.codebase"> | ||
| 282 | <equals arg1="${jnlp.codebase.type}" arg2="user" trim="true"/> | ||
| 283 | </condition> | ||
| 284 | </target> | ||
| 285 | <target name="-init-non-user-codebase" if="non.user.codebase"> | ||
| 286 | <property name="jnlp.codebase.value" value="${jnlp.codebase.url}"/> | ||
| 287 | </target> | ||
| 288 | <target name="-init-user-codebase" if="user.codebase"> | ||
| 289 | <property name="jnlp.codebase.value" value="${jnlp.codebase.user}"/> | ||
| 290 | </target> | ||
| 291 | |||
| 292 | <!-- j2se resources --> | ||
| 293 | |||
| 294 | <target name="-init-resources-runtime" depends="-init-runtime-props"> | ||
| 295 | <property name="run.jvmargs.value" value=""/> | ||
| 296 | <property name="initial-heap-size.value" value=""/> | ||
| 297 | <property name="max-heap-size.value" value=""/> | ||
| 298 | <property name="jnlp.resources.runtime.value" | ||
| 299 | value=' <j2se version="${javac.target}+"${initial-heap-size.value}${max-heap-size.value}${run.jvmargs.value}/>'/> | ||
| 300 | </target> | ||
| 301 | <target name="-init-runtime-props" depends="-runtime-props-check,-init-run-jvmargs-value,-init-initial-heap-size-value,-init-max-heap-size-value"/> | ||
| 302 | <target name="-runtime-props-check"> | ||
| 303 | <condition property="run.jvmargs.set"> | ||
| 304 | <and> | ||
| 305 | <isset property="run.jvmargs"/> | ||
| 306 | <not> | ||
| 307 | <equals arg1="${run.jvmargs}" arg2="" trim="true"/> | ||
| 308 | </not> | ||
| 309 | </and> | ||
| 310 | </condition> | ||
| 311 | <condition property="jnlp.initial-heap-size.set"> | ||
| 312 | <and> | ||
| 313 | <isset property="jnlp.initial-heap-size"/> | ||
| 314 | <not> | ||
| 315 | <equals arg1="${jnlp.initial-heap-size}" arg2="" trim="true"/> | ||
| 316 | </not> | ||
| 317 | </and> | ||
| 318 | </condition> | ||
| 319 | <condition property="jnlp.max-heap-size.set"> | ||
| 320 | <and> | ||
| 321 | <isset property="jnlp.max-heap-size"/> | ||
| 322 | <not> | ||
| 323 | <equals arg1="${jnlp.max-heap-size}" arg2="" trim="true"/> | ||
| 324 | </not> | ||
| 325 | </and> | ||
| 326 | </condition> | ||
| 327 | </target> | ||
| 328 | <target name="-init-run-jvmargs-value" if="run.jvmargs.set"> | ||
| 329 | <property name="run.jvmargs.value" value=' java-vm-args="${run.jvmargs}"'/> | ||
| 330 | </target> | ||
| 331 | <target name="-init-initial-heap-size-value" if="jnlp.initial-heap-size.set"> | ||
| 332 | <property name="initial-heap-size.value" value=' initial-heap-size="${jnlp.initial-heap-size}"'/> | ||
| 333 | </target> | ||
| 334 | <target name="-init-max-heap-size-value" if="jnlp.max-heap-size.set"> | ||
| 335 | <property name="max-heap-size.value" value=' max-heap-size="${jnlp.max-heap-size}"'/> | ||
| 336 | </target> | ||
| 337 | |||
| 338 | <!-- JAR resources --> | ||
| 339 | |||
| 340 | <target name="-init-resources-jars" depends="-preinit-resources-unsigned-jars,-preinit-resources-signed-jars,-preinit-resources-main-jar"/> | ||
| 341 | <target name="-preinit-resources-unsigned-jars" depends="-exclude-javaws-from-cp,-check-signing-possible" unless="jnlp.signed.true+signjarstask.available"> | ||
| 342 | <pathconvert pathsep="${line.separator}" property="jnlp.resources.jars.value"> | ||
| 343 | <path path="${run.classpath.without.javaws.jar}"/> | ||
| 344 | <mapper type="regexp" from="^.*[/\\]([^/\\]+\.jar)" | ||
| 345 | to=' <jar href="lib/\1" download="eager"/>'/> | ||
| 346 | </pathconvert> | ||
| 347 | </target> | ||
| 348 | <target name="-preinit-resources-main-jar"> | ||
| 349 | <pathconvert pathsep="${line.separator}" property="jnlp.resources.main.jar.value"> | ||
| 350 | <path location="${dist.jar}"/> | ||
| 351 | <mapper type="regexp" from="^.*[/\\]([^/\\]+\.jar)" | ||
| 352 | to=' <jar href="\1" main="true" download="eager"/>'/> | ||
| 353 | </pathconvert> | ||
| 354 | </target> | ||
| 355 | <target name="-exclude-javaws-from-cp"> | ||
| 356 | <pathconvert property="path.element.to.be.removed"> | ||
| 357 | <path path="${run.classpath}"/> | ||
| 358 | <mapper type="regexp" from="(^.*[/\\]javaws.jar)" to="\1"/> | ||
| 359 | </pathconvert> | ||
| 360 | <pathconvert property="run.classpath.without.javaws.jar"> | ||
| 361 | <path path="${run.classpath}"/> | ||
| 362 | <map from="${path.element.to.be.removed}" to=""/> | ||
| 363 | </pathconvert> | ||
| 364 | </target> | ||
| 365 | <target name="-check-task-available"> | ||
| 366 | <condition property="signjarstask.available"> | ||
| 367 | <isset property="netbeans.home"/> | ||
| 368 | </condition> | ||
| 369 | </target> | ||
| 370 | <target name="-check-signing-possible" depends="-security-props-check,-check-task-available"> | ||
| 371 | <condition property="jnlp.signed.true+signjarstask.available"> | ||
| 372 | <and> | ||
| 373 | <isset property="jnlp.signed.true"/> | ||
| 374 | <isset property="signjarstask.available"/> | ||
| 375 | </and> | ||
| 376 | </condition> | ||
| 377 | </target> | ||
| 378 | <target name="-unavailable-task-warning" depends="-check-task-available" unless="signjarstask.available"> | ||
| 379 | <echo message="Signtask is not available, jar files will not be signed. Task is available only when running inside NetBeans IDE."/> | ||
| 380 | </target> | ||
| 381 | <target name="-preinit-resources-signed-jars" depends="-unavailable-task-warning,-sign-jars" if="jnlp.signed.true+signjarstask.available"> | ||
| 382 | <property name="jnlp.resources.jars.value" value="${jnlp.signed.jars}${jnlp.components}"/> | ||
| 383 | </target> | ||
| 384 | <target name="-sign-jars" depends="-jnlp-init-keystore,-check-signing-possible" if="jnlp.signed.true+signjarstask.available"> | ||
| 385 | <jnlpsignjars keystore="${jnlp.signjar.keystore}" storepass="${jnlp.signjar.storepass}" | ||
| 386 | keypass="${jnlp.signjar.keypass}" alias="${jnlp.signjar.alias}" mainjar="${dist.jar}" destdir="dist" | ||
| 387 | codebase="${jnlp.codebase.value}" signedjarsprop="jnlp.signed.jars" | ||
| 388 | componentsprop="jnlp.components"> | ||
| 389 | <fileset dir="dist/lib"> | ||
| 390 | <include name="*.jar"/> | ||
| 391 | </fileset> | ||
| 392 | </jnlpsignjars> | ||
| 393 | </target> | ||
| 394 | |||
| 395 | <!-- Application arguments --> | ||
| 396 | |||
| 397 | <target name="-init-application-args" if="application.args"> | ||
| 398 | <echo message="${application.args}" file="${helper.file}"/> | ||
| 399 | <loadfile srcfile="${helper.file}" property="jnlp.application.args.value"> | ||
| 400 | <filterchain> | ||
| 401 | <tokenfilter delimoutput="\n"> | ||
| 402 | <stringtokenizer/> | ||
| 403 | <replaceregex pattern="(.+)" replace=" <argument>\1</argument>"/> | ||
| 404 | </tokenfilter> | ||
| 405 | </filterchain> | ||
| 406 | </loadfile> | ||
| 407 | <delete file="${helper.file}"/> | ||
| 408 | </target> | ||
| 409 | |||
| 410 | <!-- Running/Debugging --> | ||
| 411 | |||
| 412 | <target name="jws-run" depends="jar,-verify-jnlp-enabled,-verify-codebase" description="Start javaws execution"> | ||
| 413 | <exec executable="${java.home}/bin/javaws"> | ||
| 414 | <arg file="${jnlp.dest.dir}/${launch.jnlp.file}"/> | ||
| 415 | </exec> | ||
| 416 | </target> | ||
| 417 | <target name="jws-debug" if="netbeans.home" depends="jar,-verify-jnlp-enabled,-verify-codebase,-debug-start-debugger,-debug-javaws-debuggee" | ||
| 418 | description="Debug javaws project in IDE"/> | ||
| 419 | <target name="-debug-javaws-debuggee"> | ||
| 420 | <exec executable="${java.home}/bin/javaws"> | ||
| 421 | <env key="JAVAWS_VM_ARGS" value="-Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> | ||
| 422 | <arg file="${jnlp.dest.dir}/${launch.jnlp.file}"/> | ||
| 423 | </exec> | ||
| 424 | </target> | ||
| 425 | <target name="-verify-codebase" depends="-codebase-props-check" unless="local.codebase"> | ||
| 426 | <fail message="Project cannot be run with non-local codebase. Open project properties dialog and set Web Start Codebase to Local Execution."/> | ||
| 427 | </target> | ||
| 428 | <target name="-verify-jnlp-enabled" depends="-test-jnlp-enabled" unless="is.jnlp.enabled"> | ||
| 429 | <fail message="Project cannot be run with selected Run Configuration when Java Web Start is disabled."/> | ||
| 430 | </target> | ||
| 431 | |||
| 432 | <!-- Test JNLP enabled--> | ||
| 433 | |||
| 434 | <target name="-test-jnlp-enabled"> | ||
| 435 | <condition property="is.jnlp.enabled"> | ||
| 436 | <equals arg1="${jnlp.enabled}" arg2="true" casesensitive="false" trim="true"/> | ||
| 437 | </condition> | ||
| 438 | </target> | ||
| 439 | |||
| 440 | <!-- Generate simple HTML test page --> | ||
| 441 | |||
| 442 | <target name="-generate-html-page"> | ||
| 443 | <echo file="${jnlp.dest.dir}/launch.html"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
| 444 | <html> | ||
| 445 | <head> | ||
| 446 | <title>Test page for launching the application via JNLP</title> | ||
| 447 | </head> | ||
| 448 | <body> | ||
| 449 | <h3>Test page for launching the application via JNLP</h3> | ||
| 450 | <a href="launch.jnlp">Launch the application</a> | ||
| 451 | </body> | ||
| 452 | </html> | ||
| 453 | ]]></echo> | ||
| 454 | </target> | ||
| 455 | |||
| 456 | </project> | ||
| diff --git a/client/trunk/nbproject/project.properties b/client/trunk/nbproject/project.properties index c7123aa..2ab451d 100644 --- a/client/trunk/nbproject/project.properties +++ b/client/trunk/nbproject/project.properties | |||
| @@ -29,9 +29,7 @@ javac.classpath=\ | |||
| 29 | ${libs.XML-RPC.classpath}:\ | 29 | ${libs.XML-RPC.classpath}:\ |
| 30 | ${libs.BDB.classpath}:\ | 30 | ${libs.BDB.classpath}:\ |
| 31 | ${file.reference.commons-logging-1.1.jar}:\ | 31 | ${file.reference.commons-logging-1.1.jar}:\ |
| 32 | ${file.reference.ws-commons-util-1.0.2.jar}:\ | 32 | ${file.reference.ws-commons-util-1.0.2.jar} |
| 33 | ${libs.beans-binding.classpath}:\ | ||
| 34 | ${libs.absolutelayout.classpath} | ||
| 35 | # Space-separated list of extra javac options | 33 | # Space-separated list of extra javac options |
| 36 | javac.compilerargs=-Xlint:unchecked | 34 | javac.compilerargs=-Xlint:unchecked |
| 37 | javac.deprecation=false | 35 | javac.deprecation=false |
| @@ -53,20 +51,16 @@ javadoc.splitindex=true | |||
| 53 | javadoc.use=true | 51 | javadoc.use=true |
| 54 | javadoc.version=false | 52 | javadoc.version=false |
| 55 | javadoc.windowtitle= | 53 | javadoc.windowtitle= |
| 56 | jnlp.codebase.type=local | 54 | jnlp.codebase.type=user |
| 57 | jnlp.codebase.url=file:/home/hatkirby/NetBeansProjects/InstaDisc/dist/ | 55 | jnlp.codebase.url=file:/home/hatkirby/NetBeansProjects/InstaDisc/dist/ |
| 58 | jnlp.enabled=false | 56 | jnlp.codebase.user=http://files.fourisland.com/projects/instadisc/ |
| 59 | jnlp.offline-allowed=false | 57 | jnlp.enabled=true |
| 60 | jnlp.signed=false | 58 | jnlp.icon=/home/hatkirby/instaDiscIconBig.png |
| 61 | # Property libs.absolutelayout.classpath is set here just to make sharing of project simpler. | 59 | jnlp.offline-allowed=true |
| 62 | # The library definition has always preference over this property. | 60 | jnlp.signed=true |
| 63 | libs.absolutelayout.classpath=../../../../usr/share/netbeans/6.0.1/java1/modules/ext/AbsoluteLayout.jar | ||
| 64 | # Property libs.BDB.classpath is set here just to make sharing of project simpler. | 61 | # Property libs.BDB.classpath is set here just to make sharing of project simpler. |
| 65 | # The library definition has always preference over this property. | 62 | # The library definition has always preference over this property. |
| 66 | libs.BDB.classpath=lib/je-3.3.62.jar | 63 | libs.BDB.classpath=lib/je-3.3.62.jar |
| 67 | # Property libs.beans-binding.classpath is set here just to make sharing of project simpler. | ||
| 68 | # The library definition has always preference over this property. | ||
| 69 | libs.beans-binding.classpath=../../../../usr/share/netbeans/6.0.1/java1/modules/ext/beansbinding-1.2.1.jar | ||
| 70 | # Property libs.XML-RPC.classpath is set here just to make sharing of project simpler. | 64 | # Property libs.XML-RPC.classpath is set here just to make sharing of project simpler. |
| 71 | # The library definition has always preference over this property. | 65 | # The library definition has always preference over this property. |
| 72 | libs.XML-RPC.classpath=lib/xmlrpc-client-3.1.jar:lib/xmlrpc-common-3.1.jar:lib/xmlrpc-server-3.1.jar | 66 | libs.XML-RPC.classpath=lib/xmlrpc-client-3.1.jar:lib/xmlrpc-common-3.1.jar:lib/xmlrpc-server-3.1.jar |
| diff --git a/client/trunk/nbproject/project.xml b/client/trunk/nbproject/project.xml index 652e0df..0cd1753 100644 --- a/client/trunk/nbproject/project.xml +++ b/client/trunk/nbproject/project.xml | |||
| @@ -2,6 +2,11 @@ | |||
| 2 | <project xmlns="http://www.netbeans.org/ns/project/1"> | 2 | <project xmlns="http://www.netbeans.org/ns/project/1"> |
| 3 | <type>org.netbeans.modules.java.j2seproject</type> | 3 | <type>org.netbeans.modules.java.j2seproject</type> |
| 4 | <configuration> | 4 | <configuration> |
| 5 | <buildExtensions xmlns="http://www.netbeans.org/ns/ant-build-extender/1"> | ||
| 6 | <extension file="jnlp-impl.xml" id="jws"> | ||
| 7 | <dependency dependsOn="jnlp" target="jar"/> | ||
| 8 | </extension> | ||
| 9 | </buildExtensions> | ||
| 5 | <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> | 10 | <data xmlns="http://www.netbeans.org/ns/j2se-project/3"> |
| 6 | <name>InstaDisc</name> | 11 | <name>InstaDisc</name> |
| 7 | <minimum-ant-version>1.6.5</minimum-ant-version> | 12 | <minimum-ant-version>1.6.5</minimum-ant-version> |
| diff --git a/client/trunk/packaging/instadisc b/client/trunk/packaging/instadisc deleted file mode 100755 index 8b8a420..0000000 --- a/client/trunk/packaging/instadisc +++ /dev/null | |||
| @@ -1,20 +0,0 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # InstaDisc Client Loader | ||
| 3 | # | ||
| 4 | # Copyright 2008 Four Island | ||
| 5 | |||
| 6 | PRG=$0 | ||
| 7 | |||
| 8 | while [ -h "$PRG" ]; do | ||
| 9 | ls=`ls -ld "$PRG"` | ||
| 10 | link=`expr "$ls" : '^.*-> \(.*\)$' 2>/dev/null` | ||
| 11 | if expr "$link" : '^/' 2> /dev/null >/dev/null; then | ||
| 12 | PRG="$link" | ||
| 13 | else | ||
| 14 | PRG="`dirname "$PRG"`/$link" | ||
| 15 | fi | ||
| 16 | done | ||
| 17 | |||
| 18 | progdir=`dirname "$PRG"` | ||
| 19 | |||
| 20 | java -jar "$progdir/InstaDisc.jar" $* | ||
