diff options
author | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-29 22:55:41 +0000 |
---|---|---|
committer | Kelly Rauchenberger <fefferburbia@gmail.com> | 2008-09-29 22:55:41 +0000 |
commit | 66b9985ba51965ab9ae6793baaba86ef506496a3 (patch) | |
tree | cd484eb49dcc5cec261ef0877ea58b97a2cdfbe5 /client/trunk/nbproject/jnlp-impl.xml | |
parent | 9c284114a2c10d209c7abc1b5930228333e2558e (diff) | |
download | instadisc-66b9985ba51965ab9ae6793baaba86ef506496a3.tar.gz instadisc-66b9985ba51965ab9ae6793baaba86ef506496a3.tar.bz2 instadisc-66b9985ba51965ab9ae6793baaba86ef506496a3.zip |
Client: Undid damage from [133]
Fixes #71
Diffstat (limited to 'client/trunk/nbproject/jnlp-impl.xml')
-rw-r--r-- | client/trunk/nbproject/jnlp-impl.xml | 457 |
1 files changed, 0 insertions, 457 deletions
diff --git a/client/trunk/nbproject/jnlp-impl.xml b/client/trunk/nbproject/jnlp-impl.xml deleted file mode 100644 index f389e2c..0000000 --- a/client/trunk/nbproject/jnlp-impl.xml +++ /dev/null | |||
@@ -1,457 +0,0 @@ | |||
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 | <shortcut online="false"> | ||
79 | <desktop/> | ||
80 | <menu submenu="Four Island"/> | ||
81 | </shortcut> | ||
82 | <!--$${JNLP.ICONS}--> | ||
83 | <!--$${JNLP.OFFLINE.ALLOWED}--> | ||
84 | </information> | ||
85 | <!--$${JNLP.SECURITY}--> | ||
86 | <resources> | ||
87 | <!--$${JNLP.RESOURCES.RUNTIME}--> | ||
88 | <!--$${JNLP.RESOURCES.MAIN.JAR}--> | ||
89 | <!--$${JNLP.RESOURCES.JARS}--> | ||
90 | </resources> | ||
91 | <application-desc main-class="$${jnlp.main.class}"> | ||
92 | <!--$${JNLP.APPLICATION.ARGS}--> | ||
93 | </application-desc> | ||
94 | </jnlp> | ||
95 | ]]></echo> | ||
96 | </target> | ||
97 | |||
98 | <!-- Initial check --> | ||
99 | |||
100 | <target name="-init-check"> | ||
101 | <fail unless="application.title" message="Must set application title."/> | ||
102 | <fail unless="application.vendor" message="Must set application vendor."/> | ||
103 | </target> | ||
104 | |||
105 | <!-- Icons --> | ||
106 | |||
107 | <target name="-init-icons" depends="-preinit-icons,-set-icon-elem,-set-splash-elem"> | ||
108 | <property name="jnlp.icon.elem" value=""/> | ||
109 | <property name="application.splash.elem" value=""/> | ||
110 | <property name="icon.separator" value=""/> | ||
111 | <property name="jnlp.icons.value" value="${jnlp.icon.elem}${icon.separator}${application.splash.elem}"/> | ||
112 | </target> | ||
113 | <target name="-preinit-icons" depends="-copy-app-icon,-copy-app-splash"/> | ||
114 | <target name="-copy-app-icon" if="jnlp.icon" depends="-get-app-icon-name"> | ||
115 | <copy file="${jnlp.icon}" todir="${jnlp.dest.dir}" failonerror="false"/> | ||
116 | <available file="${jnlp.dest.dir}${file.separator}${jnlp.icon.name}" property="jnlp.icon.copied"/> | ||
117 | </target> | ||
118 | <target name="-copy-app-splash" if="application.splash" depends="-get-app-splash-name"> | ||
119 | <copy file="${application.splash}" todir="${jnlp.dest.dir}" failonerror="false"/> | ||
120 | <available file="${jnlp.dest.dir}${file.separator}${application.splash.name}" property="application.splash.copied"/> | ||
121 | </target> | ||
122 | <target name="-get-app-icon-name" if="jnlp.icon"> | ||
123 | <dirname file="${jnlp.icon}" property="jnlp.icon.basedir"/> | ||
124 | <pathconvert property="jnlp.icon.name" setonempty="false"> | ||
125 | <path location="${jnlp.icon}"/> | ||
126 | <map from="${jnlp.icon.basedir}${file.separator}" to=""/> | ||
127 | </pathconvert> | ||
128 | </target> | ||
129 | <target name="-get-app-splash-name" if="application.splash"> | ||
130 | <dirname file="${application.splash}" property="application.splash.basedir"/> | ||
131 | <pathconvert property="application.splash.name" setonempty="false"> | ||
132 | <path location="${application.splash}"/> | ||
133 | <map from="${application.splash.basedir}${file.separator}" to=""/> | ||
134 | </pathconvert> | ||
135 | </target> | ||
136 | <target name="-set-icon-elem" if="jnlp.icon.copied"> | ||
137 | <property name="jnlp.icon.elem" value=' <icon href="${jnlp.icon.name}" kind="default"/>'/> | ||
138 | </target> | ||
139 | <target name="-set-splash-elem" if="application.splash.copied" depends="-set-icon-elem"> | ||
140 | <property name="application.splash.elem" value=' <icon href="${application.splash.name}" kind="splash"/>'/> | ||
141 | <condition property="icon.separator" value="${line.separator}"> | ||
142 | <isset property="jnlp.icon.elem"/> | ||
143 | </condition> | ||
144 | </target> | ||
145 | |||
146 | <!-- Offline-Allowed --> | ||
147 | |||
148 | <target name="-init-offline" if="offline.allowed.set" depends="-preinit-offline"> | ||
149 | <property name="jnlp.offline.allowed.value" value=" <offline-allowed/>"/> | ||
150 | </target> | ||
151 | <target name="-preinit-offline"> | ||
152 | <condition property="offline.allowed.set"> | ||
153 | <equals arg1="${jnlp.offline-allowed}" arg2="true" trim="true"/> | ||
154 | </condition> | ||
155 | </target> | ||
156 | |||
157 | <!-- Descriptions --> | ||
158 | |||
159 | <target name="-init-descriptions" depends="-descriptions-props-check,-init-desc-value,-init-desc-value-short"> | ||
160 | <property name="application.desc.value" value="${application.title}"/> | ||
161 | <property name="application.desc.short.value" value="${application.title}"/> | ||
162 | </target> | ||
163 | <target name="-descriptions-props-check"> | ||
164 | <condition property="application.desc.set"> | ||
165 | <and> | ||
166 | <isset property="application.desc"/> | ||
167 | <not> | ||
168 | <equals arg1="${application.desc}" arg2="" trim="true"/> | ||
169 | </not> | ||
170 | </and> | ||
171 | </condition> | ||
172 | <condition property="application.desc.short.set"> | ||
173 | <and> | ||
174 | <isset property="application.desc.short"/> | ||
175 | <not> | ||
176 | <equals arg1="${application.desc.short}" arg2="" trim="true"/> | ||
177 | </not> | ||
178 | </and> | ||
179 | </condition> | ||
180 | </target> | ||
181 | <target name="-init-desc-value" if="application.desc.set"> | ||
182 | <property name="application.desc.value" value="${application.desc}"/> | ||
183 | </target> | ||
184 | <target name="-init-desc-value-short" if="application.desc.short.set"> | ||
185 | <property name="application.desc.short.value" value="${application.desc.short}"/> | ||
186 | </target> | ||
187 | |||
188 | <!-- Security --> | ||
189 | |||
190 | <target name="-init-security" depends="-check-signing-possible" if="jnlp.signed.true+signjarstask.available"> | ||
191 | <property name="jnlp.security" value=" <security>${line.separator} <all-permissions/>${line.separator} </security>"/> | ||
192 | </target> | ||
193 | <target name="-security-props-check"> | ||
194 | <condition property="jnlp.signed.true"> | ||
195 | <istrue value="${jnlp.signed}"/> | ||
196 | </condition> | ||
197 | </target> | ||
198 | <target name="-jnlp-init-keystore" depends="-jnlp-init-keystore-props,-check-keystore-exists" unless="jnlp.signjar.keystore.exists"> | ||
199 | <echo message="${application.vendor}" file="${helper.file}"/> | ||
200 | <loadfile property="application.vendor.filtered" srcfile="${helper.file}"> | ||
201 | <filterchain> | ||
202 | <deletecharacters chars=","/> | ||
203 | </filterchain> | ||
204 | </loadfile> | ||
205 | <delete file="${helper.file}"/> | ||
206 | <property name="jnlp.signjar.vendor" value="CN=${application.vendor.filtered}"/> | ||
207 | <echo message="Going to create default keystore in ${jnlp.signjar.keystore}"/> | ||
208 | <genkey dname="${jnlp.signjar.vendor}" alias="${jnlp.signjar.alias}" keystore="${jnlp.signjar.keystore}" | ||
209 | storepass="${jnlp.signjar.storepass}" keypass="${jnlp.signjar.keypass}"/> | ||
210 | </target> | ||
211 | <target name="-check-keystore-exists"> | ||
212 | <available property="jnlp.signjar.keystore.exists" file="${jnlp.signjar.keystore}"/> | ||
213 | </target> | ||
214 | <target name="-jnlp-init-keystore-props"> | ||
215 | <property name="jnlp.signjar.keystore" value="${basedir}/build/nb-jws.ks"/> | ||
216 | <property name="jnlp.signjar.storepass" value="storepass"/> | ||
217 | <property name="jnlp.signjar.keypass" value="keypass"/> | ||
218 | <property name="jnlp.signjar.alias" value="nb-jws"/> | ||
219 | </target> | ||
220 | |||
221 | <!-- Generating JNLP file --> | ||
222 | |||
223 | <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"> | ||
224 | <copy file="${master.jnlp.file}" tofile="${jnlp.dest.dir}/${launch.jnlp.file}__" overwrite="true" encoding="UTF-8"> | ||
225 | <filterchain> | ||
226 | <replacestring from="$${jnlp.codebase}" to="${jnlp.codebase.value}"/> | ||
227 | <replacestring from="<!--$${JNLP.ICONS}-->" to="${jnlp.icons.value}"/> | ||
228 | <replacestring from="<!--$${JNLP.SECURITY}-->" to="${jnlp.security}"/> | ||
229 | <replacestring from="<!--$${JNLP.OFFLINE.ALLOWED}-->" to="${jnlp.offline.allowed.value}"/> | ||
230 | <replacestring from="<!--$${JNLP.RESOURCES.RUNTIME}-->" to="${jnlp.resources.runtime.value}"/> | ||
231 | <replacestring from="<!--$${JNLP.RESOURCES.MAIN.JAR}-->" to="${jnlp.resources.main.jar.value}"/> | ||
232 | <replacestring from="<!--$${JNLP.RESOURCES.JARS}-->" to="${jnlp.resources.jars.value}"/> | ||
233 | <replacestring from="<!--$${JNLP.APPLICATION.ARGS}-->" to="${jnlp.application.args.value}"/> | ||
234 | <replacestring from="$${APPLICATION.TITLE}" to="${application.title}"/> | ||
235 | <replacestring from="$${APPLICATION.VENDOR}" to="${application.vendor}"/> | ||
236 | <replacestring from="$${APPLICATION.DESC}" to="${application.desc.value}"/> | ||
237 | <replacestring from="$${APPLICATION.DESC.SHORT}" to="${application.desc.short.value}"/> | ||
238 | <replacestring from="$${APPLICATION.HOMEPAGE}" to="${application.homepage}"/> | ||
239 | <replacestring from="$${jnlp.main.class}" to="${main.class}"/> | ||
240 | </filterchain> | ||
241 | </copy> | ||
242 | <antcall target="-strip-empty-lines"/> | ||
243 | <antcall target="-generate-html-page"/> | ||
244 | </target> | ||
245 | <target name="jnlp-init-notinited"> | ||
246 | <property name="jnlp.security" value=""/> | ||
247 | <property name="jnlp.offline.allowed.value" value=""/> | ||
248 | <property name="application.homepage" value=""/> | ||
249 | <property name="jnlp.application.args.value" value=""/> | ||
250 | </target> | ||
251 | <target name="-strip-empty-lines"> | ||
252 | <move file="${jnlp.dest.dir}/${launch.jnlp.file}__" tofile="${jnlp.dest.dir}/${launch.jnlp.file}" overwrite="true" encoding="UTF-8"> | ||
253 | <filterchain> | ||
254 | <linecontainsregexp> | ||
255 | <regexp pattern=".+"/> | ||
256 | </linecontainsregexp> | ||
257 | </filterchain> | ||
258 | </move> | ||
259 | </target> | ||
260 | |||
261 | <!-- Codebase processing --> | ||
262 | |||
263 | <target name="-init-codebase" depends="-codebase-props-check,-init-non-user-codebase,-init-user-codebase"/> | ||
264 | <target name="-codebase-props-check"> | ||
265 | <condition property="local.codebase"> | ||
266 | <or> | ||
267 | <not> | ||
268 | <isset property="jnlp.codebase.type"/> | ||
269 | </not> | ||
270 | <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/> | ||
271 | </or> | ||
272 | </condition> | ||
273 | <condition property="non.user.codebase"> | ||
274 | <or> | ||
275 | <not> | ||
276 | <isset property="jnlp.codebase.type"/> | ||
277 | </not> | ||
278 | <equals arg1="${jnlp.codebase.type}" arg2="local" trim="true"/> | ||
279 | <equals arg1="${jnlp.codebase.type}" arg2="web" trim="true"/> | ||
280 | </or> | ||
281 | </condition> | ||
282 | <condition property="user.codebase"> | ||
283 | <equals arg1="${jnlp.codebase.type}" arg2="user" trim="true"/> | ||
284 | </condition> | ||
285 | </target> | ||
286 | <target name="-init-non-user-codebase" if="non.user.codebase"> | ||
287 | <property name="jnlp.codebase.value" value="${jnlp.codebase.url}"/> | ||
288 | </target> | ||
289 | <target name="-init-user-codebase" if="user.codebase"> | ||
290 | <property name="jnlp.codebase.value" value="${jnlp.codebase.user}"/> | ||
291 | </target> | ||
292 | |||
293 | <!-- j2se resources --> | ||
294 | |||
295 | <target name="-init-resources-runtime" depends="-init-runtime-props"> | ||
296 | <property name="run.jvmargs.value" value=""/> | ||
297 | <property name="initial-heap-size.value" value=""/> | ||
298 | <property name="max-heap-size.value" value=""/> | ||
299 | <property name="jnlp.resources.runtime.value" | ||
300 | value=' <j2se version="${javac.target}+"${initial-heap-size.value}${max-heap-size.value}${run.jvmargs.value}/>'/> | ||
301 | </target> | ||
302 | <target name="-init-runtime-props" depends="-runtime-props-check,-init-run-jvmargs-value,-init-initial-heap-size-value,-init-max-heap-size-value"/> | ||
303 | <target name="-runtime-props-check"> | ||
304 | <condition property="run.jvmargs.set"> | ||
305 | <and> | ||
306 | <isset property="run.jvmargs"/> | ||
307 | <not> | ||
308 | <equals arg1="${run.jvmargs}" arg2="" trim="true"/> | ||
309 | </not> | ||
310 | </and> | ||
311 | </condition> | ||
312 | <condition property="jnlp.initial-heap-size.set"> | ||
313 | <and> | ||
314 | <isset property="jnlp.initial-heap-size"/> | ||
315 | <not> | ||
316 | <equals arg1="${jnlp.initial-heap-size}" arg2="" trim="true"/> | ||
317 | </not> | ||
318 | </and> | ||
319 | </condition> | ||
320 | <condition property="jnlp.max-heap-size.set"> | ||
321 | <and> | ||
322 | <isset property="jnlp.max-heap-size"/> | ||
323 | <not> | ||
324 | <equals arg1="${jnlp.max-heap-size}" arg2="" trim="true"/> | ||
325 | </not> | ||
326 | </and> | ||
327 | </condition> | ||
328 | </target> | ||
329 | <target name="-init-run-jvmargs-value" if="run.jvmargs.set"> | ||
330 | <property name="run.jvmargs.value" value=' java-vm-args="${run.jvmargs}"'/> | ||
331 | </target> | ||
332 | <target name="-init-initial-heap-size-value" if="jnlp.initial-heap-size.set"> | ||
333 | <property name="initial-heap-size.value" value=' initial-heap-size="${jnlp.initial-heap-size}"'/> | ||
334 | </target> | ||
335 | <target name="-init-max-heap-size-value" if="jnlp.max-heap-size.set"> | ||
336 | <property name="max-heap-size.value" value=' max-heap-size="${jnlp.max-heap-size}"'/> | ||
337 | </target> | ||
338 | |||
339 | <!-- JAR resources --> | ||
340 | |||
341 | <target name="-init-resources-jars" depends="-preinit-resources-unsigned-jars,-preinit-resources-signed-jars,-preinit-resources-main-jar"/> | ||
342 | <target name="-preinit-resources-unsigned-jars" depends="-exclude-javaws-from-cp,-check-signing-possible" unless="jnlp.signed.true+signjarstask.available"> | ||
343 | <pathconvert pathsep="${line.separator}" property="jnlp.resources.jars.value"> | ||
344 | <path path="${run.classpath.without.javaws.jar}"/> | ||
345 | <mapper type="regexp" from="^.*[/\\]([^/\\]+\.jar)" | ||
346 | to=' <jar href="lib/\1" download="eager"/>'/> | ||
347 | </pathconvert> | ||
348 | </target> | ||
349 | <target name="-preinit-resources-main-jar"> | ||
350 | <pathconvert pathsep="${line.separator}" property="jnlp.resources.main.jar.value"> | ||
351 | <path location="${dist.jar}"/> | ||
352 | <mapper type="regexp" from="^.*[/\\]([^/\\]+\.jar)" | ||
353 | to=' <jar href="\1" main="true" download="eager"/>'/> | ||
354 | </pathconvert> | ||
355 | </target> | ||
356 | <target name="-exclude-javaws-from-cp"> | ||
357 | <pathconvert property="path.element.to.be.removed"> | ||
358 | <path path="${run.classpath}"/> | ||
359 | <mapper type="regexp" from="(^.*[/\\]javaws.jar)" to="\1"/> | ||
360 | </pathconvert> | ||
361 | <pathconvert property="run.classpath.without.javaws.jar"> | ||
362 | <path path="${run.classpath}"/> | ||
363 | <map from="${path.element.to.be.removed}" to=""/> | ||
364 | </pathconvert> | ||
365 | </target> | ||
366 | <target name="-check-task-available"> | ||
367 | <condition property="signjarstask.available"> | ||
368 | <isset property="netbeans.home"/> | ||
369 | </condition> | ||
370 | </target> | ||
371 | <target name="-check-signing-possible" depends="-security-props-check,-check-task-available"> | ||
372 | <condition property="jnlp.signed.true+signjarstask.available"> | ||
373 | <and> | ||
374 | <isset property="jnlp.signed.true"/> | ||
375 | <isset property="signjarstask.available"/> | ||
376 | </and> | ||
377 | </condition> | ||
378 | </target> | ||
379 | <target name="-unavailable-task-warning" depends="-check-task-available" unless="signjarstask.available"> | ||
380 | <echo message="Signtask is not available, jar files will not be signed. Task is available only when running inside NetBeans IDE."/> | ||
381 | </target> | ||
382 | <target name="-preinit-resources-signed-jars" depends="-unavailable-task-warning,-sign-jars" if="jnlp.signed.true+signjarstask.available"> | ||
383 | <property name="jnlp.resources.jars.value" value="${jnlp.signed.jars}${jnlp.components}"/> | ||
384 | </target> | ||
385 | <target name="-sign-jars" depends="-jnlp-init-keystore,-check-signing-possible" if="jnlp.signed.true+signjarstask.available"> | ||
386 | <jnlpsignjars keystore="${jnlp.signjar.keystore}" storepass="${jnlp.signjar.storepass}" | ||
387 | keypass="${jnlp.signjar.keypass}" alias="${jnlp.signjar.alias}" mainjar="${dist.jar}" destdir="dist" | ||
388 | codebase="${jnlp.codebase.value}" signedjarsprop="jnlp.signed.jars" | ||
389 | componentsprop="jnlp.components"> | ||
390 | <fileset dir="dist/lib"> | ||
391 | <include name="*.jar"/> | ||
392 | </fileset> | ||
393 | </jnlpsignjars> | ||
394 | </target> | ||
395 | |||
396 | <!-- Application arguments --> | ||
397 | |||
398 | <target name="-init-application-args" if="application.args"> | ||
399 | <echo message="${application.args}" file="${helper.file}"/> | ||
400 | <loadfile srcfile="${helper.file}" property="jnlp.application.args.value"> | ||
401 | <filterchain> | ||
402 | <tokenfilter delimoutput="\n"> | ||
403 | <stringtokenizer/> | ||
404 | <replaceregex pattern="(.+)" replace=" <argument>\1</argument>"/> | ||
405 | </tokenfilter> | ||
406 | </filterchain> | ||
407 | </loadfile> | ||
408 | <delete file="${helper.file}"/> | ||
409 | </target> | ||
410 | |||
411 | <!-- Running/Debugging --> | ||
412 | |||
413 | <target name="jws-run" depends="jar,-verify-jnlp-enabled,-verify-codebase" description="Start javaws execution"> | ||
414 | <exec executable="${java.home}/bin/javaws"> | ||
415 | <arg file="${jnlp.dest.dir}/${launch.jnlp.file}"/> | ||
416 | </exec> | ||
417 | </target> | ||
418 | <target name="jws-debug" if="netbeans.home" depends="jar,-verify-jnlp-enabled,-verify-codebase,-debug-start-debugger,-debug-javaws-debuggee" | ||
419 | description="Debug javaws project in IDE"/> | ||
420 | <target name="-debug-javaws-debuggee"> | ||
421 | <exec executable="${java.home}/bin/javaws"> | ||
422 | <env key="JAVAWS_VM_ARGS" value="-Xdebug -Xnoagent -Djava.compiler=none -Xrunjdwp:transport=dt_socket,address=${jpda.address}"/> | ||
423 | <arg file="${jnlp.dest.dir}/${launch.jnlp.file}"/> | ||
424 | </exec> | ||
425 | </target> | ||
426 | <target name="-verify-codebase" depends="-codebase-props-check" unless="local.codebase"> | ||
427 | <fail message="Project cannot be run with non-local codebase. Open project properties dialog and set Web Start Codebase to Local Execution."/> | ||
428 | </target> | ||
429 | <target name="-verify-jnlp-enabled" depends="-test-jnlp-enabled" unless="is.jnlp.enabled"> | ||
430 | <fail message="Project cannot be run with selected Run Configuration when Java Web Start is disabled."/> | ||
431 | </target> | ||
432 | |||
433 | <!-- Test JNLP enabled--> | ||
434 | |||
435 | <target name="-test-jnlp-enabled"> | ||
436 | <condition property="is.jnlp.enabled"> | ||
437 | <equals arg1="${jnlp.enabled}" arg2="true" casesensitive="false" trim="true"/> | ||
438 | </condition> | ||
439 | </target> | ||
440 | |||
441 | <!-- Generate simple HTML test page --> | ||
442 | |||
443 | <target name="-generate-html-page"> | ||
444 | <echo file="${jnlp.dest.dir}/launch.html"><![CDATA[<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | ||
445 | <html> | ||
446 | <head> | ||
447 | <title>Test page for launching the application via JNLP</title> | ||
448 | </head> | ||
449 | <body> | ||
450 | <h3>Test page for launching the application via JNLP</h3> | ||
451 | <a href="launch.jnlp">Launch the application</a> | ||
452 | </body> | ||
453 | </html> | ||
454 | ]]></echo> | ||
455 | </target> | ||
456 | |||
457 | </project> | ||