0
|
1 <?xml version="1.0" encoding="UTF-8"?>
|
|
2 <!--
|
|
3 *** GENERATED FROM TEMPLATE - DO NOT EDIT ***
|
|
4 *** EDIT ../build.xml INSTEAD ***
|
|
5 -->
|
|
6
|
|
7 <project name="jfx-impl" default="jfx-deployment" basedir=".." xmlns:j2seproject1="http://www.netbeans.org/ns/j2se-project/1"
|
|
8 xmlns:j2seproject3="http://www.netbeans.org/ns/j2se-project/3" xmlns:fx="javafx:com.sun.javafx.tools.ant">
|
|
9 <description>JavaFX-specific Ant calls</description>
|
|
10
|
|
11
|
|
12 <!-- Empty placeholders for easier customization in ../build.xml -->
|
|
13
|
|
14 <target name="-pre-jfx-jar">
|
|
15 <!-- Called right before <fx:jar> task. You can override this target in the ../build.xml file. -->
|
|
16 </target>
|
|
17
|
|
18 <target name="-post-jfx-jar">
|
|
19 <!-- Called right after <fx:jar> task. You can override this target in the ../build.xml file. -->
|
|
20 </target>
|
|
21
|
|
22 <target name="-pre-jfx-deploy">
|
|
23 <!-- Called right before <fx:deploy> task. You can override this target in the ../build.xml file. -->
|
|
24 </target>
|
|
25
|
|
26 <target name="-post-jfx-deploy">
|
|
27 <!-- Called right after <fx:deploy> task. You can override this target in the ../build.xml file. -->
|
|
28 </target>
|
|
29
|
|
30 <target name="-pre-jfx-native">
|
|
31 <!-- Called right before the call to native packager (just after -pre-jfx-deploy). You can override this target in the ../build.xml file. -->
|
|
32 </target>
|
|
33
|
|
34 <target name="-post-jfx-native">
|
|
35 <!-- Called right after the call to native packager (just after -post-jfx-deploy). You can override this target in the ../build.xml file. -->
|
|
36 </target>
|
|
37
|
|
38
|
|
39 <!-- Check system and JDK version -->
|
|
40
|
|
41 <target name="-check-operating-system">
|
|
42 <condition property="running.on.mac">
|
|
43 <os family="mac"/>
|
|
44 </condition>
|
|
45 <condition property="running.on.unix">
|
|
46 <os family="unix"/>
|
|
47 </condition>
|
|
48 <condition property="running.on.windows">
|
|
49 <os family="windows"/>
|
|
50 </condition>
|
|
51 <echo message="running.on.mac = ${running.on.mac}" level="verbose"/>
|
|
52 <echo message="running.on.unix = ${running.on.unix}" level="verbose"/>
|
|
53 <echo message="running.on.windows = ${running.on.windows}" level="verbose"/>
|
|
54 </target>
|
|
55
|
|
56 <target name="-check-platform-home-fxsdk-java" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
57 <condition property="do.set.platform.home.fxsdk.java">
|
|
58 <and>
|
|
59 <not><isset property="active.platform.home.java.executable"/></not>
|
|
60 <or>
|
|
61 <available file="${javafx.sdk}${file.separator}bin${file.separator}java"/>
|
|
62 <available file="${javafx.sdk}${file.separator}bin${file.separator}java.exe"/>
|
|
63 </or>
|
|
64 </and>
|
|
65 </condition>
|
|
66 </target>
|
|
67 <target name="-set-platform-home-fxsdk-java" depends="-check-platform-home-fxsdk-java" if="do.set.platform.home.fxsdk.java">
|
|
68 <property name="active.platform.home.java.executable" value="${javafx.sdk}${file.separator}bin${file.separator}java"/>
|
|
69 </target>
|
|
70 <target name="-check-platform-home-java" if="platform.home">
|
|
71 <condition property="do.set.platform.home.java">
|
|
72 <and>
|
|
73 <not><isset property="active.platform.home.java.executable"/></not>
|
|
74 <or>
|
|
75 <available file="${platform.home}${file.separator}bin${file.separator}java"/>
|
|
76 <available file="${platform.home}${file.separator}bin${file.separator}java.exe"/>
|
|
77 </or>
|
|
78 </and>
|
|
79 </condition>
|
|
80 </target>
|
|
81 <target name="-set-platform-home-java" depends="-set-platform-home-fxsdk-java,-check-platform-home-java" if="do.set.platform.home.java">
|
|
82 <property name="active.platform.home.java.executable" value="${platform.home}${file.separator}bin${file.separator}java"/>
|
|
83 </target>
|
|
84 <target name="-check-platform-home-probjdk-java" unless="active.platform.home.java.executable">
|
|
85 <condition property="do.set.platform.home.probjdk.java">
|
|
86 <and>
|
|
87 <not><isset property="active.platform.home.java.executable"/></not>
|
|
88 <or>
|
|
89 <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}java"/>
|
|
90 <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}java.exe"/>
|
|
91 </or>
|
|
92 </and>
|
|
93 </condition>
|
|
94 </target>
|
|
95 <target name="-set-platform-home-probjdk-java" depends="-set-platform-home-java,-check-platform-home-probjdk-java" if="do.set.platform.home.probjdk.java">
|
|
96 <property name="active.platform.home.java.executable" value="${java.home}${file.separator}..${file.separator}bin${file.separator}java"/>
|
|
97 </target>
|
|
98 <target name="-check-platform-home-envjdk-java" unless="active.platform.home.java.executable">
|
|
99 <property environment="env"/>
|
|
100 <condition property="do.set.platform.home.envjdk.java">
|
|
101 <and>
|
|
102 <not><isset property="active.platform.home.java.executable"/></not>
|
|
103 <or>
|
|
104 <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}java"/>
|
|
105 <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}java.exe"/>
|
|
106 </or>
|
|
107 </and>
|
|
108 </condition>
|
|
109 </target>
|
|
110 <target name="-set-platform-home-envjdk-java" depends="-set-platform-home-probjdk-java,-check-platform-home-envjdk-java" if="do.set.platform.home.envjdk.java">
|
|
111 <property environment="env"/>
|
|
112 <property name="active.platform.home.java.executable" value="${env.JAVA_HOME}${file.separator}bin${file.separator}java"/>
|
|
113 </target>
|
|
114 <target name="-check-platform-home-fxrt-java" depends="-check-property-javafx.runtime" if="javafx.runtime.defined">
|
|
115 <condition property="do.set.platform.home.fxrt.java">
|
|
116 <and>
|
|
117 <not><isset property="active.platform.home.java.executable"/></not>
|
|
118 <or>
|
|
119 <available file="${javafx.runtime}${file.separator}bin${file.separator}java"/>
|
|
120 <available file="${javafx.runtime}${file.separator}bin${file.separator}java.exe"/>
|
|
121 </or>
|
|
122 </and>
|
|
123 </condition>
|
|
124 </target>
|
|
125 <target name="-set-platform-home-fxrt-java" depends="-set-platform-home-envjdk-java,-check-platform-home-fxrt-java" if="do.set.platform.home.fxrt.java">
|
|
126 <property name="active.platform.home.java.executable" value="${javafx.runtime}${file.separator}bin${file.separator}java"/>
|
|
127 <echo message="Warning: java executable not found in JDK, evaluating java executable in RT instead." level="info"/>
|
|
128 </target>
|
|
129 <target name="-check-platform-home-jre-java" unless="active.platform.home.java.executable">
|
|
130 <condition property="do.set.platform.home.jre.java">
|
|
131 <and>
|
|
132 <not><isset property="active.platform.home.java.executable"/></not>
|
|
133 <or>
|
|
134 <available file="${java.home}${file.separator}bin${file.separator}java"/>
|
|
135 <available file="${java.home}${file.separator}bin${file.separator}java.exe"/>
|
|
136 </or>
|
|
137 </and>
|
|
138 </condition>
|
|
139 </target>
|
|
140 <target name="-set-platform-home-jre-java" depends="-set-platform-home-fxrt-java,-check-platform-home-jre-java" if="do.set.platform.home.jre.java">
|
|
141 <property name="active.platform.home.java.executable" value="${java.home}${file.separator}bin${file.separator}java"/>
|
|
142 <echo message="Warning: java executable not found in JDK, evaluating java executable in RT instead." level="info"/>
|
|
143 </target>
|
|
144 <target name="-check-platform-home" depends="-set-platform-home-jre-java">
|
|
145 <echo message="active.platform.home.java.executable = ${active.platform.home.java.executable}" level="verbose"/>
|
|
146 <fail message="Error:${line.separator}java executable not found !" unless="active.platform.home.java.executable"/>
|
|
147 </target>
|
|
148
|
|
149 <target name="-check-jdk-version" depends="-do-init,-check-platform-home" unless="jdk-version-checked-in-jfximpl">
|
|
150 <local name="version-output"/>
|
|
151 <exec executable="${active.platform.home.java.executable}" outputproperty="version-output">
|
|
152 <arg value="-version"/>
|
|
153 </exec>
|
|
154 <echo message="version-output:${line.separator}${version-output}" level="verbose"/>
|
|
155 <condition property="have-jdk-older-than-1.6">
|
|
156 <or>
|
|
157 <contains string="${version-output}" substring="java version "1.0"/>
|
|
158 <contains string="${version-output}" substring="java version "1.1"/>
|
|
159 <contains string="${version-output}" substring="java version "1.2"/>
|
|
160 <contains string="${version-output}" substring="java version "1.3"/>
|
|
161 <contains string="${version-output}" substring="java version "1.4"/>
|
|
162 <contains string="${version-output}" substring="java version "1.5"/>
|
|
163 </or>
|
|
164 </condition>
|
|
165 <fail message="Error:${line.separator}JavaFX 2.0+ projects require JDK version 1.6+ !" if="have-jdk-older-than-1.6"/>
|
|
166 <condition property="have-jdk-7u4or5-mac">
|
|
167 <and>
|
|
168 <or>
|
|
169 <contains string="${version-output}" substring="java version "1.7.0_04"/>
|
|
170 <contains string="${version-output}" substring="java version "1.7.0_05"/>
|
|
171 </or>
|
|
172 <os family="mac"/>
|
|
173 </and>
|
|
174 </condition>
|
|
175 <condition property="have-jdk-pre7u6">
|
|
176 <or>
|
|
177 <isset property="have-jdk-older-than-1.6"/>
|
|
178 <contains string="${version-output}" substring="java version "1.6"/>
|
|
179 <contains string="${version-output}" substring="java version "1.7.0""/>
|
|
180 <contains string="${version-output}" substring="java version "1.7.0_01"/>
|
|
181 <contains string="${version-output}" substring="java version "1.7.0_02"/>
|
|
182 <contains string="${version-output}" substring="java version "1.7.0_03"/>
|
|
183 <contains string="${version-output}" substring="java version "1.7.0_04"/>
|
|
184 <contains string="${version-output}" substring="java version "1.7.0_05"/>
|
|
185 </or>
|
|
186 </condition>
|
|
187 <condition property="have-jdk-pre7u14">
|
|
188 <or>
|
|
189 <isset property="have-jdk-pre7u6"/>
|
|
190 <contains string="${version-output}" substring="java version "1.7.0_06"/>
|
|
191 <contains string="${version-output}" substring="java version "1.7.0_07"/>
|
|
192 <contains string="${version-output}" substring="java version "1.7.0_08"/>
|
|
193 <contains string="${version-output}" substring="java version "1.7.0_09"/>
|
|
194 <contains string="${version-output}" substring="java version "1.7.0_10"/>
|
|
195 <contains string="${version-output}" substring="java version "1.7.0_11"/>
|
|
196 <contains string="${version-output}" substring="java version "1.7.0_12"/>
|
|
197 <contains string="${version-output}" substring="java version "1.7.0_13"/>
|
|
198 </or>
|
|
199 </condition>
|
|
200 <property name="jdk-version-checked-in-jfximpl" value="true"/>
|
|
201 <echo message="have-jdk-7u4or5-mac = ${have-jdk-7u4or5-mac}" level="verbose"/>
|
|
202 <echo message="have-jdk-pre7u6 = ${have-jdk-pre7u6}" level="verbose"/>
|
|
203 <echo message="have-jdk-pre7u14 = ${have-jdk-pre7u14}" level="verbose"/>
|
|
204 </target>
|
|
205
|
|
206 <target name="-check-ant-jre-version" unless="ant-jre-version-checked-in-jfximpl">
|
|
207 <local name="version-output"/>
|
|
208 <exec executable="${java.home}${file.separator}bin${file.separator}java" outputproperty="version-output">
|
|
209 <arg value="-version"/>
|
|
210 </exec>
|
|
211 <echo message="version-output:${line.separator}${version-output}" level="verbose"/>
|
|
212 <condition property="have-ant-jre-pre7u6">
|
|
213 <or>
|
|
214 <contains string="${version-output}" substring="java version "1.0"/>
|
|
215 <contains string="${version-output}" substring="java version "1.1"/>
|
|
216 <contains string="${version-output}" substring="java version "1.2"/>
|
|
217 <contains string="${version-output}" substring="java version "1.3"/>
|
|
218 <contains string="${version-output}" substring="java version "1.4"/>
|
|
219 <contains string="${version-output}" substring="java version "1.5"/>
|
|
220 <contains string="${version-output}" substring="java version "1.6"/>
|
|
221 <contains string="${version-output}" substring="java version "1.7.0""/>
|
|
222 <contains string="${version-output}" substring="java version "1.7.0_01"/>
|
|
223 <contains string="${version-output}" substring="java version "1.7.0_02"/>
|
|
224 <contains string="${version-output}" substring="java version "1.7.0_03"/>
|
|
225 <contains string="${version-output}" substring="java version "1.7.0_04"/>
|
|
226 <contains string="${version-output}" substring="java version "1.7.0_05"/>
|
|
227 </or>
|
|
228 </condition>
|
|
229 <condition property="have-jdk7-css2bin-bug">
|
|
230 <!-- as of NB7.4 release date the external css-to-bss converter is unreliable in all JDK7 versions before 7u40 (with exception of 7u14)-->
|
|
231 <and>
|
|
232 <contains string="${version-output}" substring="java version "1.7"/>
|
|
233 <not><matches string="${version-output}" pattern="\bjava version "1\.7\.0_(14|[4-9].)"/></not>
|
|
234 </and>
|
|
235 </condition>
|
|
236 <property name="ant-jre-version-checked-in-jfximpl" value="true"/>
|
|
237 <echo message="have-ant-jre-pre7u6 = ${have-ant-jre-pre7u6}" level="verbose"/>
|
|
238 <echo message="have-jdk7-css2bin-bug = ${have-jdk7-css2bin-bug}" level="verbose"/>
|
|
239 </target>
|
|
240
|
|
241 <target name="-check-jdk-7u4or5-mac" depends="-check-jdk-version" if="have-jdk-7u4or5-mac">
|
|
242 <fail message="Error:${line.separator}JDK 7u4 Mac and 7u5 Mac do not support WebStart and JavaFX 2.0+ browser plugin technologies.${line.separator}Please upgrade to JDK 7u6 or later."/>
|
|
243 </target>
|
|
244
|
|
245
|
|
246 <!-- Check availability of JavaFX SDK deployment support (ant-javafx.jar) -->
|
|
247
|
|
248 <target name="-check-endorsed-javafx-ant-classpath">
|
|
249 <condition property="endorsed-javafx-ant-classpath-available">
|
|
250 <and>
|
|
251 <isset property="endorsed.javafx.ant.classpath"/>
|
|
252 <not>
|
|
253 <equals arg1="${endorsed.javafx.ant.classpath}" arg2=""/>
|
|
254 </not>
|
|
255 </and>
|
|
256 </condition>
|
|
257 <echo message="endorsed-javafx-ant-classpath-available = ${endorsed-javafx-ant-classpath-available}" level="verbose"/>
|
|
258 </target>
|
|
259
|
|
260 <target name="-check-property-javafx.sdk">
|
|
261 <echo message="javafx.sdk = ${javafx.sdk}" level="verbose"/>
|
|
262 <condition property="javafx.sdk.defined">
|
|
263 <and>
|
|
264 <isset property="javafx.sdk"/>
|
|
265 <not><contains string="${javafx.sdk}" substring="$${platform" casesensitive="false"/></not>
|
|
266 </and>
|
|
267 </condition>
|
|
268 <condition property="javafx.sdk.missing+default">
|
|
269 <and>
|
|
270 <equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/>
|
|
271 <not><isset property="javafx.sdk.defined"/></not>
|
|
272 </and>
|
|
273 </condition>
|
|
274 <condition property="javafx.sdk.missing-default">
|
|
275 <and>
|
|
276 <not><equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/></not>
|
|
277 <not><isset property="javafx.sdk.defined"/></not>
|
|
278 </and>
|
|
279 </condition>
|
|
280 <echo message="javafx.sdk.defined = ${javafx.sdk.defined}" level="verbose"/>
|
|
281 <echo message="javafx.sdk.missing+default = ${javafx.sdk.missing+default}" level="verbose"/>
|
|
282 <echo message="javafx.sdk.missing-default = ${javafx.sdk.missing-default}" level="verbose"/>
|
|
283 </target>
|
|
284
|
|
285 <target name="-check-ant-javafx-in-fxsdk-lib" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
286 <condition property="do.set.ant-javafx.in.fxsdk.lib">
|
|
287 <and>
|
|
288 <not><isset property="ant-javafx.jar.location"/></not>
|
|
289 <available file="${javafx.sdk}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
290 </and>
|
|
291 </condition>
|
|
292 </target>
|
|
293 <target name="-set-ant-javafx-in-fxsdk-lib" depends="-check-ant-javafx-in-fxsdk-lib" if="do.set.ant-javafx.in.fxsdk.lib">
|
|
294 <property name="ant-javafx.jar.location" value="${javafx.sdk}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
295 </target>
|
|
296 <target name="-check-ant-javafx-in-fxsdk-tools" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
297 <condition property="do.set.ant-javafx.in.fxsdk.tools">
|
|
298 <and>
|
|
299 <not><isset property="ant-javafx.jar.location"/></not>
|
|
300 <available file="${javafx.sdk}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
301 </and>
|
|
302 </condition>
|
|
303 </target>
|
|
304 <target name="-set-ant-javafx-in-fxsdk-tools" depends="-set-ant-javafx-in-fxsdk-lib,-check-ant-javafx-in-fxsdk-tools" if="do.set.ant-javafx.in.fxsdk.tools">
|
|
305 <property name="ant-javafx.jar.location" value="${javafx.sdk}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
306 </target>
|
|
307 <target name="-check-ant-javafx-in-platform-home-lib" if="platform.home">
|
|
308 <condition property="do.set.ant-javafx.in.platform.home.lib">
|
|
309 <and>
|
|
310 <not><isset property="ant-javafx.jar.location"/></not>
|
|
311 <available file="${platform.home}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
312 </and>
|
|
313 </condition>
|
|
314 </target>
|
|
315 <target name="-set-ant-javafx-in-platform-home-lib" depends="-set-ant-javafx-in-fxsdk-tools,-check-ant-javafx-in-platform-home-lib" if="do.set.ant-javafx.in.platform.home.lib">
|
|
316 <property name="ant-javafx.jar.location" value="${platform.home}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
317 </target>
|
|
318 <target name="-check-ant-javafx-in-platform-home-tools" if="platform.home">
|
|
319 <condition property="do.set.ant-javafx.in.platform.home.tools">
|
|
320 <and>
|
|
321 <not><isset property="ant-javafx.jar.location"/></not>
|
|
322 <available file="${platform.home}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
323 </and>
|
|
324 </condition>
|
|
325 </target>
|
|
326 <target name="-set-ant-javafx-in-platform-home-tools" depends="-set-ant-javafx-in-platform-home-lib,-check-ant-javafx-in-platform-home-tools" if="do.set.ant-javafx.in.platform.home.tools">
|
|
327 <property name="ant-javafx.jar.location" value="${platform.home}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
328 </target>
|
|
329 <target name="-check-ant-javafx-in-probjdk-lib" unless="ant-javafx.jar.location">
|
|
330 <condition property="do.set.ant-javafx.in.probjdk.lib.has_jre">
|
|
331 <available file="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
332 </condition>
|
|
333 <condition property="do.set.ant-javafx.in.probjdk.lib.no_jre">
|
|
334 <available file="${java.home}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
335 </condition>
|
|
336 <condition property="do.set.ant-javafx.in.probjdk.lib">
|
|
337 <and>
|
|
338 <not><isset property="ant-javafx.jar.location"/></not>
|
|
339 <or>
|
|
340 <isset property="do.set.ant-javafx.in.probjdk.lib.has_jre"/>
|
|
341 <isset property="do.set.ant-javafx.in.probjdk.lib.no_jre"/>
|
|
342 </or>
|
|
343 </and>
|
|
344 </condition>
|
|
345 </target>
|
|
346 <target name="-set-ant-javafx-in-probjdk-lib" depends="-set-ant-javafx-in-platform-home-tools,-check-ant-javafx-in-probjdk-lib" if="do.set.ant-javafx.in.probjdk.lib">
|
|
347 <condition property="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}lib${file.separator}ant-javafx.jar" else="${java.home}${file.separator}lib${file.separator}ant-javafx.jar">
|
|
348 <isset property="do.set.ant-javafx.in.probjdk.lib.has_jre"/>
|
|
349 </condition>
|
|
350 </target>
|
|
351 <target name="-check-ant-javafx-in-probjdk-tools" unless="ant-javafx.jar.location">
|
|
352 <condition property="do.set.ant-javafx.in.probjdk.tools.has_jre">
|
|
353 <available file="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
354 </condition>
|
|
355 <condition property="do.set.ant-javafx.in.probjdk.tools.no_jre">
|
|
356 <available file="${java.home}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
357 </condition>
|
|
358 <condition property="do.set.ant-javafx.in.probjdk.tools">
|
|
359 <and>
|
|
360 <not><isset property="ant-javafx.jar.location"/></not>
|
|
361 <or>
|
|
362 <isset property="do.set.ant-javafx.in.probjdk.tools.has_jre"/>
|
|
363 <isset property="do.set.ant-javafx.in.probjdk.tools.no_jre"/>
|
|
364 </or>
|
|
365 </and>
|
|
366 </condition>
|
|
367 </target>
|
|
368 <target name="-set-ant-javafx-in-probjdk-tools" depends="-set-ant-javafx-in-probjdk-lib,-check-ant-javafx-in-probjdk-tools" if="do.set.ant-javafx.in.probjdk.tools">
|
|
369 <condition property="ant-javafx.jar.location" value="${java.home}${file.separator}..${file.separator}tools${file.separator}ant-javafx.jar" else="${java.home}${file.separator}tools${file.separator}ant-javafx.jar">
|
|
370 <isset property="do.set.ant-javafx.in.probjdk.tools.has_jre"/>
|
|
371 </condition>
|
|
372 </target>
|
|
373 <target name="-check-ant-javafx-in-macjdk-lib" unless="ant-javafx.jar.location">
|
|
374 <condition property="do.set.ant-javafx.in.macjdk.lib">
|
|
375 <and>
|
|
376 <not><isset property="ant-javafx.jar.location"/></not>
|
|
377 <available file="${java.home}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
378 </and>
|
|
379 </condition>
|
|
380 </target>
|
|
381 <target name="-set-ant-javafx-in-macjdk-lib" depends="-set-ant-javafx-in-probjdk-tools,-check-ant-javafx-in-macjdk-lib" if="do.set.ant-javafx.in.macjdk.lib">
|
|
382 <property name="ant-javafx.jar.location" value="${java.home}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
383 </target>
|
|
384 <target name="-check-ant-javafx-in-envjdk-lib" unless="ant-javafx.jar.location">
|
|
385 <property environment="env"/>
|
|
386 <condition property="do.set.ant-javafx.in.envjdk.lib">
|
|
387 <and>
|
|
388 <not><isset property="ant-javafx.jar.location"/></not>
|
|
389 <available file="${env.JAVA_HOME}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
390 </and>
|
|
391 </condition>
|
|
392 </target>
|
|
393 <target name="-set-ant-javafx-in-envjdk-lib" depends="-set-ant-javafx-in-macjdk-lib,-check-ant-javafx-in-envjdk-lib" if="do.set.ant-javafx.in.envjdk.lib">
|
|
394 <property name="ant-javafx.jar.location" value="${env.JAVA_HOME}${file.separator}lib${file.separator}ant-javafx.jar"/>
|
|
395 </target>
|
|
396 <target name="-check-ant-javafx-in-envjdk-tools" unless="ant-javafx.jar.location">
|
|
397 <property environment="env"/>
|
|
398 <condition property="do.set.ant-javafx.in.envjdk.tools">
|
|
399 <and>
|
|
400 <not><isset property="ant-javafx.jar.location"/></not>
|
|
401 <available file="${env.JAVA_HOME}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
402 </and>
|
|
403 </condition>
|
|
404 </target>
|
|
405 <target name="-set-ant-javafx-in-envjdk-tools" depends="-set-ant-javafx-in-envjdk-lib,-check-ant-javafx-in-envjdk-tools" if="do.set.ant-javafx.in.envjdk.tools">
|
|
406 <property name="ant-javafx.jar.location" value="${env.JAVA_HOME}${file.separator}tools${file.separator}ant-javafx.jar"/>
|
|
407 </target>
|
|
408 <target name="-pre-check-ant-javafx-version" depends="-set-ant-javafx-in-envjdk-tools" unless="ant-javafx-version-already-checked-in-jfximpl">
|
|
409 <condition property="do.check.ant-javafx.version">
|
|
410 <and>
|
|
411 <isset property="ant-javafx.jar.location"/>
|
|
412 <not><isset property="ant-javafx-version-already-checked-in-jfximpl"/></not>
|
|
413 </and>
|
|
414 </condition>
|
|
415 </target>
|
|
416 <target name="-set-endorsed-javafx-ant-classpath" depends="-check-endorsed-javafx-ant-classpath,-pre-check-ant-javafx-version" if="endorsed-javafx-ant-classpath-available">
|
|
417 <property name="javafx.ant.classpath" value="${endorsed.javafx.ant.classpath}:${ant-javafx.jar.location}"/>
|
|
418 </target>
|
|
419 <target name="-set-javafx-ant-classpath" depends="-check-endorsed-javafx-ant-classpath,-pre-check-ant-javafx-version" unless="endorsed-javafx-ant-classpath-available">
|
|
420 <property name="javafx.ant.classpath" value="${ant-javafx.jar.location}"/>
|
|
421 </target>
|
|
422 <target name="-check-ant-javafx-version" depends="-pre-check-ant-javafx-version,
|
|
423 -set-endorsed-javafx-ant-classpath,-set-javafx-ant-classpath" if="do.check.ant-javafx.version">
|
|
424 <echo message="ant-javafx.jar.location = ${ant-javafx.jar.location}" level="verbose"/>
|
|
425 <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/>
|
|
426 <taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
|
|
427 uri="javafx:com.sun.javafx.tools.ant"
|
|
428 classpath="${javafx.ant.classpath}"/>
|
|
429 <condition property="have-fx-ant-init">
|
|
430 <typefound name="javafx:com.sun.javafx.tools.ant:init-ant"/>
|
|
431 </condition>
|
|
432 <property name="ant-javafx-version-already-checked-in-jfximpl" value="true"/>
|
|
433 <echo message="have-fx-ant-init = ${have-fx-ant-init}" level="verbose"/>
|
|
434 </target>
|
|
435 <target name="-check-jfx-sdk-version-old" depends="-check-ant-javafx-version" unless="have-fx-ant-init">
|
|
436 <property name="javafx.ant.version" value="1.0"/>
|
|
437 </target>
|
|
438 <target name="-check-jfx-sdk-version-new" depends="-check-ant-javafx-version" if="have-fx-ant-init">
|
|
439 <fx:init-ant/>
|
|
440 <condition property="have-fx-ant-api-1.1">
|
|
441 <!-- new features from JavaFX 2.0.2 are available in API version 1.1 or later -->
|
|
442 <matches pattern="1.[1-9]" string="${javafx.ant.version}"/>
|
|
443 </condition>
|
|
444 <condition property="have-fx-ant-api-1.2">
|
|
445 <!-- new features from JavaFX 2.2 are available in API version 1.2 or later -->
|
|
446 <matches pattern="1.[2-9]" string="${javafx.ant.version}"/>
|
|
447 </condition>
|
|
448 </target>
|
|
449 <target name="-check-jfx-sdk-version" depends="-check-jfx-sdk-version-old, -check-jfx-sdk-version-new" unless="jfx.sdk.version.checked">
|
|
450 <echo message="Detected JavaFX Ant API version ${javafx.ant.version}" level="info"/>
|
|
451 <echo message="have-fx-ant-api-1.1 = ${have-fx-ant-api-1.1}" level="verbose"/>
|
|
452 <echo message="have-fx-ant-api-1.2 = ${have-fx-ant-api-1.2}" level="verbose"/>
|
|
453 <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/>
|
|
454 <property name="jfx.sdk.version.checked" value="true"/>
|
|
455 </target>
|
|
456
|
|
457 <target name="-check-jfx-deployment" depends="-check-jdk-version,-check-jfx-sdk-version">
|
|
458 <condition property="jfx-deployment-available">
|
|
459 <and>
|
|
460 <or>
|
|
461 <isset property="do.set.ant-javafx.in.fxsdk.lib"/>
|
|
462 <isset property="do.set.ant-javafx.in.fxsdk.tools"/>
|
|
463 <isset property="do.set.ant-javafx.in.platform.home.lib"/>
|
|
464 <isset property="do.set.ant-javafx.in.platform.home.tools"/>
|
|
465 <isset property="do.set.ant-javafx.in.probjdk.lib"/>
|
|
466 <isset property="do.set.ant-javafx.in.probjdk.tools"/>
|
|
467 <isset property="do.set.ant-javafx.in.envjdk.lib"/>
|
|
468 <isset property="do.set.ant-javafx.in.envjdk.tools"/>
|
|
469 </or>
|
|
470 <isset property="ant-javafx.jar.location"/>
|
|
471 </and>
|
|
472 </condition>
|
|
473 <condition property="jfx-deployment-missing+jdk7u6">
|
|
474 <and>
|
|
475 <not><isset property="jfx-deployment-available"/></not>
|
|
476 <not><isset property="have-jdk-pre7u6"/></not>
|
|
477 </and>
|
|
478 </condition>
|
|
479 <condition property="jfx-deployment-missing+javafx.sdk.missing+default">
|
|
480 <and>
|
|
481 <not><isset property="jfx-deployment-available"/></not>
|
|
482 <isset property="have-jdk-pre7u6"/>
|
|
483 <isset property="javafx.sdk.missing+default"/>
|
|
484 </and>
|
|
485 </condition>
|
|
486 <condition property="jfx-deployment-missing+javafx.sdk.missing-default">
|
|
487 <and>
|
|
488 <not><isset property="jfx-deployment-available"/></not>
|
|
489 <isset property="have-jdk-pre7u6"/>
|
|
490 <isset property="javafx.sdk.missing-default"/>
|
|
491 </and>
|
|
492 </condition>
|
|
493 <fail message="Error:${line.separator}JavaFX deployment library not found in active JDK.${line.separator}Please check that the JDK is correctly installed and its version is at least 7u4 on Mac or 7u6 on other systems." if="jfx-deployment-missing+jdk7u6"/>
|
|
494 <fail message="Error:${line.separator}JavaFX deployment library not found.${line.separator}JavaFX SDK path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.sdk in project.properties file).${line.separator}Note: If missing, the default JavaFX-enabled platform gets created automatically when creating a new JavaFX Project." if="jfx-deployment-missing+javafx.sdk.missing+default"/>
|
|
495 <fail message="Error:${line.separator}JavaFX deployment library not found.${line.separator}JavaFX SDK path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.sdk in project.properties file)." if="jfx-deployment-missing+javafx.sdk.missing-default"/>
|
|
496 <fail message="Error:${line.separator}JavaFX deployment library not found." unless="jfx-deployment-available"/>
|
|
497 <echo message="jfx-deployment-available = ${jfx-deployment-available}" level="verbose"/>
|
|
498 </target>
|
|
499
|
|
500
|
|
501 <!-- Check availability of main JavaFX runtime jar (jfxrt.jar) -->
|
|
502
|
|
503 <target name="-check-property-javafx.runtime">
|
|
504 <echo message="javafx.runtime = ${javafx.runtime}" level="verbose"/>
|
|
505 <condition property="javafx.runtime.defined">
|
|
506 <and>
|
|
507 <isset property="javafx.runtime"/>
|
|
508 <not><contains string="${javafx.runtime}" substring="$${platform" casesensitive="false"/></not>
|
|
509 </and>
|
|
510 </condition>
|
|
511 <condition property="javafx.runtime.missing+default">
|
|
512 <and>
|
|
513 <equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/>
|
|
514 <not><isset property="javafx.runtime.defined"/></not>
|
|
515 </and>
|
|
516 </condition>
|
|
517 <condition property="javafx.runtime.missing-default">
|
|
518 <and>
|
|
519 <not><equals arg1="${platform.active}" arg2="Default_JavaFX_Platform" trim="true"/></not>
|
|
520 <not><isset property="javafx.runtime.defined"/></not>
|
|
521 </and>
|
|
522 </condition>
|
|
523 <echo message="javafx.runtime.defined = ${javafx.runtime.defined}" level="verbose"/>
|
|
524 <echo message="javafx.runtime.missing+default = ${javafx.runtime.missing+default}" level="verbose"/>
|
|
525 <echo message="javafx.runtime.missing-default = ${javafx.runtime.missing-default}" level="verbose"/>
|
|
526 </target>
|
|
527
|
|
528 <target name="-check-jfxrt-in-fxrt" depends="-check-property-javafx.runtime" if="javafx.runtime.defined">
|
|
529 <condition property="do.set.jfxrt.in.fxrt.old">
|
|
530 <and>
|
|
531 <not><isset property="jfxrt.jar.location"/></not>
|
|
532 <available file="${javafx.runtime}${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
533 </and>
|
|
534 </condition>
|
|
535 <condition property="do.set.jfxrt.in.fxrt.new">
|
|
536 <and>
|
|
537 <not><isset property="do.set.jfxrt.in.fxrt.old"/></not>
|
|
538 <not><isset property="jfxrt.jar.location"/></not>
|
|
539 <available file="${javafx.runtime}${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
540 </and>
|
|
541 </condition>
|
|
542 </target>
|
|
543 <target name="-set-jfxrt-in-fxrt-old" depends="-check-jfxrt-in-fxrt" if="do.set.jfxrt.in.fxrt.old">
|
|
544 <property name="jfxrt.jar.location" value="${javafx.runtime}${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
545 </target>
|
|
546 <target name="-set-jfxrt-in-fxrt-new" depends="-set-jfxrt-in-fxrt-old,-check-jfxrt-in-fxrt" if="do.set.jfxrt.in.fxrt.new">
|
|
547 <property name="jfxrt.jar.location" value="${javafx.runtime}${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
548 </target>
|
|
549 <target name="-check-jfxrt-in-fxsdk-jre" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
550 <condition property="do.set.jfxrt.in.fxsdk.jre.old">
|
|
551 <and>
|
|
552 <not><isset property="jfxrt.jar.location"/></not>
|
|
553 <available file="${javafx.sdk}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
554 </and>
|
|
555 </condition>
|
|
556 <condition property="do.set.jfxrt.in.fxsdk.jre.new">
|
|
557 <and>
|
|
558 <not><isset property="do.set.jfxrt.in.fxsdk.jre.old"/></not>
|
|
559 <not><isset property="jfxrt.jar.location"/></not>
|
|
560 <available file="${javafx.sdk}${file.separator}jre${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
561 </and>
|
|
562 </condition>
|
|
563 </target>
|
|
564 <target name="-set-jfxrt-in-fxsdk-jre-old" depends="-set-jfxrt-in-fxrt-new,-check-jfxrt-in-fxsdk-jre" if="do.set.jfxrt.in.fxsdk.jre.old">
|
|
565 <property name="jfxrt.jar.location" value="${javafx.sdk}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
566 </target>
|
|
567 <target name="-set-jfxrt-in-fxsdk-jre-new" depends="-set-jfxrt-in-fxsdk-jre-old,-check-jfxrt-in-fxsdk-jre" if="do.set.jfxrt.in.fxsdk.jre.new">
|
|
568 <property name="jfxrt.jar.location" value="${javafx.sdk}${file.separator}jre${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
569 </target>
|
|
570 <target name="-check-jfxrt-in-fxsdk-rt" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
571 <condition property="do.set.jfxrt.in.fxsdk.rt.old">
|
|
572 <and>
|
|
573 <not><isset property="jfxrt.jar.location"/></not>
|
|
574 <available file="${javafx.sdk}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
575 </and>
|
|
576 </condition>
|
|
577 <condition property="do.set.jfxrt.in.fxsdk.rt.new">
|
|
578 <and>
|
|
579 <not><isset property="do.set.jfxrt.in.fxsdk.rt.old"/></not>
|
|
580 <not><isset property="jfxrt.jar.location"/></not>
|
|
581 <available file="${javafx.sdk}${file.separator}rt${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
582 </and>
|
|
583 </condition>
|
|
584 </target>
|
|
585 <target name="-set-jfxrt-in-fxsdk-rt-old" depends="-set-jfxrt-in-fxsdk-jre-new,-check-jfxrt-in-fxsdk-rt" if="do.set.jfxrt.in.fxsdk.rt.old">
|
|
586 <property name="jfxrt.jar.location" value="${javafx.sdk}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
587 </target>
|
|
588 <target name="-set-jfxrt-in-fxsdk-rt-new" depends="-set-jfxrt-in-fxsdk-rt-old,-check-jfxrt-in-fxsdk-rt" if="do.set.jfxrt.in.fxsdk.rt.new">
|
|
589 <property name="jfxrt.jar.location" value="${javafx.sdk}${file.separator}rt${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
590 </target>
|
|
591 <target name="-check-jfxrt-in-platform-home-jre" if="platform.home">
|
|
592 <condition property="do.set.jfxrt.in.platform.home.jre.old">
|
|
593 <and>
|
|
594 <not><isset property="jfxrt.jar.location"/></not>
|
|
595 <available file="${platform.home}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
596 </and>
|
|
597 </condition>
|
|
598 <condition property="do.set.jfxrt.in.platform.home.jre.new">
|
|
599 <and>
|
|
600 <not><isset property="do.set.jfxrt.in.platform.home.jre.old"/></not>
|
|
601 <not><isset property="jfxrt.jar.location"/></not>
|
|
602 <available file="${platform.home}${file.separator}jre${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
603 </and>
|
|
604 </condition>
|
|
605 </target>
|
|
606 <target name="-set-jfxrt-in-platform-home-jre-old" depends="-set-jfxrt-in-fxsdk-rt-new,-check-jfxrt-in-platform-home-jre" if="do.set.jfxrt.in.platform.home.jre.old">
|
|
607 <property name="jfxrt.jar.location" value="${platform.home}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
608 </target>
|
|
609 <target name="-set-jfxrt-in-platform-home-jre-new" depends="-set-jfxrt-in-platform-home-jre-old,-check-jfxrt-in-platform-home-jre" if="do.set.jfxrt.in.platform.home.jre.new">
|
|
610 <property name="jfxrt.jar.location" value="${platform.home}${file.separator}jre${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
611 </target>
|
|
612 <target name="-check-jfxrt-in-platform-home-rt" if="platform.home">
|
|
613 <condition property="do.set.jfxrt.in.platform.home.rt.old">
|
|
614 <and>
|
|
615 <not><isset property="jfxrt.jar.location"/></not>
|
|
616 <available file="${platform.home}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
617 </and>
|
|
618 </condition>
|
|
619 <condition property="do.set.jfxrt.in.platform.home.rt.new">
|
|
620 <and>
|
|
621 <not><isset property="do.set.jfxrt.in.platform.home.rt.old"/></not>
|
|
622 <not><isset property="jfxrt.jar.location"/></not>
|
|
623 <available file="${platform.home}${file.separator}rt${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
624 </and>
|
|
625 </condition>
|
|
626 </target>
|
|
627 <target name="-set-jfxrt-in-platform-home-rt-old" depends="-set-jfxrt-in-platform-home-jre-new,-check-jfxrt-in-platform-home-rt" if="do.set.jfxrt.in.platform.home.rt.old">
|
|
628 <property name="jfxrt.jar.location" value="${platform.home}${file.separator}rt${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
629 </target>
|
|
630 <target name="-set-jfxrt-in-platform-home-rt-new" depends="-set-jfxrt-in-platform-home-rt-old,-check-jfxrt-in-platform-home-rt" if="do.set.jfxrt.in.platform.home.rt.new">
|
|
631 <property name="jfxrt.jar.location" value="${platform.home}${file.separator}rt${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
632 </target>
|
|
633 <target name="-check-jfxrt-in-jre" unless="jfxrt.jar.location">
|
|
634 <condition property="do.set.jfxrt.in.jre.old">
|
|
635 <and>
|
|
636 <not><isset property="jfxrt.jar.location"/></not>
|
|
637 <available file="${java.home}${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
638 </and>
|
|
639 </condition>
|
|
640 <condition property="do.set.jfxrt.in.jre.new">
|
|
641 <and>
|
|
642 <not><isset property="do.set.jfxrt.in.jre.old"/></not>
|
|
643 <not><isset property="jfxrt.jar.location"/></not>
|
|
644 <available file="${java.home}${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
645 </and>
|
|
646 </condition>
|
|
647 </target>
|
|
648 <target name="-set-jfxrt-in-jre-old" depends="-set-jfxrt-in-platform-home-rt-new,-check-jfxrt-in-jre" if="do.set.jfxrt.in.jre.old">
|
|
649 <property name="jfxrt.jar.location" value="${java.home}${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
650 </target>
|
|
651 <target name="-set-jfxrt-in-jre-new" depends="-set-jfxrt-in-jre-old,-check-jfxrt-in-jre" if="do.set.jfxrt.in.jre.new">
|
|
652 <property name="jfxrt.jar.location" value="${java.home}${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
653 </target>
|
|
654 <target name="-check-jfxrt-in-envjdk-jre" unless="jfxrt.jar.location">
|
|
655 <property environment="env"/>
|
|
656 <condition property="do.set.jfxrt.in.envjdk.jre.old">
|
|
657 <and>
|
|
658 <not><isset property="jfxrt.jar.location"/></not>
|
|
659 <available file="${env.JAVA_HOME}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
660 </and>
|
|
661 </condition>
|
|
662 <condition property="do.set.jfxrt.in.envjdk.jre.new">
|
|
663 <and>
|
|
664 <not><isset property="do.set.jfxrt.in.envjdk.jre.old"/></not>
|
|
665 <not><isset property="jfxrt.jar.location"/></not>
|
|
666 <available file="${env.JAVA_HOME}${file.separator}jre${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
667 </and>
|
|
668 </condition>
|
|
669 </target>
|
|
670 <target name="-set-jfxrt-in-envjdk-jre-old" depends="-set-jfxrt-in-jre-new,-check-jfxrt-in-envjdk-jre" if="do.set.jfxrt.in.envjdk.jre.old">
|
|
671 <property name="jfxrt.jar.location" value="${env.JAVA_HOME}${file.separator}jre${file.separator}lib${file.separator}jfxrt.jar"/>
|
|
672 </target>
|
|
673 <target name="-set-jfxrt-in-envjdk-jre-new" depends="-set-jfxrt-in-envjdk-jre-old,-check-jfxrt-in-envjdk-jre" if="do.set.jfxrt.in.envjdk.jre.new">
|
|
674 <property name="jfxrt.jar.location" value="${env.JAVA_HOME}${file.separator}jre${file.separator}lib${file.separator}ext${file.separator}jfxrt.jar"/>
|
|
675 </target>
|
|
676 <target name="-pre-check-jfx-runtime" depends="-set-jfxrt-in-envjdk-jre-new">
|
|
677 <echo message="jfxrt.jar.location = ${jfxrt.jar.location}" level="verbose"/>
|
|
678 </target>
|
|
679
|
|
680 <target name="-check-jfx-runtime" depends="-check-jdk-version, -pre-check-jfx-runtime">
|
|
681 <condition property="jfx-runtime-available">
|
|
682 <and>
|
|
683 <or>
|
|
684 <isset property="do.set.jfxrt.in.fxrt.old"/>
|
|
685 <isset property="do.set.jfxrt.in.fxrt.new"/>
|
|
686 <isset property="do.set.jfxrt.in.fxsdk.jre.old"/>
|
|
687 <isset property="do.set.jfxrt.in.fxsdk.jre.new"/>
|
|
688 <isset property="do.set.jfxrt.in.fxsdk.rt.old"/>
|
|
689 <isset property="do.set.jfxrt.in.fxsdk.rt.new"/>
|
|
690 <isset property="do.set.jfxrt.in.platform.home.jre.old"/>
|
|
691 <isset property="do.set.jfxrt.in.platform.home.jre.new"/>
|
|
692 <isset property="do.set.jfxrt.in.platform.home.rt.old"/>
|
|
693 <isset property="do.set.jfxrt.in.platform.home.rt.new"/>
|
|
694 <isset property="do.set.jfxrt.in.jre.old"/>
|
|
695 <isset property="do.set.jfxrt.in.jre.new"/>
|
|
696 <isset property="do.set.jfxrt.in.envjdk.jre.old"/>
|
|
697 <isset property="do.set.jfxrt.in.envjdk.jre.new"/>
|
|
698 </or>
|
|
699 <isset property="jfxrt.jar.location"/>
|
|
700 </and>
|
|
701 </condition>
|
|
702 <fail message="Error:${line.separator}JavaFX runtime JAR not found." unless="jfx-runtime-available"/>
|
|
703 <echo message="jfx-runtime-available = ${jfx-runtime-available}" level="verbose"/>
|
|
704 </target>
|
|
705
|
|
706
|
|
707 <!-- Check availability of WebStart executable -->
|
|
708
|
|
709 <target name="-check-webstart-in-fxrt" depends="-check-property-javafx.runtime" if="javafx.runtime.defined">
|
|
710 <condition property="do.set.webstart.in.fxrt">
|
|
711 <and>
|
|
712 <not><isset property="active.webstart.executable"/></not>
|
|
713 <isset property="javafx.runtime.defined"/>
|
|
714 <or>
|
|
715 <available file="${javafx.runtime}${file.separator}bin${file.separator}javaws.exe"/>
|
|
716 <available file="${javafx.runtime}${file.separator}bin${file.separator}javaws"/>
|
|
717 </or>
|
|
718 </and>
|
|
719 </condition>
|
|
720 </target>
|
|
721 <target name="-set-webstart-in-fxrt" depends="-check-webstart-in-fxrt" if="do.set.webstart.in.fxrt">
|
|
722 <property name="active.webstart.executable" value="${javafx.runtime}${file.separator}bin${file.separator}javaws"/>
|
|
723 </target>
|
|
724 <target name="-check-webstart-in-fxsdk-jre" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
725 <condition property="do.set.webstart.in.fxsdk.jre">
|
|
726 <and>
|
|
727 <not><isset property="active.webstart.executable"/></not>
|
|
728 <isset property="javafx.sdk.defined"/>
|
|
729 <or>
|
|
730 <available file="${javafx.sdk}${file.separator}jre${file.separator}bin${file.separator}javaws.exe"/>
|
|
731 <available file="${javafx.sdk}${file.separator}jre${file.separator}bin${file.separator}javaws"/>
|
|
732 </or>
|
|
733 </and>
|
|
734 </condition>
|
|
735 </target>
|
|
736 <target name="-set-webstart-in-fxsdk-jre" depends="-set-webstart-in-fxrt,-check-webstart-in-fxsdk-jre" if="do.set.webstart.in.fxsdk.jre">
|
|
737 <property name="active.webstart.executable" value="${javafx.sdk}${file.separator}jre${file.separator}bin${file.separator}javaws"/>
|
|
738 </target>
|
|
739 <target name="-check-webstart-in-fxsdk" depends="-check-property-javafx.sdk" if="javafx.sdk.defined">
|
|
740 <condition property="do.set.webstart.in.fxsdk">
|
|
741 <and>
|
|
742 <not><isset property="active.webstart.executable"/></not>
|
|
743 <isset property="javafx.sdk.defined"/>
|
|
744 <or>
|
|
745 <available file="${javafx.sdk}${file.separator}bin${file.separator}javaws.exe"/>
|
|
746 <available file="${javafx.sdk}${file.separator}bin${file.separator}javaws"/>
|
|
747 </or>
|
|
748 </and>
|
|
749 </condition>
|
|
750 </target>
|
|
751 <target name="-set-webstart-in-fxsdk" depends="-set-webstart-in-fxsdk-jre,-check-webstart-in-fxsdk" if="do.set.webstart.in.fxsdk">
|
|
752 <property name="active.webstart.executable" value="${javafx.sdk}${file.separator}bin${file.separator}javaws"/>
|
|
753 </target>
|
|
754 <target name="-check-webstart-in-platform-home-jre" if="platform.home">
|
|
755 <condition property="do.set.webstart.in.platform.home.jre">
|
|
756 <and>
|
|
757 <not><isset property="active.webstart.executable"/></not>
|
|
758 <or>
|
|
759 <available file="${platform.home}${file.separator}jre${file.separator}bin${file.separator}javaws.exe"/>
|
|
760 <available file="${platform.home}${file.separator}jre${file.separator}bin${file.separator}javaws"/>
|
|
761 </or>
|
|
762 </and>
|
|
763 </condition>
|
|
764 </target>
|
|
765 <target name="-set-webstart-in-platform-home-jre" depends="-set-webstart-in-fxsdk,-check-webstart-in-platform-home-jre" if="do.set.webstart.in.platform.home.jre">
|
|
766 <property name="active.webstart.executable" value="${platform.home}${file.separator}jre${file.separator}bin${file.separator}javaws"/>
|
|
767 </target>
|
|
768 <target name="-check-webstart-in-platform-home" if="platform.home">
|
|
769 <condition property="do.set.webstart.in.platform.home">
|
|
770 <and>
|
|
771 <not><isset property="active.webstart.executable"/></not>
|
|
772 <or>
|
|
773 <available file="${platform.home}${file.separator}bin${file.separator}javaws.exe"/>
|
|
774 <available file="${platform.home}${file.separator}bin${file.separator}javaws"/>
|
|
775 </or>
|
|
776 </and>
|
|
777 </condition>
|
|
778 </target>
|
|
779 <target name="-set-webstart-in-platform-home" depends="-set-webstart-in-platform-home-jre,-check-webstart-in-platform-home" if="do.set.webstart.in.platform.home">
|
|
780 <property name="active.webstart.executable" value="${platform.home}${file.separator}bin${file.separator}javaws"/>
|
|
781 </target>
|
|
782 <target name="-check-webstart-in-jre" unless="active.webstart.executable">
|
|
783 <condition property="do.set.webstart.in.jre">
|
|
784 <and>
|
|
785 <not><isset property="active.webstart.executable"/></not>
|
|
786 <or>
|
|
787 <available file="${java.home}${file.separator}bin${file.separator}javaws.exe"/>
|
|
788 <available file="${java.home}${file.separator}bin${file.separator}javaws"/>
|
|
789 </or>
|
|
790 </and>
|
|
791 </condition>
|
|
792 </target>
|
|
793 <target name="-set-webstart-in-jre" depends="-set-webstart-in-platform-home,-check-webstart-in-jre" if="do.set.webstart.in.jre">
|
|
794 <property name="active.webstart.executable" value="${java.home}${file.separator}bin${file.separator}javaws"/>
|
|
795 </target>
|
|
796 <target name="-check-webstart-in-probjdk" unless="active.webstart.executable">
|
|
797 <condition property="do.set.webstart.in.probjdk">
|
|
798 <and>
|
|
799 <not><isset property="active.webstart.executable"/></not>
|
|
800 <or>
|
|
801 <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}javaws.exe"/>
|
|
802 <available file="${java.home}${file.separator}..${file.separator}bin${file.separator}javaws"/>
|
|
803 </or>
|
|
804 </and>
|
|
805 </condition>
|
|
806 </target>
|
|
807 <target name="-set-webstart-in-probjdk" depends="-set-webstart-in-jre,-check-webstart-in-probjdk" if="do.set.webstart.in.probjdk">
|
|
808 <property name="active.webstart.executable" value="${java.home}${file.separator}..${file.separator}bin${file.separator}javaws"/>
|
|
809 </target>
|
|
810 <target name="-check-webstart-in-envjdk" unless="active.webstart.executable">
|
|
811 <property environment="env"/>
|
|
812 <condition property="do.set.webstart.in.envjdk">
|
|
813 <and>
|
|
814 <not><isset property="active.webstart.executable"/></not>
|
|
815 <or>
|
|
816 <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}javaws.exe"/>
|
|
817 <available file="${env.JAVA_HOME}${file.separator}bin${file.separator}javaws"/>
|
|
818 </or>
|
|
819 </and>
|
|
820 </condition>
|
|
821 </target>
|
|
822 <target name="-set-webstart-in-envjdk" depends="-set-webstart-in-probjdk,-check-webstart-in-envjdk" if="do.set.webstart.in.envjdk">
|
|
823 <property name="active.webstart.executable" value="${env.JAVA_HOME}${file.separator}bin${file.separator}javaws"/>
|
|
824 </target>
|
|
825 <target name="-pre-check-webstart-in-unix" depends="-check-operating-system,-set-webstart-in-envjdk" unless="active.webstart.executable">
|
|
826 <condition property="running.on.unix-active.webstart.executable">
|
|
827 <and>
|
|
828 <not><isset property="active.webstart.executable"/></not>
|
|
829 <isset property="running.on.unix"/>
|
|
830 </and>
|
|
831 </condition>
|
|
832 </target>
|
|
833 <target name="-check-webstart-in-unix" depends="-pre-check-webstart-in-unix" if="running.on.unix-active.webstart.executable">
|
|
834 <local name="exec.which.javaws.result"/>
|
|
835 <exec executable="command" failifexecutionfails="false" failonerror="false" resultproperty="exec.which.javaws.result" outputproperty="exec.which.javaws.output">
|
|
836 <arg line="-v javaws"/>
|
|
837 </exec>
|
|
838 <condition property="do.set.webstart.in.unix">
|
|
839 <and>
|
|
840 <not><isset property="active.webstart.executable"/></not>
|
|
841 <isset property="exec.which.javaws.result"/>
|
|
842 <equals arg1="${exec.which.javaws.result}" arg2="0"/>
|
|
843 <isset property="exec.which.javaws.output"/>
|
|
844 <not><equals arg1="${exec.which.javaws.output}" arg2=""/></not>
|
|
845 </and>
|
|
846 </condition>
|
|
847 <echo message="do.set.webstart.in.unix = ${do.set.webstart.in.unix}" level="verbose"/>
|
|
848 </target>
|
|
849 <target name="-set-webstart-in-unix" depends="-set-webstart-in-envjdk,-check-webstart-in-unix" if="do.set.webstart.in.unix">
|
|
850 <property name="active.webstart.executable" value="${exec.which.javaws.output}"/>
|
|
851 </target>
|
|
852 <target name="-pre-check-jfx-webstart" depends="-set-webstart-in-unix">
|
|
853 <echo message="active.webstart.executable = ${active.webstart.executable}" level="verbose"/>
|
|
854 </target>
|
|
855
|
|
856 <target name="-check-jfx-webstart" depends="-pre-check-jfx-webstart">
|
|
857 <condition property="jfx-webstart-available">
|
|
858 <and>
|
|
859 <or>
|
|
860 <isset property="do.set.webstart.in.fxrt"/>
|
|
861 <isset property="do.set.webstart.in.fxsdk.jre"/>
|
|
862 <isset property="do.set.webstart.in.fxsdk"/>
|
|
863 <isset property="do.set.webstart.in.platform.home.jre"/>
|
|
864 <isset property="do.set.webstart.in.platform.home"/>
|
|
865 <isset property="do.set.webstart.in.jre"/>
|
|
866 <isset property="do.set.webstart.in.probjdk"/>
|
|
867 <isset property="do.set.webstart.in.envjdk"/>
|
|
868 <isset property="do.set.webstart.in.unix"/>
|
|
869 </or>
|
|
870 <isset property="active.webstart.executable"/>
|
|
871 </and>
|
|
872 </condition>
|
|
873 <condition property="jfx-webstart-missing+jdk7u6">
|
|
874 <and>
|
|
875 <not><isset property="jfx-webstart-available"/></not>
|
|
876 <not><isset property="have-jdk-pre7u6"/></not>
|
|
877 </and>
|
|
878 </condition>
|
|
879 <condition property="jfx-webstart-missing+javafx.runtime.missing+default">
|
|
880 <and>
|
|
881 <not><isset property="jfx-webstart-available"/></not>
|
|
882 <isset property="have-jdk-pre7u6"/>
|
|
883 <isset property="javafx.runtime.missing+default"/>
|
|
884 </and>
|
|
885 </condition>
|
|
886 <condition property="jfx-webstart-missing+javafx.runtime.missing-default">
|
|
887 <and>
|
|
888 <not><isset property="jfx-webstart-available"/></not>
|
|
889 <isset property="have-jdk-pre7u6"/>
|
|
890 <isset property="javafx.runtime.missing-default"/>
|
|
891 </and>
|
|
892 </condition>
|
|
893 <fail message="Error:${line.separator}WebStart executable could not be found in active JDK.${line.separator}Please check that the JDK is correctly installed and its version is at least 7u6." if="jfx-webstart-missing+jdk7u6"/>
|
|
894 <fail message="Error:${line.separator}WebStart executable could not be found.${line.separator}JavaFX RT path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.runtime in project.properties file).${line.separator}Note: If missing, the default JavaFX-enabled platform gets created automatically when creating a new JavaFX Project." if="jfx-webstart-missing+javafx.runtime.missing+default"/>
|
|
895 <fail message="Error:${line.separator}WebStart executable could not be found.${line.separator}JavaFX RT path undefined. Check the definition of ${platform.active} in Java Platform Manager${line.separator}(or directly the properties platform.active and javafx.runtime in project.properties file)." if="jfx-webstart-missing+javafx.runtime.missing-default"/>
|
|
896 <fail message="Error:${line.separator}WebStart executable could not be found." unless="jfx-webstart-available"/>
|
|
897 <echo message="jfx-webstart-available = ${jfx-webstart-available}" level="verbose"/>
|
|
898 </target>
|
|
899
|
|
900
|
|
901 <!-- Legacy targets kept for compatibility with older build-impl.xml scripts -->
|
|
902
|
|
903 <!-- Note: target "-check-javafx" is not necessary any more but is referenced from NB 7.1 build-impl.xml -->
|
|
904 <target name="-check-javafx"/>
|
|
905 <!-- Note: target "-javafx-check-error" is not necessary any more but is referenced from NB 7.1 build-impl.xml -->
|
|
906 <target name="-javafx-check-error"/>
|
|
907 <!-- Note: target "-init-javafx" is not necessary any more but is referenced from NB 7.1 build-impl.xml -->
|
|
908 <target name="-init-javafx"/>
|
|
909
|
|
910
|
|
911 <!-- Check project properties -->
|
|
912
|
|
913 <target name="-check-default-run-config" unless="config">
|
|
914 <property name="config" value="<default config>"/>
|
|
915 </target>
|
|
916
|
|
917 <target name="-check-project">
|
|
918 <condition property="main-class-available">
|
|
919 <isset property="javafx.main.class"/>
|
|
920 </condition>
|
|
921 <condition property="vmargs-available">
|
|
922 <and>
|
|
923 <isset property="run.jvmargs"/>
|
|
924 <not><equals arg1="${run.jvmargs}" arg2=""/></not>
|
|
925 </and>
|
|
926 </condition>
|
|
927 <condition property="preloader-available">
|
|
928 <and>
|
|
929 <isset property="javafx.preloader.enabled"/>
|
|
930 <equals arg1="${javafx.preloader.enabled}" arg2="true"/>
|
|
931 <isset property="javafx.preloader.class"/>
|
|
932 <not><equals arg1="${javafx.preloader.class}" arg2=""/></not>
|
|
933 <isset property="javafx.preloader.jar.filename"/>
|
|
934 <not><equals arg1="${javafx.preloader.jar.filename}" arg2=""/></not>
|
|
935 </and>
|
|
936 </condition>
|
|
937 <condition property="app-with-preloader">
|
|
938 <and>
|
|
939 <istrue value="${preloader-available}"/>
|
|
940 <istrue value="${main-class-available}"/>
|
|
941 </and>
|
|
942 </condition>
|
|
943 <condition property="app-with-external-preloader-jar">
|
|
944 <and>
|
|
945 <isset property="app-with-preloader"/>
|
|
946 <isset property="javafx.preloader.type"/>
|
|
947 <equals arg1="${javafx.preloader.type}" arg2="jar" trim="true"/>
|
|
948 </and>
|
|
949 </condition>
|
|
950 <condition property="app-without-preloader">
|
|
951 <and>
|
|
952 <not>
|
|
953 <istrue value="${preloader-available}"/>
|
|
954 </not>
|
|
955 <istrue value="${main-class-available}"/>
|
|
956 </and>
|
|
957 </condition>
|
|
958 <condition property="preloader-app">
|
|
959 <and>
|
|
960 <isset property="javafx.preloader"/>
|
|
961 <equals arg1="${javafx.preloader}" arg2="true"/>
|
|
962 </and>
|
|
963 </condition>
|
|
964 <condition property="fx-in-swing-app">
|
|
965 <and>
|
|
966 <isset property="javafx.swing"/>
|
|
967 <equals arg1="${javafx.swing}" arg2="true"/>
|
|
968 </and>
|
|
969 </condition>
|
|
970 <condition property="fx-in-swing-workaround-app">
|
|
971 <and>
|
|
972 <istrue value="${fx-in-swing-app}"/>
|
|
973 <istrue value="${preloader-app}"/>
|
|
974 </and>
|
|
975 </condition>
|
|
976 <condition property="preloader-app-no-workaround">
|
|
977 <and>
|
|
978 <istrue value="${preloader-app}"/>
|
|
979 <not><istrue value="${fx-in-swing-app}"/></not>
|
|
980 </and>
|
|
981 </condition>
|
|
982 <condition property="html-template-available">
|
|
983 <and>
|
|
984 <isset property="javafx.run.htmltemplate"/>
|
|
985 <not>
|
|
986 <equals arg1="${javafx.run.htmltemplate}" arg2=""/>
|
|
987 </not>
|
|
988 </and>
|
|
989 </condition>
|
|
990 <condition property="icon-available">
|
|
991 <and>
|
|
992 <isset property="javafx.deploy.icon"/>
|
|
993 <not>
|
|
994 <equals arg1="${javafx.deploy.icon}" arg2=""/>
|
|
995 </not>
|
|
996 </and>
|
|
997 </condition>
|
|
998 <condition property="dimensions-available">
|
|
999 <and>
|
|
1000 <isset property="javafx.run.width"/>
|
|
1001 <isset property="javafx.run.height"/>
|
|
1002 <not><equals arg1="${javafx.run.width}" arg2=""/></not>
|
|
1003 <not><equals arg1="${javafx.run.height}" arg2=""/></not>
|
|
1004 </and>
|
|
1005 </condition>
|
|
1006 <condition property="update-mode-background">
|
|
1007 <and>
|
|
1008 <isset property="javafx.deploy.backgroundupdate"/>
|
|
1009 <equals arg1="${javafx.deploy.backgroundupdate}" arg2="true" trim="true"/>
|
|
1010 </and>
|
|
1011 </condition>
|
|
1012 <condition property="offline-allowed">
|
|
1013 <and>
|
|
1014 <isset property="javafx.deploy.allowoffline"/>
|
|
1015 <equals arg1="${javafx.deploy.allowoffline}" arg2="true" trim="true"/>
|
|
1016 </and>
|
|
1017 </condition>
|
|
1018 <condition property="permissions-elevated">
|
|
1019 <and>
|
|
1020 <isset property="javafx.deploy.permissionselevated"/>
|
|
1021 <equals arg1="${javafx.deploy.permissionselevated}" arg2="true" trim="true"/>
|
|
1022 </and>
|
|
1023 </condition>
|
|
1024 <condition property="binary-encode-css">
|
|
1025 <and>
|
|
1026 <isset property="javafx.binarycss"/>
|
|
1027 <equals arg1="${javafx.binarycss}" arg2="true" trim="true"/>
|
|
1028 </and>
|
|
1029 </condition>
|
|
1030 <condition property="rebase-lib-jars">
|
|
1031 <and>
|
|
1032 <isset property="javafx.rebase.libs"/>
|
|
1033 <equals arg1="${javafx.rebase.libs}" arg2="true" trim="true"/>
|
|
1034 </and>
|
|
1035 </condition>
|
|
1036 <condition property="use-blob-signing">
|
|
1037 <and>
|
|
1038 <isset property="javafx.signing.blob"/>
|
|
1039 <equals arg1="${javafx.signing.blob}" arg2="true" trim="true"/>
|
|
1040 </and>
|
|
1041 </condition>
|
|
1042 <echo message="main-class-available = ${main-class-available}" level="verbose"/>
|
|
1043 <echo message="vmargs-available = ${vmargs-available}" level="verbose"/>
|
|
1044 <echo message="preloader-available = ${preloader-available}" level="verbose"/>
|
|
1045 <echo message="app-with-preloader = ${app-with-preloader}" level="verbose"/>
|
|
1046 <echo message="app-with-preloader-without-project = ${app-with-preloader-without-project}" level="verbose"/>
|
|
1047 <echo message="app-without-preloader = ${app-without-preloader}" level="verbose"/>
|
|
1048 <echo message="preloader-app = ${preloader-app}" level="verbose"/>
|
|
1049 <echo message="fx-in-swing-app = ${fx-in-swing-app}" level="verbose"/>
|
|
1050 <echo message="fx-in-swing-workaround-app = ${fx-in-swing-workaround-app}" level="verbose"/>
|
|
1051 <echo message="preloader-app-no-workaround = ${preloader-app-no-workaround}" level="verbose"/>
|
|
1052 <echo message="html-template-available = ${html-template-available}" level="verbose"/>
|
|
1053 <echo message="icon-available = ${icon-available}" level="verbose"/>
|
|
1054 <echo message="dimensions-available = ${dimensions-available}" level="verbose"/>
|
|
1055 <echo message="update-mode-background = ${update-mode-background}" level="verbose"/>
|
|
1056 <echo message="offline-allowed = ${offline-allowed}" level="verbose"/>
|
|
1057 <echo message="permissions-elevated = ${permissions-elevated}" level="verbose"/>
|
|
1058 <echo message="binary-encode-css = ${binary-encode-css}" level="verbose"/>
|
|
1059 <echo message="rebase-lib-jars = ${rebase-lib-jars}" level="verbose"/>
|
|
1060 <echo message="use-blob-signing = ${use-blob-signing}" level="verbose"/>
|
|
1061 </target>
|
|
1062
|
|
1063 <target name="-swing-api-check" depends="-check-project,-check-jfx-deployment" if="fx-in-swing-app">
|
|
1064 <condition property="fx-in-swing-app-workaround">
|
|
1065 <and>
|
|
1066 <isset property="fx-in-swing-app"/>
|
|
1067 <not><isset property="have-fx-ant-api-1.2"/></not>
|
|
1068 </and>
|
|
1069 </condition>
|
|
1070 </target>
|
|
1071 <target name="-swing-api-warning" depends="-swing-api-check" if="fx-in-swing-app-workaround">
|
|
1072 <echo message="Info: No support for FX-in-Swing deployment detected in current JavaFX SDK. Using workaround instead."/>
|
|
1073 </target>
|
|
1074
|
|
1075 <target name="-icon-deployment-check" depends="-check-project,-check-jfx-deployment" if="icon-available">
|
|
1076 <condition property="icon-deployment-may-not-be-supported">
|
|
1077 <and>
|
|
1078 <isset property="icon-available"/>
|
|
1079 <not><isset property="have-fx-ant-api-1.1"/></not>
|
|
1080 </and>
|
|
1081 </condition>
|
|
1082 </target>
|
|
1083 <target name="-icon-warning" depends="-icon-deployment-check" if="icon-deployment-may-not-be-supported">
|
|
1084 <echo message="Warning: Note that due to a bug in early JavaFX 2.0 SDK distributions the icon may not be properly set in deployment files."/>
|
|
1085 </target>
|
|
1086
|
|
1087 <target name="-set-dimensions" depends="-check-project" if="dimensions-available">
|
|
1088 <property name="javafx.width" value="${javafx.run.width}"/>
|
|
1089 <property name="javafx.height" value="${javafx.run.height}"/>
|
|
1090 </target>
|
|
1091 <target name="-reset-dimensions" depends="-check-project" unless="dimensions-available">
|
|
1092 <property name="javafx.width" value="800"/>
|
|
1093 <property name="javafx.height" value="600"/>
|
|
1094 </target>
|
|
1095
|
|
1096 <target name="-set-update-mode-background" depends="-check-project" if="update-mode-background">
|
|
1097 <property name="update-mode" value="background"/>
|
|
1098 </target>
|
|
1099 <target name="-set-update-mode-eager" depends="-check-project" unless="update-mode-background">
|
|
1100 <property name="update-mode" value="eager"/>
|
|
1101 </target>
|
|
1102
|
|
1103 <target name="-set-permissions-elevated" depends="-check-project" if="permissions-elevated">
|
|
1104 <property name="permissions.elevated" value="true"/>
|
|
1105 </target>
|
|
1106 <target name="-reset-permissions-elevated" depends="-check-project" unless="permissions-elevated">
|
|
1107 <property name="permissions.elevated" value="false"/>
|
|
1108 </target>
|
|
1109
|
|
1110 <target name="-set-binary-css" depends="-check-project,-init-css-conversion" if="do.copy.binary.css">
|
|
1111 <property name="css-include-ext" value="bss"/>
|
|
1112 <property name="css-exclude-ext" value="css"/>
|
|
1113 </target>
|
|
1114 <target name="-unset-binary-css" depends="-check-project,-init-css-conversion" unless="do.copy.binary.css">
|
|
1115 <property name="css-include-ext" value="css"/>
|
|
1116 <property name="css-exclude-ext" value="bss"/>
|
|
1117 </target>
|
|
1118 <target name="-copy-binary-css" depends="-init-css-conversion,-set-binary-css,-unset-binary-css,-copy-binary-css-bypass,-copy-binary-css-impl"/>
|
|
1119 <target name="-init-css-conversion" depends="-check-project,-check-ant-jre-version">
|
|
1120 <fileset id="cssfiles" dir="${basedir}${file.separator}${build.classes.dir}">
|
|
1121 <include name="**${file.separator}*.css"/>
|
|
1122 </fileset>
|
|
1123 <pathconvert refid="cssfiles" property="cssfileset.notempty" setonempty="false"/>
|
|
1124 <condition property="do.copy.binary.css">
|
|
1125 <and>
|
|
1126 <isset property="binary-encode-css"/>
|
|
1127 <isset property="cssfileset.notempty"/>
|
|
1128 <not><isset property="have-jdk7-css2bin-bug"/></not>
|
|
1129 </and>
|
|
1130 </condition>
|
|
1131 <condition property="do.bypass.binary.css">
|
|
1132 <and>
|
|
1133 <isset property="binary-encode-css"/>
|
|
1134 <isset property="cssfileset.notempty"/>
|
|
1135 <isset property="have-jdk7-css2bin-bug"/>
|
|
1136 </and>
|
|
1137 </condition>
|
|
1138 <echo message="do.copy.binary.css = ${do.copy.binary.css}" level="verbose"/>
|
|
1139 <echo message="do.bypass.binary.css = ${do.bypass.binary.css}" level="verbose"/>
|
|
1140 </target>
|
|
1141 <target name="-copy-binary-css-bypass" depends="-init-css-conversion" if="do.bypass.binary.css">
|
|
1142 <echo message="Warning: Bypassing FX CSS to BSS conversion due to a bug in <fx:csstobin> task in current JDK platform" level="warning"/>
|
|
1143 </target>
|
|
1144 <target name="-copy-binary-css-impl" depends="-init-css-conversion" if="do.copy.binary.css">
|
|
1145 <property name="cssfileslist" refid="cssfiles"/>
|
|
1146 <echo message="css files to binary convert: " level="verbose">${cssfileslist}</echo>
|
|
1147 <fx:csstobin outdir="${basedir}${file.separator}${build.classes.dir}">
|
|
1148 <fileset refid="cssfiles"/>
|
|
1149 </fx:csstobin>
|
|
1150 </target>
|
|
1151
|
|
1152
|
|
1153 <!-- Copy dependent libraries -->
|
|
1154
|
|
1155 <!-- Note: target "-jfx-copylibs" is referenced from NB 7.1 build-impl.xml -->
|
|
1156 <target name="-jfx-copylibs" depends="init,compile,-pre-pre-jar,-pre-jar,-jfx-copylibs-warning" unless="fallback.no.javascript">
|
|
1157 <jfx-copylibs-js-impl/>
|
|
1158 </target>
|
|
1159 <target name="-jfx-copylibs-warning" if="fallback.no.javascript">
|
|
1160 <echo message="Warning: Dependent Libraries copy (-jfx-copylibs) skipped in fallback build mode due to JDK missing JavaScript support."/>
|
|
1161 </target>
|
|
1162 <macrodef name="jfx-copylibs-js-impl">
|
|
1163 <sequential>
|
|
1164 <local name="run.classpath.without.build.classes.and.dist.dir"/>
|
|
1165 <pathconvert property="run.classpath.without.build.classes.and.dist.dir">
|
|
1166 <path path="${run.classpath}"/>
|
|
1167 <map from="${basedir}${file.separator}${build.classes.dir}" to=""/>
|
|
1168 <map from="${basedir}${file.separator}${dist.jar}" to=""/>
|
|
1169 <scriptmapper language="javascript">
|
|
1170 self.addMappedName(
|
|
1171 (source.indexOf("jfxrt.jar") >= 0) ||
|
|
1172 (source.indexOf("deploy.jar") >= 0) ||
|
|
1173 (source.indexOf("javaws.jar") >= 0) ||
|
|
1174 (source.indexOf("plugin.jar") >= 0)
|
|
1175 ? "" : source
|
|
1176 );
|
|
1177 </scriptmapper>
|
|
1178 </pathconvert>
|
|
1179 <!-- add possibly missing dependencies at distance 2 (build system logic thus provides transitive closure) -->
|
|
1180 <local name="run.and.lib.classpath"/>
|
|
1181 <echo message="JavaScript: -jfx-copylibs" level="verbose"/>
|
|
1182 <script language="javascript">
|
|
1183 <![CDATA[
|
|
1184 function prefix(s, len) {
|
|
1185 if(s == null || len <= 0 || s.length == 0) {
|
|
1186 return new String("");
|
|
1187 }
|
|
1188 return new String(s.substr(0, len));
|
|
1189 }
|
|
1190 function defined(s) {
|
|
1191 return (s != null) && (s != "null") && (s.length > 0);
|
|
1192 }
|
|
1193 var pathConvert = project.createTask("pathconvert");
|
|
1194 pathConvert.setProperty("run.and.lib.classpath");
|
|
1195 var classPath = new String(project.getProperty("run.classpath.without.build.classes.and.dist.dir"));
|
|
1196 var fileSeparator = new String(project.getProperty("file.separator"));
|
|
1197 if(defined(classPath)) {
|
|
1198 var classPathCopy = pathConvert.createPath();
|
|
1199 classPathCopy.setPath(classPath);
|
|
1200 var pathArray;
|
|
1201 if(classPath.indexOf(";") != -1) {
|
|
1202 pathArray = classPath.split(";");
|
|
1203 } else {
|
|
1204 pathArray = classPath.split(":");
|
|
1205 }
|
|
1206 var added = new java.lang.StringBuilder();
|
|
1207 for (var i = 0; i < pathArray.length; i++) {
|
|
1208 var index = pathArray[i].lastIndexOf(fileSeparator);
|
|
1209 if (index >= 0) {
|
|
1210 var onePath = prefix(pathArray[i], index+1).concat("lib");
|
|
1211 var oneDir = new java.io.File(onePath);
|
|
1212 if(oneDir.exists()) {
|
|
1213 var fs = project.createDataType( "fileset" );
|
|
1214 fs.setDir( oneDir );
|
|
1215 fs.setIncludes("*.jar");
|
|
1216 var ds = fs.getDirectoryScanner(project);
|
|
1217 var srcFiles = ds.getIncludedFiles();
|
|
1218 for (var j = 0; j < srcFiles.length; j++) {
|
|
1219 if(classPath.indexOf( srcFiles[j] ) == -1 && added.indexOf( srcFiles[j] ) == -1) {
|
|
1220 var path = pathConvert.createPath();
|
|
1221 path.setPath( onePath.concat(fileSeparator).concat(srcFiles[j]) );
|
|
1222 added.append( srcFiles[j] );
|
|
1223 }
|
|
1224 }
|
|
1225 }
|
|
1226 }
|
|
1227 }
|
|
1228 }
|
|
1229 pathConvert.perform();
|
|
1230 ]]>
|
|
1231 </script>
|
|
1232 <echo message="run.and.lib.classpath = ${run.and.lib.classpath}" level="verbose"/>
|
|
1233 <delete dir="${dist.dir}${file.separator}lib" includeEmptyDirs="true" quiet="true"/>
|
|
1234 <copy todir="${dist.dir}${file.separator}lib" flatten="true" preservelastmodified="true" overwrite="true">
|
|
1235 <path>
|
|
1236 <pathelement path="${run.and.lib.classpath}"/>
|
|
1237 </path>
|
|
1238 </copy>
|
|
1239 </sequential>
|
|
1240 </macrodef>
|
|
1241
|
|
1242 <target name="-copy-external-preloader-jar" depends="-check-project" if="app-with-external-preloader-jar">
|
|
1243 <copy file="${javafx.preloader.jar.path}" todir="${dist.dir}${file.separator}lib"/>
|
|
1244 </target>
|
|
1245
|
|
1246
|
|
1247 <!-- Optional classpath re-base of dependent JAR manifests after copy to lib/, required by GlassFish -->
|
|
1248
|
|
1249 <!-- Note: target "-rebase-libs" is referenced from NB 7.1 build-impl.xml -->
|
|
1250 <target name="-rebase-libs" depends="-check-project, -jfx-copylibs, -check-rebase-libs, -rebase-libs-warning" if="do-rebase-lib-jars">
|
|
1251 <rebase-libs-js-impl/>
|
|
1252 </target>
|
|
1253 <target name="-check-rebase-libs">
|
|
1254 <condition property="do-rebase-lib-jars">
|
|
1255 <and>
|
|
1256 <isset property="rebase-lib-jars"/>
|
|
1257 <not><isset property="fallback.no.javascript"/></not>
|
|
1258 </and>
|
|
1259 </condition>
|
|
1260 <condition property="do-skip-rebase-libs">
|
|
1261 <and>
|
|
1262 <isset property="rebase-lib-jars"/>
|
|
1263 <isset property="fallback.no.javascript"/>
|
|
1264 </and>
|
|
1265 </condition>
|
|
1266 </target>
|
|
1267 <target name="-rebase-libs-warning" depends="-check-rebase-libs" if="do-skip-rebase-libs">
|
|
1268 <echo message="Warning: Dependent Libraries JARs rebase (-rebase-libs) skipped in fallback build mode due to JDK missing JavaScript support."/>
|
|
1269 </target>
|
|
1270
|
|
1271 <macrodef name="rebase-libs-js-impl">
|
|
1272 <sequential>
|
|
1273 <property name="pp_rebase_dir" value="${basedir}${file.separator}${dist.dir}${file.separator}lib"/>
|
|
1274 <property name="pp_rebase_fs" value="*.jar"/>
|
|
1275 <echo message="JavaScript: -rebase-libs-js-impl" level="verbose"/>
|
|
1276 <script language="javascript">
|
|
1277 <![CDATA[
|
|
1278 var dir = new String(project.getProperty("pp_rebase_dir"));
|
|
1279 var fDir = new java.io.File(dir);
|
|
1280 if( fDir.exists() ) {
|
|
1281 var callTask = project.createTask("antcall");
|
|
1282 callTask.setTarget("-rebase-libs-macro-call");
|
|
1283 var param = callTask.createParam();
|
|
1284 param.setName("jar.file.to.rebase");
|
|
1285 var includes = new String(project.getProperty("pp_rebase_fs"));
|
|
1286 var fs = project.createDataType("fileset");
|
|
1287 fs.setDir( fDir );
|
|
1288 fs.setIncludes(includes);
|
|
1289 var ds = fs.getDirectoryScanner(project);
|
|
1290 var srcFiles = ds.getIncludedFiles();
|
|
1291 for (var i = 0; i < srcFiles.length; i++) {
|
|
1292 param.setValue(dir.concat("${file.separator}").concat(srcFiles[i]));
|
|
1293 callTask.perform();
|
|
1294 }
|
|
1295 }
|
|
1296 ]]>
|
|
1297 </script>
|
|
1298 </sequential>
|
|
1299 </macrodef>
|
|
1300
|
|
1301 <macrodef name="rebase-lib">
|
|
1302 <attribute name="jarfile"/>
|
|
1303 <sequential>
|
|
1304 <local name="tmpdir"/>
|
|
1305 <property name="tmpdir" value="${java.io.tmpdir}${file.separator}${user.name}_${ant.project.name}_rebase" />
|
|
1306 <echo message="tmpdir = ${tmpdir}" level="verbose"/>
|
|
1307 <delete dir="${tmpdir}" quiet="true"/>
|
|
1308 <mkdir dir="${tmpdir}"/>
|
|
1309 <unzip src="@{jarfile}" dest="${tmpdir}">
|
|
1310 <patternset>
|
|
1311 <include name="META-INF${file.separator}MANIFEST.MF"/>
|
|
1312 </patternset>
|
|
1313 </unzip>
|
|
1314 <local name="manifest.file.temp"/>
|
|
1315 <property name="manifest.file.temp" value="${tmpdir}${file.separator}META-INF${file.separator}MANIFEST.MF" />
|
|
1316 <echo message="manifest.file.temp = ${manifest.file.temp}" level="verbose"/>
|
|
1317 <!-- edited manifest file -->
|
|
1318 <local name="manifest.file.temp.new"/>
|
|
1319 <property name="manifest.file.temp.new" value="${manifest.file.temp}_new" />
|
|
1320 <echo message="manifest.file.temp.new = ${manifest.file.temp.new}" level="verbose"/>
|
|
1321 <echo message="JavaScript: rebase-lib" level="verbose"/>
|
|
1322 <script language="javascript">
|
|
1323 <![CDATA[
|
|
1324 var UTF_8 = "UTF-8";
|
|
1325 var ATTR_CLASS_PATH = "Class-Path";
|
|
1326 var ATTR_CLASS_PATH_FX = "JavaFX-Class-Path";
|
|
1327 function endsWith(s, suffix) {
|
|
1328 var i = s.lastIndexOf(suffix);
|
|
1329 return (i != -1) && (i == (s.length - suffix.length));
|
|
1330 }
|
|
1331 function isSigned(manifest) {
|
|
1332 var sections = manifest.getSectionNames();
|
|
1333 while(sections.hasMoreElements()) {
|
|
1334 var sectionname = new String(sections.nextElement());
|
|
1335 var section = manifest.getSection(sectionname);
|
|
1336 if(section != null) {
|
|
1337 var sectionKeys = section.getAttributeKeys();
|
|
1338 while (sectionKeys.hasMoreElements()) {
|
|
1339 var element = new String(sectionKeys.nextElement());
|
|
1340 if (endsWith(element, "-Digest") || endsWith(element, "-digest")) {
|
|
1341 return true;
|
|
1342 }
|
|
1343 }
|
|
1344 }
|
|
1345 }
|
|
1346 return false;
|
|
1347 }
|
|
1348 var src = new String(project.getProperty("manifest.file.temp"));
|
|
1349 var srf = new java.io.File(src);
|
|
1350 var manifest;
|
|
1351 try {
|
|
1352 var fis = new java.io.FileInputStream(srf);
|
|
1353 try {
|
|
1354 var isr = new java.io.InputStreamReader(fis, UTF_8);
|
|
1355 try {
|
|
1356 manifest = new org.apache.tools.ant.taskdefs.Manifest(isr);
|
|
1357 } finally {
|
|
1358 isr.close();
|
|
1359 }
|
|
1360 } finally {
|
|
1361 fis.close();
|
|
1362 }
|
|
1363 } catch(e) {
|
|
1364 manifest = null;
|
|
1365 }
|
|
1366 if(manifest != null) {
|
|
1367 if(isSigned(manifest)) {
|
|
1368 print("Warning: Signed JAR can not be rebased.");
|
|
1369 } else {
|
|
1370 var mainSection = manifest.getMainSection();
|
|
1371 var classPath = mainSection.getAttributeValue(ATTR_CLASS_PATH);
|
|
1372 var classPathAttr = null;
|
|
1373 if (classPath != null) {
|
|
1374 classPathAttr = ATTR_CLASS_PATH;
|
|
1375 } else {
|
|
1376 classPath = mainSection.getAttributeValue(ATTR_CLASS_PATH_FX);
|
|
1377 if(classPath != null) {
|
|
1378 classPathAttr = ATTR_CLASS_PATH_FX;
|
|
1379 }
|
|
1380 }
|
|
1381 if(classPath != null) {
|
|
1382 var result = new java.lang.StringBuilder();
|
|
1383 var changed = false;
|
|
1384 var pathArray = classPath.split(" ");
|
|
1385 for (var i = 0; i < pathArray.length; i++) {
|
|
1386 if (result.length() > 0) {
|
|
1387 result.append(' ');
|
|
1388 }
|
|
1389 var index = pathArray[i].lastIndexOf('/');
|
|
1390 if (index >= 0 && index < pathArray[i].length - 1) {
|
|
1391 pathArray[i] = pathArray[i].substring(index+1);
|
|
1392 changed = true;
|
|
1393 }
|
|
1394 result.append(pathArray[i]);
|
|
1395 }
|
|
1396 mainSection.removeAttribute(classPathAttr);
|
|
1397 mainSection.addAttributeAndCheck(new org.apache.tools.ant.taskdefs.Manifest.Attribute(classPathAttr, result.toString()));
|
|
1398 var tgt = new String(project.getProperty("manifest.file.temp.new"));
|
|
1399 var tgf = new java.io.File(tgt);
|
|
1400 try {
|
|
1401 var fos = new java.io.FileOutputStream(tgf);
|
|
1402 try {
|
|
1403 var osw = new java.io.OutputStreamWriter(fos, UTF_8);
|
|
1404 try {
|
|
1405 var manifestOut = new java.io.PrintWriter(osw);
|
|
1406 manifest.write(manifestOut);
|
|
1407 manifestOut.close();
|
|
1408 } finally {
|
|
1409 osw.close();
|
|
1410 }
|
|
1411 } finally {
|
|
1412 fos.close();
|
|
1413 }
|
|
1414 } catch(e) {
|
|
1415 print("Warning: problem storing rebased manifest file.");
|
|
1416 }
|
|
1417 }
|
|
1418 }
|
|
1419 }
|
|
1420 ]]>
|
|
1421 </script>
|
|
1422 <antcall target="-move-new-manifest-if-exists">
|
|
1423 <param name="move.file.from" value="${manifest.file.temp.new}"/>
|
|
1424 <param name="move.file.to" value="${manifest.file.temp}"/>
|
|
1425 </antcall>
|
|
1426 <zip destfile="@{jarfile}" basedir="${tmpdir}" update="true"/>
|
|
1427 <delete dir="${tmpdir}" quiet="true"/>
|
|
1428 </sequential>
|
|
1429 </macrodef>
|
|
1430
|
|
1431 <target name="-new-temp-mainfest-existence">
|
|
1432 <condition property="new-temp-manifest-exists">
|
|
1433 <available file="${move.file.from}"/>
|
|
1434 </condition>
|
|
1435 <echo message="new-temp-manifest-exists = ${new-temp-manifest-exists}" level="verbose"/>
|
|
1436 </target>
|
|
1437
|
|
1438 <target name="-move-new-manifest-if-exists" depends="-new-temp-mainfest-existence" if="new-temp-manifest-exists">
|
|
1439 <move file="${move.file.from}" tofile="${move.file.to}" failonerror="false"/>
|
|
1440 </target>
|
|
1441
|
|
1442 <target name="-rebase-libs-macro-call">
|
|
1443 <echo message="Rebase jarfile = ${jar.file.to.rebase}" level="verbose"/>
|
|
1444 <rebase-lib jarfile="${jar.file.to.rebase}"/>
|
|
1445 </target>
|
|
1446
|
|
1447
|
|
1448 <!-- Main Deployment Target -->
|
|
1449
|
|
1450 <!-- Note: target "jfx-deployment" is referenced from NB 7.1+ build-impl.xml -->
|
|
1451 <target name="jfx-deployment" depends="-check-jfx-deployment-launch,-do-jfx-deployment-script,-do-jfx-deployment-noscript" if="jfx-deployment-available"/>
|
|
1452
|
|
1453 <target name="-check-dist-lib-exists">
|
|
1454 <deploy-defines/>
|
|
1455 <available file="${jfx.deployment.dir}${file.separator}lib" type="dir" property="dist.lib.exists"/>
|
|
1456 </target>
|
|
1457 <target name="-check-jfx-deployment-jar-current-nolib" depends="-check-dist-lib-exists" unless="dist.lib.exists">
|
|
1458 <uptodate property="jfx-deployment-jar-current" targetfile="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}" >
|
|
1459 <srcfiles dir="${basedir}${file.separator}${build.classes.dir}" includes="**${file.separator}*"/>
|
|
1460 <srcfiles dir="${basedir}${file.separator}nbproject" includes="**${file.separator}*"/>
|
|
1461 </uptodate>
|
|
1462 </target>
|
|
1463 <target name="-check-jfx-deployment-jar-current-lib" depends="-check-dist-lib-exists" if="dist.lib.exists">
|
|
1464 <uptodate property="jfx-deployment-jar-current" targetfile="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}" >
|
|
1465 <srcfiles dir="${basedir}${file.separator}${build.classes.dir}" includes="**${file.separator}*"/>
|
|
1466 <srcfiles dir="${jfx.deployment.dir}${file.separator}lib" includes="**${file.separator}*"/>
|
|
1467 <srcfiles dir="${basedir}${file.separator}nbproject" includes="**${file.separator}*"/>
|
|
1468 </uptodate>
|
|
1469 </target>
|
|
1470 <target name="-check-jfx-deployment-launch" depends="-check-jfx-deployment,-check-jfx-deployment-jar-current-nolib,-check-jfx-deployment-jar-current-lib">
|
|
1471 <condition property="do-jfx-deployment-script">
|
|
1472 <and>
|
|
1473 <isset property="jfx-deployment-available"/>
|
|
1474 <not><isset property="fallback.no.javascript"/></not>
|
|
1475 <not><isset property="jfx-deployment-jar-current"/></not>
|
|
1476 </and>
|
|
1477 </condition>
|
|
1478 <condition property="do-jfx-deployment-noscript">
|
|
1479 <and>
|
|
1480 <isset property="jfx-deployment-available"/>
|
|
1481 <isset property="fallback.no.javascript"/>
|
|
1482 <not><isset property="jfx-deployment-jar-current"/></not>
|
|
1483 </and>
|
|
1484 </condition>
|
|
1485 </target>
|
|
1486 <target name="-do-jfx-deployment-script" depends="-check-jfx-deployment-launch" if="do-jfx-deployment-script">
|
|
1487 <antcall target="jfx-deployment-script"/>
|
|
1488 </target>
|
|
1489 <target name="-do-jfx-deployment-noscript" depends="-check-jfx-deployment-launch" if="do-jfx-deployment-noscript">
|
|
1490 <antcall target="jfx-deployment-noscript"/>
|
|
1491 </target>
|
|
1492
|
|
1493 <target name="jfx-deployment-script" depends="-check-jfx-deployment,-check-project,
|
|
1494 -swing-api-warning,-icon-warning,
|
|
1495 -set-dimensions,-reset-dimensions,-set-update-mode-background,-set-update-mode-eager,
|
|
1496 -set-permissions-elevated,-reset-permissions-elevated,
|
|
1497 -copy-external-preloader-jar,-copy-binary-css,
|
|
1498 -deploy-app-sign-nopreloader-notemplate,
|
|
1499 -deploy-app-sign-preloader-notemplate,
|
|
1500 -deploy-app-sign-nopreloader-template,
|
|
1501 -deploy-app-sign-preloader-template,
|
|
1502 -deploy-app-sign-nopreloader-notemplate-swing,
|
|
1503 -deploy-app-sign-nopreloader-template-swing,
|
|
1504 -deploy-app-sign-blob-nopreloader-notemplate,
|
|
1505 -deploy-app-sign-blob-preloader-notemplate,
|
|
1506 -deploy-app-sign-blob-nopreloader-template,
|
|
1507 -deploy-app-sign-blob-preloader-template,
|
|
1508 -deploy-app-sign-blob-nopreloader-notemplate-swing,
|
|
1509 -deploy-app-sign-blob-nopreloader-template-swing,
|
|
1510 -deploy-app-nosign-nopreloader-notemplate,
|
|
1511 -deploy-app-nosign-preloader-notemplate,
|
|
1512 -deploy-app-nosign-nopreloader-template,
|
|
1513 -deploy-app-nosign-preloader-template,
|
|
1514 -deploy-app-nosign-nopreloader-notemplate-swing,
|
|
1515 -deploy-app-nosign-nopreloader-template-swing"
|
|
1516 if="jfx-deployment-available">
|
|
1517 </target>
|
|
1518
|
|
1519 <target name="jfx-deployment-noscript" depends="-check-jfx-deployment,-check-project,
|
|
1520 -swing-api-warning,-icon-warning,
|
|
1521 -set-dimensions,-reset-dimensions,-set-update-mode-background,-set-update-mode-eager,
|
|
1522 -set-permissions-elevated,-reset-permissions-elevated,
|
|
1523 -copy-external-preloader-jar,-copy-binary-css,
|
|
1524 -fallback-deploy-app-sign-nopreloader-notemplate,
|
|
1525 -fallback-deploy-app-sign-preloader-notemplate,
|
|
1526 -fallback-deploy-app-sign-nopreloader-template,
|
|
1527 -fallback-deploy-app-sign-preloader-template,
|
|
1528 -fallback-deploy-app-sign-nopreloader-notemplate-swing,
|
|
1529 -fallback-deploy-app-sign-nopreloader-template-swing,
|
|
1530 -fallback-deploy-app-sign-blob-nopreloader-notemplate,
|
|
1531 -fallback-deploy-app-sign-blob-preloader-notemplate,
|
|
1532 -fallback-deploy-app-sign-blob-nopreloader-template,
|
|
1533 -fallback-deploy-app-sign-blob-preloader-template,
|
|
1534 -fallback-deploy-app-sign-blob-nopreloader-notemplate-swing,
|
|
1535 -fallback-deploy-app-sign-blob-nopreloader-template-swing,
|
|
1536 -fallback-deploy-app-nosign-nopreloader-notemplate,
|
|
1537 -fallback-deploy-app-nosign-preloader-notemplate,
|
|
1538 -fallback-deploy-app-nosign-nopreloader-template,
|
|
1539 -fallback-deploy-app-nosign-preloader-template,
|
|
1540 -fallback-deploy-app-nosign-nopreloader-notemplate-swing,
|
|
1541 -fallback-deploy-app-nosign-nopreloader-template-swing"
|
|
1542 if="jfx-deployment-available">
|
|
1543 </target>
|
|
1544
|
|
1545
|
|
1546 <!-- Security / Signing -->
|
|
1547
|
|
1548 <target name="-unavailable-signjars-task" depends="-check-jfx-deployment" unless="jfx-deployment-available">
|
|
1549 <echo message="Warning: Task required to sign JAR file is missing, check the availability of JavaFX 2.0 deployment tasks. JAR files will not be signed."/>
|
|
1550 </target>
|
|
1551
|
|
1552 <target name="-security-props-check">
|
|
1553 <condition property="javafx.signed.true">
|
|
1554 <istrue value="${javafx.signing.enabled}"/>
|
|
1555 </condition>
|
|
1556 </target>
|
|
1557
|
|
1558 <target name="-check-signing-possible" depends="-security-props-check,-check-jfx-deployment,-unavailable-signjars-task">
|
|
1559 <condition property="javafx.signed.true+signjars.task.available">
|
|
1560 <and>
|
|
1561 <isset property="javafx.signed.true"/>
|
|
1562 <isset property="jfx-deployment-available"/>
|
|
1563 </and>
|
|
1564 </condition>
|
|
1565 </target>
|
|
1566
|
|
1567 <target name="-javafx-init-keystore" depends="-check-signing-possible,-javafx-init-signing,-javafx-init-keystore1,-javafx-init-keystore2,-check-keystore-exists"
|
|
1568 if="javafx.signed.true+signjars.task.available" unless="do.not.init.keystore">
|
|
1569 <property name="javafx.signjar.vendor" value="CN=${application.vendor}"/>
|
|
1570 <echo message="Going to create default keystore in ${javafx.signjar.keystore}"/>
|
|
1571 <genkey dname="${javafx.signjar.vendor}" alias="${javafx.signjar.alias}" keystore="${javafx.signjar.keystore}"
|
|
1572 storepass="${javafx.signjar.storepass}" keypass="${javafx.signjar.keypass}"/>
|
|
1573 </target>
|
|
1574
|
|
1575 <target name="-check-keystore-exists" depends="-security-props-check">
|
|
1576 <available property="javafx.signjar.keystore.exists" file="${javafx.signjar.keystore}"/>
|
|
1577 <condition property="do.not.init.keystore">
|
|
1578 <or>
|
|
1579 <not><isset property="javafx.signed.true"/></not>
|
|
1580 <isset property="javafx.signjar.keystore.exists"/>
|
|
1581 </or>
|
|
1582 </condition>
|
|
1583 </target>
|
|
1584
|
|
1585 <target name="-javafx-init-signing">
|
|
1586 <condition property="generated.key.signing">
|
|
1587 <equals arg1="${javafx.signing.type}" arg2="self" trim="true"/>
|
|
1588 </condition>
|
|
1589 </target>
|
|
1590
|
|
1591 <target name="-javafx-init-keystore1" depends="-javafx-init-signing" if="generated.key.signing">
|
|
1592 <property name="javafx.signjar.keystore" value="${basedir}${file.separator}build${file.separator}nb-jfx.jks" />
|
|
1593 <property name="javafx.signjar.storepass" value="storepass"/>
|
|
1594 <property name="javafx.signjar.keypass" value="keypass"/>
|
|
1595 <property name="javafx.signjar.alias" value="nb-jfx"/>
|
|
1596 </target>
|
|
1597
|
|
1598 <target name="-javafx-init-keystore2" depends="-javafx-init-signing" unless="generated.key.signing">
|
|
1599 <property name="javafx.signjar.keystore" value="${javafx.signing.keystore}" />
|
|
1600 <property name="javafx.signjar.storepass" value="${javafx.signing.keystore.password}"/>
|
|
1601 <property name="javafx.signjar.keypass" value="${javafx.signing.keyalias.password}"/>
|
|
1602 <property name="javafx.signjar.alias" value="${javafx.signing.keyalias}"/>
|
|
1603 </target>
|
|
1604
|
|
1605 <target name="-check-signing-security" depends="-security-props-check">
|
|
1606 <condition property="is.signing.unsafe">
|
|
1607 <or>
|
|
1608 <not><isset property="javafx.signed.true"/></not>
|
|
1609 <not><equals arg1="${javafx.signing.type}" arg2="key" casesensitive="false" trim="true"/></not>
|
|
1610 </or>
|
|
1611 </condition>
|
|
1612 </target>
|
|
1613
|
|
1614 <target name="-warn-insufficient-signing" depends="-check-signing-security" if="is.signing.unsafe">
|
|
1615 <echo message="Warning: Unsigned and self-signed WebStart Applications and Applets are deprecated from JDK7u21 onwards due to security reasons.${line.separator} To ensure future correct functionality please sign WebStart Applications and Applets using trusted certificate."/>
|
|
1616 </target>
|
|
1617
|
|
1618
|
|
1619 <!-- Project Deployment Macros -->
|
|
1620
|
|
1621 <macrodef name="deploy-defines">
|
|
1622 <sequential>
|
|
1623 <basename property="jfx.deployment.jar" file="${dist.jar}"/>
|
|
1624 <property name="jfx.deployment.dir" location="${dist.dir}"/>
|
|
1625 </sequential>
|
|
1626 </macrodef>
|
|
1627
|
|
1628 <macrodef name="deploy-preprocess">
|
|
1629 <sequential>
|
|
1630 <delete includeEmptyDirs="true" quiet="true">
|
|
1631 <fileset dir="${jfx.deployment.dir}${file.separator}lib">
|
|
1632 <exclude name="**${file.separator}*.jar"/>
|
|
1633 </fileset>
|
|
1634 </delete>
|
|
1635 </sequential>
|
|
1636 </macrodef>
|
|
1637
|
|
1638 <!-- fx:jar scripted call enables passing of arbitrarily long list of params and fx-version dependent behavior -->
|
|
1639 <macrodef name="deploy-jar">
|
|
1640 <sequential>
|
|
1641 <antcall target="-pre-jfx-jar"/>
|
|
1642 <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/>
|
|
1643 <typedef name="fx_jar" classname="com.sun.javafx.tools.ant.FXJar" classpath="${javafx.ant.classpath}"/>
|
|
1644 <echo message="Launching <fx:jar> task from ${ant-javafx.jar.location}" level="info"/>
|
|
1645 <property name="pp_jar_destfile" value="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}"/>
|
|
1646 <property name="pp_jar_buildclasses" value="${basedir}${file.separator}${build.classes.dir}"/>
|
|
1647 <property name="pp_jar_cssbss" value="**${file.separator}*.${css-exclude-ext}"/>
|
|
1648 <property name="pp_jar_dir" value="${jfx.deployment.dir}"/>
|
|
1649 <property name="pp_jar_fs1" value="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
1650 <property name="pp_jar_fs2" value="lib${file.separator}*.jar"/>
|
|
1651 <echo message="deploy_jar: pp_jar_destfile = ${pp_jar_destfile}" level="verbose"/>
|
|
1652 <echo message="deploy_jar: pp_jar_buildclasses = ${pp_jar_buildclasses}" level="verbose"/>
|
|
1653 <echo message="deploy_jar: pp_jar_cssbss = ${pp_jar_cssbss}" level="verbose"/>
|
|
1654 <echo message="deploy_jar: pp_jar_dir = ${pp_jar_dir}" level="verbose"/>
|
|
1655 <echo message="deploy_jar: pp_jar_fs1 = ${pp_jar_fs1}" level="verbose"/>
|
|
1656 <echo message="deploy_jar: pp_jar_fs2 = ${pp_jar_fs2}" level="verbose"/>
|
|
1657 <echo message="JavaScript: deploy-jar" level="verbose"/>
|
|
1658 <script language="javascript">
|
|
1659 <![CDATA[
|
|
1660 function isTrue(prop) {
|
|
1661 return prop != null &&
|
|
1662 ( prop.toLowerCase() == "true" || prop.toLowerCase() == "yes" || prop.toLowerCase() == "on" );
|
|
1663 }
|
|
1664 function prefix(s, len) {
|
|
1665 if(s == null || len <= 0 || s.length == 0) {
|
|
1666 return new String("");
|
|
1667 }
|
|
1668 return new String(s.substr(0, len));
|
|
1669 }
|
|
1670 function replaceSuffix(s, os, ns) {
|
|
1671 return prefix(s, s.indexOf(os)).concat(ns);
|
|
1672 }
|
|
1673 function startsWith(s, prefix) {
|
|
1674 return (s != null) && (s.indexOf(prefix) == 0);
|
|
1675 }
|
|
1676 function endsWith(s, suffix) {
|
|
1677 var i = s.lastIndexOf(suffix);
|
|
1678 return (i != -1) && (i == (s.length - suffix.length));
|
|
1679 }
|
|
1680 function defined(s) {
|
|
1681 return (s != null) && (s != "null") && (s.length > 0);
|
|
1682 }
|
|
1683 function contains(array, prop) {
|
|
1684 for (var i = 0; i < array.length; i++) {
|
|
1685 var s1 = new String(array[i]);
|
|
1686 var s2 = new String(prop);
|
|
1687 if( s1.toLowerCase() == s2.toLowerCase() ) {
|
|
1688 return true;
|
|
1689 }
|
|
1690 }
|
|
1691 return false;
|
|
1692 }
|
|
1693 var S = new String(java.io.File.separator);
|
|
1694 var JFXPAR = "javafx.param";
|
|
1695 var JFXMAN = "javafx.manifest.entry";
|
|
1696 var JFXPARN = "name";
|
|
1697 var JFXPARV = "value";
|
|
1698 var JFXPARH = "hidden";
|
|
1699 var JFXLAZY = "download.mode.lazy.jar";
|
|
1700 var withpreloader = new String(project.getProperty("app-with-preloader"));
|
|
1701 var fx_ant_api_1_1 = new String(project.getProperty("have-fx-ant-api-1.1"));
|
|
1702 var fx_ant_api_1_2 = new String(project.getProperty("have-fx-ant-api-1.2"));
|
|
1703 var fx_in_swing_app = new String(project.getProperty("fx-in-swing-app"));
|
|
1704
|
|
1705 // get jars with lazy download mode property set
|
|
1706 function getLazyJars() {
|
|
1707 var jars = new Array();
|
|
1708 var keys = project.getProperties().keys();
|
|
1709 while(keys.hasMoreElements()) {
|
|
1710 var pn = new String(keys.nextElement());
|
|
1711 if(startsWith(pn, JFXLAZY)) {
|
|
1712 var fname = new String(pn.substring(JFXLAZY.length+1));
|
|
1713 jars.push(fname);
|
|
1714 }
|
|
1715 }
|
|
1716 return jars.length > 0 ? jars : null;
|
|
1717 }
|
|
1718 // set download mode of dependent libraries
|
|
1719 function setDownloadMode(fsEager, fsLazy, jars) {
|
|
1720 for(var i = 0; i < jars.length; i++) {
|
|
1721 fsEager.setExcludes("lib" + S + jars[i]);
|
|
1722 fsLazy.setIncludes("lib" + S + jars[i]);
|
|
1723 }
|
|
1724 }
|
|
1725
|
|
1726 // fx:jar
|
|
1727 var jar = project.createTask("fx_jar");
|
|
1728 jar.setProject(project);
|
|
1729 var destfile = new String(project.getProperty("pp_jar_destfile"));
|
|
1730 jar.setDestfile(destfile);
|
|
1731
|
|
1732 // fx:application
|
|
1733 var app = jar.createApplication();
|
|
1734 app.setProject(project);
|
|
1735 var title = new String(project.getProperty("application.title"));
|
|
1736 var mainclass;
|
|
1737 if(isTrue(fx_in_swing_app) && isTrue(fx_ant_api_1_2)) {
|
|
1738 mainclass = new String(project.getProperty("main.class"));
|
|
1739 app.setToolkit("swing");
|
|
1740 } else {
|
|
1741 mainclass = new String(project.getProperty("javafx.main.class"));
|
|
1742 }
|
|
1743 var fallback = new String(project.getProperty("javafx.fallback.class"));
|
|
1744 app.setName(title);
|
|
1745 app.setMainClass(mainclass);
|
|
1746 app.setFallbackClass(fallback);
|
|
1747 if(isTrue(withpreloader)) {
|
|
1748 preloaderclass = new String(project.getProperty("javafx.preloader.class"));
|
|
1749 app.setPreloaderClass(preloaderclass);
|
|
1750 }
|
|
1751 var appversion = new String(project.getProperty("javafx.application.implementation.version"));
|
|
1752 if(defined(appversion)) {
|
|
1753 app.setVersion(appversion);
|
|
1754 } else {
|
|
1755 app.setVersion("1.0");
|
|
1756 }
|
|
1757 // fx:param, fx:argument
|
|
1758 var searchHides = project.getProperties().keys();
|
|
1759 var hides = new Array();
|
|
1760 while(searchHides.hasMoreElements()) {
|
|
1761 // collect all hidden property names
|
|
1762 var pns = new String(searchHides.nextElement());
|
|
1763 if(startsWith(pns, JFXPAR) && endsWith(pns, JFXPARN)) {
|
|
1764 var propns = new String(project.getProperty(pns));
|
|
1765 var phs = replaceSuffix(pns, JFXPARN, JFXPARH);
|
|
1766 var proph = new String(project.getProperty(phs));
|
|
1767 if(isTrue(proph)) {
|
|
1768 hides.push(propns);
|
|
1769 }
|
|
1770 }
|
|
1771 }
|
|
1772 var keys = project.getProperties().keys();
|
|
1773 while(keys.hasMoreElements()) {
|
|
1774 var pn = new String(keys.nextElement());
|
|
1775 if(startsWith(pn, JFXPAR) && endsWith(pn, JFXPARN)) {
|
|
1776 var propn = new String(project.getProperty(pn));
|
|
1777 if(defined(propn) && !contains(hides, propn)) {
|
|
1778 var pv = replaceSuffix(pn, JFXPARN, JFXPARV);
|
|
1779 var propv = new String(project.getProperty(pv));
|
|
1780 if(defined(propv)) {
|
|
1781 var par = app.createParam();
|
|
1782 par.setName(propn);
|
|
1783 par.setValue(propv);
|
|
1784 } else {
|
|
1785 if(isTrue(fx_ant_api_1_1)) {
|
|
1786 var arg = app.createArgument();
|
|
1787 arg.addText(propn);
|
|
1788 } else {
|
|
1789 print("Warning: Unnamed parameters not supported by this version of JavaFX SDK deployment Ant tasks. Upgrade JavaFX to 2.0.2 or higher.");
|
|
1790 }
|
|
1791 }
|
|
1792 }
|
|
1793 }
|
|
1794 }
|
|
1795
|
|
1796 // fx:resources
|
|
1797 var res = jar.createResources();
|
|
1798 res.setProject(project);
|
|
1799 var pdir = new String(project.getProperty("pp_jar_dir"));
|
|
1800 if(isTrue(withpreloader)) {
|
|
1801 var f1 = res.createFileSet();
|
|
1802 f1.setProject(project);
|
|
1803 f1.setDir(new java.io.File(pdir));
|
|
1804 var i1 = new String(project.getProperty("pp_jar_fs1"));
|
|
1805 f1.setIncludes(i1);
|
|
1806 f1.setRequiredFor("preloader");
|
|
1807 var f2 = res.createFileSet();
|
|
1808 f2.setProject(project);
|
|
1809 f2.setDir(new java.io.File(pdir));
|
|
1810 var i2b = new String(project.getProperty("pp_jar_fs2"));
|
|
1811 var e2c = new String(project.getProperty("pp_jar_fs1"));
|
|
1812 f2.setIncludes(i2b);
|
|
1813 f2.setExcludes(e2c);
|
|
1814 f2.setRequiredFor("startup");
|
|
1815 var lazyjars = getLazyJars();
|
|
1816 if(lazyjars != null) {
|
|
1817 var f3 = res.createFileSet();
|
|
1818 f3.setProject(project);
|
|
1819 f3.setDir(new java.io.File(pdir));
|
|
1820 f3.setRequiredFor("runtime");
|
|
1821 setDownloadMode(f2,f3,lazyjars);
|
|
1822 }
|
|
1823 } else {
|
|
1824 var fn = res.createFileSet();
|
|
1825 fn.setProject(project);
|
|
1826 fn.setDir(new java.io.File(pdir));
|
|
1827 var ib = new String(project.getProperty("pp_jar_fs2"));
|
|
1828 fn.setIncludes(ib);
|
|
1829 fn.setRequiredFor("startup");
|
|
1830 var lazyjars = getLazyJars();
|
|
1831 if(lazyjars != null) {
|
|
1832 var fn2 = res.createFileSet();
|
|
1833 fn2.setProject(project);
|
|
1834 fn2.setDir(new java.io.File(pdir));
|
|
1835 fn2.setRequiredFor("runtime");
|
|
1836 setDownloadMode(fn,fn2,lazyjars);
|
|
1837 }
|
|
1838 }
|
|
1839
|
|
1840 // fileset to exclude *.css or *.bss
|
|
1841 var fs = jar.createFileSet();
|
|
1842 fs.setProject(project);
|
|
1843 var buildcls = new String(project.getProperty("pp_jar_buildclasses"));
|
|
1844 var exc = new String(project.getProperty("pp_jar_cssbss"));
|
|
1845 fs.setDir(new java.io.File(buildcls));
|
|
1846 fs.setExcludes(exc);
|
|
1847
|
|
1848 // manifest
|
|
1849 var man = jar.createManifest();
|
|
1850 var userManifestPath = project.getProperty("manifest.file");
|
|
1851 if (userManifestPath) {
|
|
1852 var userManifestFile = project.resolveFile(userManifestPath);
|
|
1853 if (userManifestFile.isFile()) {
|
|
1854 var manifestEncoding = project.getProperty("manifest.encoding");
|
|
1855 var userManifestReader = manifestEncoding ?
|
|
1856 new java.io.InputStreamReader(
|
|
1857 new java.io.FileInputStream(userManifestFile),
|
|
1858 manifestEncoding) :
|
|
1859 new java.io.InputStreamReader(
|
|
1860 new java.io.FileInputStream(userManifestFile));
|
|
1861 try {
|
|
1862 var userManifest = new org.apache.tools.ant.taskdefs.Manifest(userManifestReader);
|
|
1863 man.merge(userManifest);
|
|
1864 } finally {
|
|
1865 userManifestReader.close();
|
|
1866 }
|
|
1867 }
|
|
1868 }
|
|
1869 var a1val = new String(project.getProperty("application.vendor"));
|
|
1870 var a1 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1871 a1.setName("Implementation-Vendor");
|
|
1872 a1.setValue(a1val);
|
|
1873 man.addConfiguredAttribute(a1);
|
|
1874 var a2val = new String(project.getProperty("application.title"));
|
|
1875 var a2 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1876 a2.setName("Implementation-Title");
|
|
1877 a2.setValue(a2val);
|
|
1878 man.addConfiguredAttribute(a2);
|
|
1879 if(defined(appversion)) {
|
|
1880 var a3 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1881 a3.setName("Implementation-Version");
|
|
1882 a3.setValue(appversion);
|
|
1883 man.addConfiguredAttribute(a3);
|
|
1884 }
|
|
1885 var a4prop = new String(project.getProperty("javafx.deploy.disable.proxy"));
|
|
1886 if(isTrue(a4prop)) {
|
|
1887 var a4 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1888 a4.setName("JavaFX-Feature-Proxy");
|
|
1889 a4.setValue("None");
|
|
1890 man.addConfiguredAttribute(a4);
|
|
1891 }
|
|
1892 // custom manifest entries
|
|
1893 var searchManifestHides = project.getProperties().keys();
|
|
1894 var manifestHides = new Array();
|
|
1895 while(searchManifestHides.hasMoreElements()) {
|
|
1896 // collect all hidden property names
|
|
1897 var pns = new String(searchManifestHides.nextElement());
|
|
1898 if(startsWith(pns, JFXMAN) && endsWith(pns, JFXPARN)) {
|
|
1899 var propns = new String(project.getProperty(pns));
|
|
1900 var phs = replaceSuffix(pns, JFXPARN, JFXPARH);
|
|
1901 var proph = new String(project.getProperty(phs));
|
|
1902 if(isTrue(proph)) {
|
|
1903 manifestHides.push(propns);
|
|
1904 }
|
|
1905 }
|
|
1906 }
|
|
1907 var manifestKeys = project.getProperties().keys();
|
|
1908 while(manifestKeys.hasMoreElements()) {
|
|
1909 var pn = new String(manifestKeys.nextElement());
|
|
1910 if(startsWith(pn, JFXMAN) && endsWith(pn, JFXPARN)) {
|
|
1911 var propn = new String(project.getProperty(pn));
|
|
1912 if(defined(propn) && !contains(manifestHides, propn)) {
|
|
1913 var propnr = propn.replace(/\s/g, "-");
|
|
1914 var entry = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1915 entry.setName(propnr);
|
|
1916 var pv = replaceSuffix(pn, JFXPARN, JFXPARV);
|
|
1917 var propv = new String(project.getProperty(pv));
|
|
1918 if(defined(propv)) {
|
|
1919 entry.setValue(propv);
|
|
1920 } else {
|
|
1921 entry.setValue("");
|
|
1922 }
|
|
1923 man.addConfiguredAttribute(entry);
|
|
1924 }
|
|
1925 }
|
|
1926 }
|
|
1927 var profileAvailable = new String(project.getProperty("profile.available"));
|
|
1928 if (defined(profileAvailable)) {
|
|
1929 var profileAttribute = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1930 profileAttribute.setName("Profile");
|
|
1931 profileAttribute.setValue(new String(project.getProperty("javac.profile")));
|
|
1932 man.addConfiguredAttribute(profileAttribute);
|
|
1933 }
|
|
1934 var perm_elev = new String(project.getProperty("permissions.elevated"));
|
|
1935 var cust_perm = new String(project.getProperty("manifest.custom.permissions"));
|
|
1936 var cust_cb = new String(project.getProperty("manifest.custom.codebase"));
|
|
1937 var sa1 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1938 sa1.setName("Codebase");
|
|
1939 if(!defined(cust_cb) || cust_cb == "*") {
|
|
1940 sa1.setValue("*");
|
|
1941 print("Warning: From JDK7u25 the Codebase manifest attribute should be used to restrict JAR repurposing.");
|
|
1942 print(" Please set manifest.custom.codebase property to override the current default non-secure value '*'.");
|
|
1943 } else {
|
|
1944 sa1.setValue(cust_cb);
|
|
1945 }
|
|
1946 man.addConfiguredAttribute(sa1);
|
|
1947 var sa2 = new org.apache.tools.ant.taskdefs.Manifest.Attribute();
|
|
1948 sa2.setName("Permissions");
|
|
1949 if(!defined(cust_perm)) {
|
|
1950 if(isTrue(perm_elev)) {
|
|
1951 sa2.setValue("all-permissions");
|
|
1952 } else {
|
|
1953 sa2.setValue("sandbox");
|
|
1954 }
|
|
1955 } else {
|
|
1956 if(cust_perm == "all-permissions") {
|
|
1957 sa2.setValue("all-permissions");
|
|
1958 } else {
|
|
1959 sa2.setValue("sandbox");
|
|
1960 }
|
|
1961 }
|
|
1962 man.addConfiguredAttribute(sa2);
|
|
1963 // Note: see JavaFX Jira issue #RT-25003 if attribute names are created lowercase in manifest
|
|
1964
|
|
1965 jar.perform();
|
|
1966 ]]>
|
|
1967 </script>
|
|
1968 <antcall target="-post-jfx-jar"/>
|
|
1969 </sequential>
|
|
1970 </macrodef>
|
|
1971
|
|
1972 <macrodef name="deploy-sign">
|
|
1973 <sequential>
|
|
1974 <echo message="keystore=${javafx.signjar.keystore}" level="verbose"/>
|
|
1975 <echo message="storepass=${javafx.signjar.storepass}" level="verbose"/>
|
|
1976 <echo message="alias=${javafx.signjar.alias}" level="verbose"/>
|
|
1977 <echo message="keypass=${javafx.signjar.keypass}" level="verbose"/>
|
|
1978 <signjar keystore="${javafx.signjar.keystore}"
|
|
1979 storepass="${javafx.signjar.storepass}"
|
|
1980 alias="${javafx.signjar.alias}"
|
|
1981 keypass="${javafx.signjar.keypass}">
|
|
1982 <fileset dir="${jfx.deployment.dir}">
|
|
1983 <include name="${jfx.deployment.jar}"/>
|
|
1984 <include name="lib${file.separator}*.jar"/>
|
|
1985 </fileset>
|
|
1986 </signjar>
|
|
1987 </sequential>
|
|
1988 </macrodef>
|
|
1989
|
|
1990 <macrodef name="deploy-sign-blob">
|
|
1991 <sequential>
|
|
1992 <echo message="keystore=${javafx.signjar.keystore}" level="verbose"/>
|
|
1993 <echo message="storepass=${javafx.signjar.storepass}" level="verbose"/>
|
|
1994 <echo message="alias=${javafx.signjar.alias}" level="verbose"/>
|
|
1995 <echo message="keypass=${javafx.signjar.keypass}" level="verbose"/>
|
|
1996 <echo message="Launching <fx:signjar> task from ${ant-javafx.jar.location}" level="info"/>
|
|
1997 <fx:signjar keystore="${javafx.signjar.keystore}"
|
|
1998 storepass="${javafx.signjar.storepass}"
|
|
1999 alias="${javafx.signjar.alias}"
|
|
2000 keypass="${javafx.signjar.keypass}">
|
|
2001 <fileset dir="${jfx.deployment.dir}">
|
|
2002 <include name="${jfx.deployment.jar}"/>
|
|
2003 <include name="lib${file.separator}*.jar"/>
|
|
2004 </fileset>
|
|
2005 </fx:signjar>
|
|
2006 </sequential>
|
|
2007 </macrodef>
|
|
2008
|
|
2009 <macrodef name="deploy-sign-preloader">
|
|
2010 <sequential>
|
|
2011 <echo message="keystore=${javafx.signjar.keystore}" level="verbose"/>
|
|
2012 <echo message="storepass=${javafx.signjar.storepass}" level="verbose"/>
|
|
2013 <echo message="alias=${javafx.signjar.alias}" level="verbose"/>
|
|
2014 <echo message="keypass=${javafx.signjar.keypass}" level="verbose"/>
|
|
2015 <signjar keystore="${javafx.signjar.keystore}"
|
|
2016 storepass="${javafx.signjar.storepass}"
|
|
2017 alias="${javafx.signjar.alias}"
|
|
2018 keypass="${javafx.signjar.keypass}">
|
|
2019 <fileset dir="${jfx.deployment.dir}">
|
|
2020 <include name="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2021 </fileset>
|
|
2022 </signjar>
|
|
2023 <signjar keystore="${javafx.signjar.keystore}"
|
|
2024 storepass="${javafx.signjar.storepass}"
|
|
2025 alias="${javafx.signjar.alias}"
|
|
2026 keypass="${javafx.signjar.keypass}">
|
|
2027 <fileset dir="${jfx.deployment.dir}">
|
|
2028 <include name="${jfx.deployment.jar}"/>
|
|
2029 <include name="lib${file.separator}*.jar"/>
|
|
2030 <exclude name="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2031 </fileset>
|
|
2032 </signjar>
|
|
2033 </sequential>
|
|
2034 </macrodef>
|
|
2035
|
|
2036 <macrodef name="deploy-sign-blob-preloader">
|
|
2037 <sequential>
|
|
2038 <echo message="keystore=${javafx.signjar.keystore}" level="verbose"/>
|
|
2039 <echo message="storepass=${javafx.signjar.storepass}" level="verbose"/>
|
|
2040 <echo message="alias=${javafx.signjar.alias}" level="verbose"/>
|
|
2041 <echo message="keypass=${javafx.signjar.keypass}" level="verbose"/>
|
|
2042 <signjar keystore="${javafx.signjar.keystore}"
|
|
2043 storepass="${javafx.signjar.storepass}"
|
|
2044 alias="${javafx.signjar.alias}"
|
|
2045 keypass="${javafx.signjar.keypass}">
|
|
2046 <fileset dir="${jfx.deployment.dir}">
|
|
2047 <include name="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2048 </fileset>
|
|
2049 </signjar>
|
|
2050 <echo message="Launching <fx:signjar> task from ${ant-javafx.jar.location}" level="info"/>
|
|
2051 <fx:signjar keystore="${javafx.signjar.keystore}"
|
|
2052 storepass="${javafx.signjar.storepass}"
|
|
2053 alias="${javafx.signjar.alias}"
|
|
2054 keypass="${javafx.signjar.keypass}">
|
|
2055 <fileset dir="${jfx.deployment.dir}">
|
|
2056 <include name="${jfx.deployment.jar}"/>
|
|
2057 <include name="lib${file.separator}*.jar"/>
|
|
2058 <exclude name="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2059 </fileset>
|
|
2060 </fx:signjar>
|
|
2061 </sequential>
|
|
2062 </macrodef>
|
|
2063
|
|
2064 <macrodef name="deploy-process-template">
|
|
2065 <sequential>
|
|
2066 <echo message="javafx.run.htmltemplate = ${javafx.run.htmltemplate}" level="verbose"/>
|
|
2067 <pathconvert property="javafx.run.htmltemplate.processed">
|
|
2068 <path path="${javafx.run.htmltemplate}"/>
|
|
2069 <mapper>
|
|
2070 <chainedmapper>
|
|
2071 <flattenmapper/>
|
|
2072 <globmapper from="*" to="${jfx.deployment.dir}${file.separator}*" casesensitive="no"/>
|
|
2073 </chainedmapper>
|
|
2074 </mapper>
|
|
2075 </pathconvert>
|
|
2076 <echo message="javafx.run.htmltemplate.processed = ${javafx.run.htmltemplate.processed}" level="verbose"/>
|
|
2077 </sequential>
|
|
2078 </macrodef>
|
|
2079
|
|
2080 <!-- fx:deploy scripted call enables passing of arbitrarily long lists of params, vmoptions and callbacks and fx-version dependent behavior -->
|
|
2081 <macrodef name="deploy-deploy">
|
|
2082 <sequential>
|
|
2083 <antcall target="-pre-jfx-deploy"/>
|
|
2084 <antcall target="-call-pre-jfx-native"/>
|
|
2085 <echo message="javafx.ant.classpath = ${javafx.ant.classpath}" level="verbose"/>
|
|
2086 <typedef name="fx_deploy" classname="com.sun.javafx.tools.ant.DeployFXTask" classpath="${javafx.ant.classpath}"/>
|
|
2087 <echo message="Launching <fx:deploy> task from ${ant-javafx.jar.location}" level="info"/>
|
|
2088 <property name="pp_deploy_dir" value="${jfx.deployment.dir}"/>
|
|
2089 <property name="pp_deploy_fs1" value="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2090 <property name="pp_deploy_fs2" value="lib${file.separator}*.jar"/>
|
|
2091 <echo message="deploy_deploy: pp_deploy_dir = ${pp_deploy_dir}" level="verbose"/>
|
|
2092 <echo message="deploy_deploy: pp_deploy_fs1 = ${pp_deploy_fs1}" level="verbose"/>
|
|
2093 <echo message="deploy_deploy: pp_deploy_fs2 = ${pp_deploy_fs2}" level="verbose"/>
|
|
2094 <echo message="JavaScript: deploy-deploy" level="verbose"/>
|
|
2095 <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
|
|
2096 <script language="javascript">
|
|
2097 <![CDATA[
|
|
2098 function isTrue(prop) {
|
|
2099 return prop != null &&
|
|
2100 (prop.toLowerCase()=="true" || prop.toLowerCase()=="yes" || prop.toLowerCase()=="on");
|
|
2101 }
|
|
2102 function prefix(s, len) {
|
|
2103 if(s == null || len <= 0 || s.length == 0) {
|
|
2104 return new String("");
|
|
2105 }
|
|
2106 return new String(s.substr(0, len));
|
|
2107 }
|
|
2108 function replaceSuffix(s, os, ns) {
|
|
2109 return prefix(s, s.indexOf(os)).concat(ns);
|
|
2110 }
|
|
2111 function startsWith(s, prefix) {
|
|
2112 return (s != null) && (s.indexOf(prefix) == 0);
|
|
2113 }
|
|
2114 function endsWith(s, suffix) {
|
|
2115 var i = s.lastIndexOf(suffix);
|
|
2116 return (i != -1) && (i == (s.length - suffix.length));
|
|
2117 }
|
|
2118 function defined(s) {
|
|
2119 return (s != null) && (s != "null") && (s.length > 0);
|
|
2120 }
|
|
2121 function contains(array, prop) {
|
|
2122 for (var i = 0; i < array.length; i++) {
|
|
2123 var s1 = new String(array[i]);
|
|
2124 var s2 = new String(prop);
|
|
2125 if( s1.toLowerCase() == s2.toLowerCase() ) {
|
|
2126 return true;
|
|
2127 }
|
|
2128 }
|
|
2129 return false;
|
|
2130 }
|
|
2131 var S = java.io.File.separator;
|
|
2132 var JFXPAR = "javafx.param";
|
|
2133 var JFXPARN = "name";
|
|
2134 var JFXPARV = "value";
|
|
2135 var JFXPARH = "hidden";
|
|
2136 var JFXCALLB = "javafx.jscallback";
|
|
2137 var JFXLAZY = "download.mode.lazy.jar";
|
|
2138 var withpreloader = new String(project.getProperty("app-with-preloader"));
|
|
2139 var fx_ant_api_1_1 = new String(project.getProperty("have-fx-ant-api-1.1"));
|
|
2140 var fx_ant_api_1_2 = new String(project.getProperty("have-fx-ant-api-1.2"));
|
|
2141 var have_jdk_pre7u14 = new String(project.getProperty("have-jdk-pre7u14"));
|
|
2142 var fx_in_swing_app = new String(project.getProperty("fx-in-swing-app"));
|
|
2143 var debug_in_browser = new String(project.getProperty("project.state.debugging.in.browser"));
|
|
2144
|
|
2145 // get jars with lazy download mode property set
|
|
2146 function getLazyJars() {
|
|
2147 var jars = new Array();
|
|
2148 var keys = project.getProperties().keys();
|
|
2149 while(keys.hasMoreElements()) {
|
|
2150 var pn = new String(keys.nextElement());
|
|
2151 if(startsWith(pn, JFXLAZY)) {
|
|
2152 var fname = pn.substring(JFXLAZY.length+1);
|
|
2153 jars.push(fname);
|
|
2154 }
|
|
2155 }
|
|
2156 return jars.length > 0 ? jars : null;
|
|
2157 }
|
|
2158 // set download mode of dependent libraries
|
|
2159 function setDownloadMode(fsEager, fsLazy, jars) {
|
|
2160 for(var i = 0; i < jars.length; i++) {
|
|
2161 fsEager.setExcludes("lib" + S + jars[i]);
|
|
2162 fsLazy.setIncludes("lib" + S + jars[i]);
|
|
2163 }
|
|
2164 }
|
|
2165 // convert path to absolute if relative
|
|
2166 function derelativizePath(path) {
|
|
2167 var f = new java.io.File(path);
|
|
2168 if(!f.exists()) {
|
|
2169 f = new java.io.File(new String(project.getBaseDir()) + S + path);
|
|
2170 }
|
|
2171 if(f.exists()) {
|
|
2172 try {
|
|
2173 return f.getCanonicalPath();
|
|
2174 } catch(err) {
|
|
2175 return path;
|
|
2176 }
|
|
2177 }
|
|
2178 return path;
|
|
2179 }
|
|
2180
|
|
2181 // fx:deploy
|
|
2182 var deploy = project.createTask("fx_deploy");
|
|
2183 deploy.setProject(project);
|
|
2184 var width = new String(project.getProperty("javafx.width"));
|
|
2185 var height = new String(project.getProperty("javafx.height"));
|
|
2186 var outdir = new String(project.getProperty("jfx.deployment.dir"));
|
|
2187 var embedJNLP = new String(project.getProperty("javafx.deploy.embedJNLP"));
|
|
2188 var updatemode = new String(project.getProperty("update-mode"));
|
|
2189 var outfile = new String(project.getProperty("application.title"));
|
|
2190 var includeDT = new String(project.getProperty("javafx.deploy.includeDT"));
|
|
2191 var offline = new String(project.getProperty("javafx.deploy.allowoffline"));
|
|
2192 if (width.indexOf("%") != -1) {
|
|
2193 deploy.setEmbeddedWidth(width);
|
|
2194 deploy.setWidth(800);
|
|
2195 } else {
|
|
2196 deploy.setWidth(width);
|
|
2197 }
|
|
2198 if (height.indexOf("%") != -1) {
|
|
2199 deploy.setEmbeddedHeight(height);
|
|
2200 deploy.setHeight(600);
|
|
2201 } else {
|
|
2202 deploy.setHeight(height);
|
|
2203 }
|
|
2204 deploy.setOutdir(outdir);
|
|
2205 deploy.setEmbedJNLP(isTrue(embedJNLP));
|
|
2206 deploy.setUpdateMode(updatemode);
|
|
2207 deploy.setOutfile(outfile);
|
|
2208 deploy.setIncludeDT(isTrue(includeDT));
|
|
2209 if(defined(offline)) {
|
|
2210 if(isTrue(fx_ant_api_1_1)) {
|
|
2211 deploy.setOfflineAllowed(isTrue(offline));
|
|
2212 } else {
|
|
2213 print("Warning: offlineAllowed not supported by this version of JavaFX SDK deployment Ant task. Please upgrade JavaFX to 2.0.2 or higher.");
|
|
2214 }
|
|
2215 }
|
|
2216 // native packaging (time consuming, thus applied in explicit build only)
|
|
2217 var nativeEnabled = new String(project.getProperty("do.build.native.package"));
|
|
2218 var nativeType = new String(project.getProperty("javafx.native.bundling.type"));
|
|
2219 var projStateRun = new String(project.getProperty("project.state.running"));
|
|
2220 var projStateDbg = new String(project.getProperty("project.state.debugging"));
|
|
2221 var projStatePrf = new String(project.getProperty("project.state.profiling"));
|
|
2222 if(isTrue(nativeEnabled) && defined(nativeType) && nativeType != "none") {
|
|
2223 if(!isTrue(projStateRun) && !isTrue(projStateDbg) && !isTrue(projStatePrf)) {
|
|
2224 if(isTrue(fx_ant_api_1_2)) {
|
|
2225 deploy.setNativeBundles(nativeType);
|
|
2226 print("Note: To create native bundles the <fx:deploy> task may require external tools. See JavaFX 2.2+ documentation for details.");
|
|
2227 print("");
|
|
2228 print("Launching <fx:deploy> in native packager mode...");
|
|
2229 } else {
|
|
2230 print("Warning: Native packaging is not supported by this version of JavaFX SDK deployment Ant task. Please upgrade to JDK 7u6 or higher.");
|
|
2231 }
|
|
2232 }
|
|
2233 }
|
|
2234
|
|
2235 // fx:application
|
|
2236 var app = deploy.createApplication();
|
|
2237 app.setProject(project);
|
|
2238 var title = new String(project.getProperty("application.title"));
|
|
2239 var mainclass;
|
|
2240 if(isTrue(fx_in_swing_app) && isTrue(fx_ant_api_1_2)) {
|
|
2241 mainclass = new String(project.getProperty("main.class"));
|
|
2242 app.setToolkit("swing");
|
|
2243 } else {
|
|
2244 mainclass = new String(project.getProperty("javafx.main.class"));
|
|
2245 }
|
|
2246 var fallback = new String(project.getProperty("javafx.fallback.class"));
|
|
2247 app.setName(title);
|
|
2248 app.setMainClass(mainclass);
|
|
2249 app.setFallbackClass(fallback);
|
|
2250 if(isTrue(withpreloader)) {
|
|
2251 preloaderclass = new String(project.getProperty("javafx.preloader.class"));
|
|
2252 app.setPreloaderClass(preloaderclass);
|
|
2253 }
|
|
2254 var appversion = new String(project.getProperty("javafx.application.implementation.version"));
|
|
2255 if(defined(appversion)) {
|
|
2256 app.setVersion(appversion);
|
|
2257 } else {
|
|
2258 app.setVersion("1.0");
|
|
2259 }
|
|
2260 // fx:param, fx:argument
|
|
2261 var searchHides = project.getProperties().keys();
|
|
2262 var hides = new Array();
|
|
2263 while(searchHides.hasMoreElements()) {
|
|
2264 // collect all hidden property names
|
|
2265 var pns = new String(searchHides.nextElement());
|
|
2266 if(startsWith(pns, JFXPAR) && endsWith(pns, JFXPARN)) {
|
|
2267 var propns = new String(project.getProperty(pns));
|
|
2268 var phs = replaceSuffix(pns, JFXPARN, JFXPARH);
|
|
2269 var proph = new String(project.getProperty(phs));
|
|
2270 if(isTrue(proph)) {
|
|
2271 hides.push(propns);
|
|
2272 }
|
|
2273 }
|
|
2274 }
|
|
2275 var keys = project.getProperties().keys();
|
|
2276 while(keys.hasMoreElements()) {
|
|
2277 var pn = new String(keys.nextElement());
|
|
2278 if(startsWith(pn, JFXPAR) && endsWith(pn, JFXPARN)) {
|
|
2279 var propn = new String(project.getProperty(pn));
|
|
2280 if(defined(propn) && !contains(hides, propn)) {
|
|
2281 var pv = replaceSuffix(pn, JFXPARN, JFXPARV);
|
|
2282 var propv = new String(project.getProperty(pv));
|
|
2283 if(defined(propv)) {
|
|
2284 var par = app.createParam();
|
|
2285 par.setName(propn);
|
|
2286 par.setValue(propv);
|
|
2287 } else {
|
|
2288 if(isTrue(fx_ant_api_1_1)) {
|
|
2289 var arg = app.createArgument();
|
|
2290 arg.addText(propn);
|
|
2291 } else {
|
|
2292 print("Warning: Unnamed parameters not supported by this version of JavaFX SDK deployment Ant tasks. Upgrade JavaFX to 2.0.2 or higher.");
|
|
2293 }
|
|
2294 }
|
|
2295 }
|
|
2296 }
|
|
2297 }
|
|
2298
|
|
2299 // fx:resources
|
|
2300 var res = deploy.createResources();
|
|
2301 res.setProject(project);
|
|
2302 var deploydir = new String(project.getProperty("pp_deploy_dir"));
|
|
2303 if(isTrue(withpreloader)) {
|
|
2304 var f1 = res.createFileSet();
|
|
2305 f1.setProject(project);
|
|
2306 f1.setDir(new java.io.File(deploydir));
|
|
2307 var i1 = new String(project.getProperty("pp_deploy_fs1"));
|
|
2308 f1.setIncludes(i1);
|
|
2309 f1.setRequiredFor("preloader");
|
|
2310 var f2 = res.createFileSet();
|
|
2311 f2.setProject(project);
|
|
2312 f2.setDir(new java.io.File(deploydir));
|
|
2313 var i2a = new String(project.getProperty("jfx.deployment.jar"));
|
|
2314 var i2b = new String(project.getProperty("pp_deploy_fs2"));
|
|
2315 var e2c = new String(project.getProperty("pp_deploy_fs1"));
|
|
2316 f2.setIncludes(i2a);
|
|
2317 f2.setIncludes(i2b);
|
|
2318 f2.setExcludes(e2c);
|
|
2319 f2.setRequiredFor("startup");
|
|
2320 var lazyjars = getLazyJars();
|
|
2321 if(lazyjars != null) {
|
|
2322 var f3 = res.createFileSet();
|
|
2323 f3.setProject(project);
|
|
2324 f3.setDir(new java.io.File(deploydir));
|
|
2325 f3.setRequiredFor("runtime");
|
|
2326 setDownloadMode(f2,f3,lazyjars);
|
|
2327 }
|
|
2328 } else {
|
|
2329 var fn = res.createFileSet();
|
|
2330 fn.setProject(project);
|
|
2331 fn.setDir(new java.io.File(deploydir));
|
|
2332 var ia = new String(project.getProperty("jfx.deployment.jar"));
|
|
2333 var ib = new String(project.getProperty("pp_deploy_fs2"));
|
|
2334 fn.setIncludes(ia);
|
|
2335 fn.setIncludes(ib);
|
|
2336 fn.setRequiredFor("startup");
|
|
2337 var lazyjars = getLazyJars();
|
|
2338 if(lazyjars != null) {
|
|
2339 var fn2 = res.createFileSet();
|
|
2340 fn2.setProject(project);
|
|
2341 fn2.setDir(new java.io.File(deploydir));
|
|
2342 fn2.setRequiredFor("runtime");
|
|
2343 setDownloadMode(fn,fn2,lazyjars);
|
|
2344 }
|
|
2345 }
|
|
2346
|
|
2347 // fx:info
|
|
2348 var info = deploy.createInfo();
|
|
2349 info.setProject(project);
|
|
2350 var vendor = new String(project.getProperty("application.vendor"));
|
|
2351 var description = new String(project.getProperty("application.desc"));
|
|
2352 info.setTitle(title); // title known from before
|
|
2353 info.setVendor(vendor);
|
|
2354 info.setDescription(description);
|
|
2355 var splash = new String(project.getProperty("javafx.deploy.splash"));
|
|
2356 if(defined(splash)) {
|
|
2357 if(isTrue(fx_ant_api_1_1)) {
|
|
2358 var sicon = info.createSplash();
|
|
2359 sicon.setHref(splash);
|
|
2360 sicon.setMode("any");
|
|
2361 print("Adding splash image reference: " + splash);
|
|
2362 } else {
|
|
2363 print("Warning: Splash Image not supported by this version of JavaFX SDK deployment Ant task. Please upgrade JavaFX to 2.0.2 or higher.");
|
|
2364 }
|
|
2365 }
|
|
2366 if(isTrue(nativeEnabled) && defined(nativeType) && nativeType != "none") {
|
|
2367 var icon = new String(project.getProperty("javafx.deploy.icon.native"));
|
|
2368 if(defined(icon)) {
|
|
2369 if(isTrue(fx_ant_api_1_2) && !isTrue(have_jdk_pre7u14)) {
|
|
2370 var dicon = derelativizePath(icon);
|
|
2371 // create temporary icon copy renamed to application name (required by native packager)
|
|
2372 var baseDir = new String(project.getProperty("basedir"));
|
|
2373 var buildDir = new String(project.getProperty("build.dir"));
|
|
2374 var deployBase = new String(project.getProperty("jfx.deployment.base"));
|
|
2375 var copyTask = project.createTask("copy");
|
|
2376 var source = new java.io.File(dicon);
|
|
2377 var sourceName = new String(source.getName());
|
|
2378 var lastDot = sourceName.lastIndexOf(".");
|
|
2379 var sourceExt;
|
|
2380 if(lastDot >=0) {
|
|
2381 sourceExt = sourceName.substr(lastDot);
|
|
2382 } else {
|
|
2383 sourceExt = new String("");
|
|
2384 }
|
|
2385 var target = new java.io.File(baseDir.concat(S).concat(buildDir).concat(S).concat("icon").concat(S).concat(deployBase).concat(sourceExt));
|
|
2386 copyTask.setFile(source);
|
|
2387 copyTask.setTofile(target);
|
|
2388 copyTask.setFlatten(true);
|
|
2389 copyTask.setFailOnError(false);
|
|
2390 copyTask.perform();
|
|
2391 var tempicon;
|
|
2392 if(target.exists()) {
|
|
2393 try {
|
|
2394 tempicon = target.getCanonicalPath();
|
|
2395 } catch(err) {
|
|
2396 tempicon = dicon;
|
|
2397 }
|
|
2398 } else {
|
|
2399 tempicon = dicon;
|
|
2400 }
|
|
2401 var nicon = info.createIcon();
|
|
2402 nicon.setHref(tempicon);
|
|
2403 print("Source native icon reference: " + dicon);
|
|
2404 print("Processed native icon reference: " + tempicon);
|
|
2405 } else {
|
|
2406 print("Warning: Native Package icon not supported by this version of JavaFX SDK deployment Ant task. Please upgrade to JDK7u14.");
|
|
2407 }
|
|
2408 }
|
|
2409 } else {
|
|
2410 var icon = new String(project.getProperty("javafx.deploy.icon"));
|
|
2411 if(defined(icon)) {
|
|
2412 if(isTrue(fx_ant_api_1_1)) {
|
|
2413 var iicon = info.createIcon();
|
|
2414 iicon.setHref(icon);
|
|
2415 print("Adding WebStart icon reference: " + icon);
|
|
2416 } else {
|
|
2417 print("Warning: WebStart Icon not supported by this version of JavaFX SDK deployment Ant task. Please upgrade JavaFX to 2.0.2 or higher.");
|
|
2418 }
|
|
2419 }
|
|
2420 }
|
|
2421
|
|
2422 // fx:permissions
|
|
2423 var perm = deploy.createPermissions();
|
|
2424 perm.setProject(project);
|
|
2425 var elev = new String(project.getProperty("permissions.elevated"));
|
|
2426 perm.setElevated(isTrue(elev));
|
|
2427
|
|
2428 // fx:preferences
|
|
2429 var pref = deploy.createPreferences();
|
|
2430 pref.setProject(project);
|
|
2431 var scut = new String(project.getProperty("javafx.deploy.adddesktopshortcut"));
|
|
2432 var instp = new String(project.getProperty("javafx.deploy.installpermanently"));
|
|
2433 var smenu = new String(project.getProperty("javafx.deploy.addstartmenushortcut"));
|
|
2434 pref.setShortcut(isTrue(scut));
|
|
2435 pref.setInstall(isTrue(instp));
|
|
2436 pref.setMenu(isTrue(smenu));
|
|
2437
|
|
2438 // fx:template
|
|
2439 var templ = new String(project.getProperty("javafx.run.htmltemplate"));
|
|
2440 var templp = new String(project.getProperty("javafx.run.htmltemplate.processed"));
|
|
2441 if(defined(templ) && defined(templp)) {
|
|
2442 var temp = deploy.createTemplate();
|
|
2443 temp.setProject(project);
|
|
2444 temp.setFile(new java.io.File(templ));
|
|
2445 temp.setTofile(new java.io.File(templp));
|
|
2446 }
|
|
2447
|
|
2448 // fx:platform
|
|
2449 var plat = deploy.createPlatform();
|
|
2450 plat.setProject(project);
|
|
2451 var requestRT = new String(project.getProperty("javafx.deploy.request.runtime"));
|
|
2452 if(defined(requestRT)) {
|
|
2453 plat.setJavafx(requestRT);
|
|
2454 }
|
|
2455 var jvmargs = new String(project.getProperty("run.jvmargs"));
|
|
2456 if(defined(jvmargs)) {
|
|
2457 var jvmargss = jvmargs.split(" ");
|
|
2458 for(var i = 0; i < jvmargss.length; i++) {
|
|
2459 if(defined(jvmargss[i])) {
|
|
2460 var vmarg = plat.createJvmarg();
|
|
2461 vmarg.setValue(jvmargss[i]);
|
|
2462 }
|
|
2463 }
|
|
2464 }
|
|
2465 if(isTrue(debug_in_browser)) {
|
|
2466 var vmarg = plat.createJvmarg();
|
|
2467 vmarg.setValue(new String("-ea:javafx.browserdebug"));
|
|
2468 }
|
|
2469 if(isTrue(nativeEnabled) && defined(nativeType) && nativeType != "none") {
|
|
2470 if(!isTrue(projStateRun) && !isTrue(projStateDbg) && !isTrue(projStatePrf)) {
|
|
2471 if(plat.setBasedir) {
|
|
2472 var sdkdir = new String(project.getProperty("javafx.sdk"));
|
|
2473 if(defined(sdkdir)) {
|
|
2474 plat.setBasedir(sdkdir);
|
|
2475 }
|
|
2476 } else {
|
|
2477 print("Note: the current version of native packager Ant task can bundle the default JRE only.");
|
|
2478 }
|
|
2479 }
|
|
2480 }
|
|
2481
|
|
2482 // fx:callbacks
|
|
2483 var callbs = deploy.createCallbacks();
|
|
2484 callbs.setProject(project);
|
|
2485 var keys = project.getProperties().keys();
|
|
2486 while(keys.hasMoreElements()) {
|
|
2487 var pn = new String(keys.nextElement());
|
|
2488 if(startsWith(pn, JFXCALLB)) {
|
|
2489 var prop = new String(project.getProperty(pn));
|
|
2490 if(defined(prop)) {
|
|
2491 var cname = pn.substring(JFXCALLB.length+1);
|
|
2492 var cb = callbs.createCallback();
|
|
2493 cb.setProject(project);
|
|
2494 cb.setName(cname);
|
|
2495 cb.addText(prop);
|
|
2496 }
|
|
2497 }
|
|
2498 }
|
|
2499
|
|
2500 deploy.perform();
|
|
2501 ]]>
|
|
2502 </script>
|
|
2503 <antcall target="-post-jfx-deploy"/>
|
|
2504 <antcall target="-call-post-jfx-native"/>
|
|
2505 </sequential>
|
|
2506 </macrodef>
|
|
2507
|
|
2508 <!-- JavaFX SDK 2.0.x and 2.1.x deploy task can not generate pre-FX jnlp which is needed for FX-in-Swing projects-->
|
|
2509 <macrodef name="deploy-deploy-swing">
|
|
2510 <sequential>
|
|
2511 <antcall target="-pre-jfx-deploy"/>
|
|
2512 <local name="permissions-elevated-token"/>
|
|
2513 <condition property="permissions-elevated-token" value="${line.separator} <security>${line.separator} <all-permissions/>${line.separator} </security>" else="">
|
|
2514 <isset property="permissions-elevated"/>
|
|
2515 </condition>
|
|
2516 <local name="offline-allowed-token"/>
|
|
2517 <condition property="offline-allowed-token" value="${line.separator} <offline-allowed/>" else="">
|
|
2518 <isset property="offline-allowed"/>
|
|
2519 </condition>
|
|
2520 <local name="update-mode-background-token"/>
|
|
2521 <condition property="update-mode-background-token" value="background" else="always">
|
|
2522 <isset property="update-mode-background"/>
|
|
2523 </condition>
|
|
2524 <local name="html-template-processed-available"/>
|
|
2525 <condition property="html-template-processed-available">
|
|
2526 <and>
|
|
2527 <isset property="javafx.run.htmltemplate.processed"/>
|
|
2528 <not>
|
|
2529 <equals arg1="${javafx.run.htmltemplate.processed}" arg2=""/>
|
|
2530 </not>
|
|
2531 </and>
|
|
2532 </condition>
|
|
2533 <local name="javafx.deploy.icon.basename"/>
|
|
2534 <basename property="javafx.deploy.icon.basename" file="${javafx.deploy.icon}"/>
|
|
2535 <local name="local-icon-filename-available"/>
|
|
2536 <condition property="local-icon-filename-available">
|
|
2537 <and>
|
|
2538 <isset property="icon-available"/>
|
|
2539 <isset property="javafx.deploy.icon.basename"/>
|
|
2540 <not><equals arg1="${javafx.deploy.icon.basename}" arg2=""/></not>
|
|
2541 <not><contains string="${javafx.deploy.icon.basename}" substring="$${javafx" casesensitive="false"/></not>
|
|
2542 <not><contains string="${javafx.deploy.icon}" substring="http:" casesensitive="false"/></not>
|
|
2543 </and>
|
|
2544 </condition>
|
|
2545 <local name="icon-token"/>
|
|
2546 <condition property="icon-token" value="${line.separator} <icon href="${javafx.deploy.icon.basename}" kind="default"/>">
|
|
2547 <isset property="local-icon-filename-available"/>
|
|
2548 </condition>
|
|
2549 <condition property="icon-token" value="${line.separator} <icon href="${javafx.deploy.icon}" kind="default"/>" else="">
|
|
2550 <isset property="icon-available"/>
|
|
2551 </condition>
|
|
2552 <basename property="dist.filename" file="${dist.jar}" suffix=".jar"/>
|
|
2553 <length file="${dist.jar}" property="dist.jar.size" />
|
|
2554 <local name="vmargs-token"/>
|
|
2555 <condition property="vmargs-token" value="java-vm-args="${run.jvmargs}" " else="">
|
|
2556 <isset property="vmargs-available"/>
|
|
2557 </condition>
|
|
2558 <local name="applet-params-token"/>
|
|
2559 <local name="application-args-token"/>
|
|
2560 <echo message="JavaScript: deploy-deploy-swing 1" level="verbose"/>
|
|
2561 <script language="javascript">
|
|
2562 <![CDATA[
|
|
2563 function prefix(s, len) {
|
|
2564 if(s == null || len <= 0 || s.length == 0) {
|
|
2565 return new String("");
|
|
2566 }
|
|
2567 return new String(s.substr(0, len));
|
|
2568 }
|
|
2569 function replaceSuffix(s, os, ns) {
|
|
2570 return prefix(s, s.indexOf(os)).concat(ns);
|
|
2571 }
|
|
2572 function startsWith(s, prefix) {
|
|
2573 return (s != null) && (s.indexOf(prefix) == 0);
|
|
2574 }
|
|
2575 function endsWith(s, suffix) {
|
|
2576 var i = s.lastIndexOf(suffix);
|
|
2577 return (i != -1) && (i == (s.length - suffix.length));
|
|
2578 }
|
|
2579 function defined(s) {
|
|
2580 return (s != null) && (s != "null") && (s.length > 0);
|
|
2581 }
|
|
2582 var JFXPAR = "javafx.param";
|
|
2583 var JFXPARN = "name";
|
|
2584 var JFXPARV = "value";
|
|
2585
|
|
2586 var params = new java.lang.StringBuilder();
|
|
2587 var args = new java.lang.StringBuilder();
|
|
2588 var keys = project.getProperties().keys();
|
|
2589 while(keys.hasMoreElements()) {
|
|
2590 var pn = new String(keys.nextElement());
|
|
2591 if(startsWith(pn, JFXPAR) && endsWith(pn, JFXPARN)) {
|
|
2592 var propn = new String(project.getProperty(pn));
|
|
2593 if(defined(propn)) {
|
|
2594 var pv = replaceSuffix(pn, JFXPARN, JFXPARV);
|
|
2595 var propv = new String(project.getProperty(pv));
|
|
2596 if(defined(propv)) {
|
|
2597 params.append("\n <param name=\"");
|
|
2598 params.append(propn);
|
|
2599 params.append("\" value=\"");
|
|
2600 params.append(propv);
|
|
2601 params.append("\"/>");
|
|
2602 args.append("\n <argument>");
|
|
2603 args.append(propn);
|
|
2604 args.append("=");
|
|
2605 args.append(propv);
|
|
2606 args.append("</argument>");
|
|
2607 } else {
|
|
2608 params.append("\n <param name=\"");
|
|
2609 params.append(propn);
|
|
2610 params.append("\" value=\"\"/>");
|
|
2611 args.append("\n <argument>");
|
|
2612 args.append(propn);
|
|
2613 args.append("</argument>");
|
|
2614 }
|
|
2615 }
|
|
2616 }
|
|
2617 }
|
|
2618 project.setProperty("applet-params-token", new String(params.toString()));
|
|
2619 project.setProperty("application-args-token", new String(args.toString()));
|
|
2620 ]]>
|
|
2621 </script>
|
|
2622 <local name="application.desc.processed"/>
|
|
2623 <condition property="application.desc.processed" value="${application.desc}" else="Swing applet embedding JavaFX components.">
|
|
2624 <isset property="application.desc"/>
|
|
2625 </condition>
|
|
2626 <filterchain id="jnlp.template.filter">
|
|
2627 <replacetokens>
|
|
2628 <token key="NAME" value="${dist.filename}"/>
|
|
2629 <token key="MAINCLASS" value="${main.class}"/>
|
|
2630 <token key="FILESIZE" value="${dist.jar.size}"/>
|
|
2631 <token key="VENDOR" value="${application.vendor}"/>
|
|
2632 <token key="TITLE" value="${application.title}"/>
|
|
2633 <token key="DESCRIPTION" value="${application.desc.processed}"/>
|
|
2634 <token key="WIDTH" value="${javafx.run.width}"/>
|
|
2635 <token key="HEIGHT" value="${javafx.run.height}"/>
|
|
2636 <token key="PERMISSIONS" value="${permissions-elevated-token}"/>
|
|
2637 <token key="OFFLINE" value="${offline-allowed-token}"/>
|
|
2638 <token key="UPDATEMODE" value="${update-mode-background-token}"/>
|
|
2639 <token key="ICON" value="${icon-token}"/>
|
|
2640 <token key="VMARGS" value="${vmargs-token}"/>
|
|
2641 <token key="PARAMETERS" value="${applet-params-token}"/>
|
|
2642 <token key="ARGUMENTS" value="${application-args-token}"/>
|
|
2643 </replacetokens>
|
|
2644 </filterchain>
|
|
2645 <copy file="${basedir}${file.separator}nbproject${file.separator}templates${file.separator}FXSwingTemplateApplication.jnlp"
|
|
2646 tofile="${dist.dir}${file.separator}${dist.filename}_application.jnlp" >
|
|
2647 <filterchain refid="jnlp.template.filter"/>
|
|
2648 </copy>
|
|
2649 <copy file="${basedir}${file.separator}nbproject${file.separator}templates${file.separator}FXSwingTemplateApplet.jnlp"
|
|
2650 tofile="${dist.dir}${file.separator}${dist.filename}_applet.jnlp" >
|
|
2651 <filterchain refid="jnlp.template.filter"/>
|
|
2652 </copy>
|
|
2653 <copy file="${basedir}${file.separator}nbproject${file.separator}templates${file.separator}FXSwingTemplate.html"
|
|
2654 tofile="${dist.dir}${file.separator}${dist.filename}.html" >
|
|
2655 <filterchain refid="jnlp.template.filter"/>
|
|
2656 </copy>
|
|
2657 <echo message="JavaScript: deploy-deploy-swing 2" level="verbose"/>
|
|
2658 <script language="javascript">
|
|
2659 <![CDATA[
|
|
2660 function startsWith(s, prefix) {
|
|
2661 return (s != null) && (s.indexOf(prefix) == 0);
|
|
2662 }
|
|
2663 function defined(s) {
|
|
2664 return (s != null) && (s != "null") && (s.length > 0);
|
|
2665 }
|
|
2666 var PREF = "file:";
|
|
2667 var doCopyIcon = new String(project.getProperty("local-icon-filename-available"));
|
|
2668 if(defined(doCopyIcon)) {
|
|
2669 var iconProp = new String(project.getProperty("javafx.deploy.icon"));
|
|
2670 if(startsWith(iconProp, PREF)) {
|
|
2671 iconProp = iconProp.slice(PREF.length);
|
|
2672 }
|
|
2673 while(iconProp.charAt(0) == "/") {
|
|
2674 iconProp = iconProp.slice(1);
|
|
2675 }
|
|
2676 var S = java.io.File.separator;
|
|
2677 var baseDir = new String(project.getProperty("basedir"));
|
|
2678 var distDir = new String(project.getProperty("dist.dir"));
|
|
2679 var copyTask = new String(project.createTask("copy"));
|
|
2680 var source = new java.io.File(iconProp);
|
|
2681 var target = new java.io.File(baseDir.concat(S).concat(distDir));
|
|
2682 copyTask.setFile(source);
|
|
2683 copyTask.setTodir(target);
|
|
2684 copyTask.setFlatten(true);
|
|
2685 copyTask.setFailOnError(false);
|
|
2686 copyTask.perform();
|
|
2687 }
|
|
2688 var doCopyHTMLFrom = new String(project.getProperty("html-template-available"));
|
|
2689 var doCopyHTMLTo = new String(project.getProperty("html-template-processed-available"));
|
|
2690 if(defined(doCopyHTMLFrom) && defined(doCopyHTMLTo)) {
|
|
2691 var htmlFrom = new String(project.getProperty("javafx.run.htmltemplate"));
|
|
2692 if(startsWith(htmlFrom, PREF)) {
|
|
2693 htmlFrom = htmlFrom.slice(PREF.length);
|
|
2694 }
|
|
2695 while(startsWith(htmlFrom, "/")) {
|
|
2696 htmlFrom = htmlFrom.slice(1);
|
|
2697 }
|
|
2698 var htmlTo = new String(project.getProperty("javafx.run.htmltemplate.processed"));
|
|
2699 if(startsWith(htmlTo, PREF)) {
|
|
2700 htmlTo = htmlTo.slice(PREF.length);
|
|
2701 }
|
|
2702 while(startsWith(htmlTo, "/")) {
|
|
2703 htmlTo = htmlTo.slice(1);
|
|
2704 }
|
|
2705 var copyTask = project.createTask("copy");
|
|
2706 var source = new java.io.File(htmlFrom);
|
|
2707 var target = new java.io.File(htmlTo);
|
|
2708 copyTask.setFile(source);
|
|
2709 copyTask.setTofile(target);
|
|
2710 copyTask.setFailOnError(false);
|
|
2711 copyTask.perform();
|
|
2712 }
|
|
2713 ]]>
|
|
2714 </script>
|
|
2715 <antcall target="-post-jfx-deploy"/>
|
|
2716 </sequential>
|
|
2717 </macrodef>
|
|
2718
|
|
2719
|
|
2720 <!-- Fallback Project Deployment Macros To Support At Least Partially JDKs Without JavaScript Support -->
|
|
2721
|
|
2722 <macrodef name="fallback-deploy-application-def">
|
|
2723 <sequential>
|
|
2724 <echo message="Warning: Parameters (if any) not passed to <fx:application> in fallback build mode due to JDK missing JavaScript support."/>
|
|
2725 <fx:application id="fxApp"
|
|
2726 name="${application.title}"
|
|
2727 mainClass="${javafx.main.class}"
|
|
2728 fallbackClass="${javafx.fallback.class}">
|
|
2729 <!-- PARAMETERS NOT PASSED IN FALLBACK -->
|
|
2730 </fx:application>
|
|
2731 </sequential>
|
|
2732 </macrodef>
|
|
2733
|
|
2734 <macrodef name="fallback-deploy-application-def-preloader">
|
|
2735 <sequential>
|
|
2736 <echo message="Warning: Parameters (if any) not passed to <fx:application> in fallback build mode due to JDK missing JavaScript support."/>
|
|
2737 <fx:application id="fxApp"
|
|
2738 name="${application.title}"
|
|
2739 mainClass="${javafx.main.class}"
|
|
2740 preloaderClass="${javafx.preloader.class}"
|
|
2741 fallbackClass="${javafx.fallback.class}">
|
|
2742 <!-- PARAMETERS NOT PASSED IN FALLBACK -->
|
|
2743 </fx:application>
|
|
2744 </sequential>
|
|
2745 </macrodef>
|
|
2746
|
|
2747 <macrodef name="fallback-deploy-application-def-swing">
|
|
2748 <sequential>
|
|
2749 <echo message="Warning: Parameters (if any) not passed to <fx:application> in fallback build mode due to JDK missing JavaScript support."/>
|
|
2750 <fx:application id="fxApp"
|
|
2751 name="${application.title}"
|
|
2752 mainClass="${main.class}"
|
|
2753 fallbackClass="${javafx.fallback.class}"
|
|
2754 toolkit="swing">
|
|
2755 <!-- PARAMETERS NOT PASSED IN FALLBACK -->
|
|
2756 </fx:application>
|
|
2757 </sequential>
|
|
2758 </macrodef>
|
|
2759
|
|
2760 <macrodef name="fallback-deploy-resources">
|
|
2761 <sequential>
|
|
2762 <fx:resources id="appRes">
|
|
2763 <fx:fileset requiredFor="startup" dir="${jfx.deployment.dir}">
|
|
2764 <include name="${jfx.deployment.jar}"/>
|
|
2765 <include name="lib${file.separator}*.jar"/>
|
|
2766 <exclude name="lib${file.separator}${jfx.deployment.jar}"/>
|
|
2767 </fx:fileset>
|
|
2768 </fx:resources>
|
|
2769 </sequential>
|
|
2770 </macrodef>
|
|
2771
|
|
2772 <macrodef name="fallback-deploy-resources-preloader">
|
|
2773 <sequential>
|
|
2774 <fx:resources id="appRes">
|
|
2775 <fx:fileset requiredFor="preloader" dir="${jfx.deployment.dir}">
|
|
2776 <include name="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2777 </fx:fileset>
|
|
2778 <fx:fileset requiredFor="startup" dir="${jfx.deployment.dir}">
|
|
2779 <include name="${jfx.deployment.jar}"/>
|
|
2780 <include name="lib${file.separator}*.jar"/>
|
|
2781 <exclude name="lib${file.separator}${javafx.preloader.jar.filename}"/>
|
|
2782 <exclude name="lib${file.separator}${jfx.deployment.jar}"/>
|
|
2783 </fx:fileset>
|
|
2784 </fx:resources>
|
|
2785 </sequential>
|
|
2786 </macrodef>
|
|
2787
|
|
2788 <macrodef name="fallback-deploy-jar">
|
|
2789 <sequential>
|
|
2790 <antcall target="-pre-jfx-jar"/>
|
|
2791 <fx:jar destfile="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}">
|
|
2792 <fx:application refid="fxApp"/>
|
|
2793 <fx:resources refid="appRes"/>
|
|
2794 <fileset dir="${build.classes.dir}">
|
|
2795 <exclude name="**${file.separator}*.${css-exclude-ext}"/>
|
|
2796 </fileset>
|
|
2797 <manifest>
|
|
2798 <attribute name="Implementation-Vendor" value="${application.vendor}"/>
|
|
2799 <attribute name="Implementation-Title" value="${application.title}"/>
|
|
2800 <attribute name="Implementation-Version" value="1.0"/>
|
|
2801 </manifest>
|
|
2802 </fx:jar>
|
|
2803 <antcall target="-post-jfx-jar"/>
|
|
2804 </sequential>
|
|
2805 </macrodef>
|
|
2806
|
|
2807 <macrodef name="fallback-deploy-deploy">
|
|
2808 <sequential>
|
|
2809 <antcall target="-pre-jfx-deploy"/>
|
|
2810 <echo message="Warning: JVM Arguments and Callbacks (if any) not passed to <fx:deploy> in fallback build mode due to JDK missing JavaScript support."/>
|
|
2811 <fx:deploy width="${javafx.width}" height="${javafx.height}"
|
|
2812 outdir="${jfx.deployment.dir}" embedjnlp="true" updatemode="${update-mode}"
|
|
2813 outfile="${application.title}" includeDT="${javafx.deploy.includeDT}">
|
|
2814 <fx:application refid="fxApp"/>
|
|
2815 <fx:resources refid="appRes"/>
|
|
2816 <fx:info title="${application.title}" vendor="${application.vendor}"/>
|
|
2817 <fx:permissions elevated="${permissions.elevated}"/>
|
|
2818 <fx:preferences shortcut="${javafx.deploy.adddesktopshortcut}" install="${javafx.deploy.installpermanently}" menu="${javafx.deploy.addstartmenushortcut}"/>
|
|
2819 <!-- PLATFORM NOT PASSED IN FALLBACK -->
|
|
2820 <!-- CALLBACKS NOT PASSED IN FALLBACK -->
|
|
2821 </fx:deploy>
|
|
2822 <antcall target="-post-jfx-deploy"/>
|
|
2823 </sequential>
|
|
2824 </macrodef>
|
|
2825
|
|
2826 <macrodef name="fallback-deploy-deploy-template">
|
|
2827 <sequential>
|
|
2828 <antcall target="-pre-jfx-deploy"/>
|
|
2829 <echo message="Warning: JVM Arguments and Callbacks (if any) not passed to <fx:deploy> in fallback build mode due to JDK missing JavaScript support."/>
|
|
2830 <deploy-process-template/>
|
|
2831 <fx:deploy width="${javafx.width}" height="${javafx.height}"
|
|
2832 outdir="${jfx.deployment.dir}" embedjnlp="true" updatemode="${update-mode}"
|
|
2833 outfile="${application.title}" includeDT="${javafx.deploy.includeDT}">
|
|
2834 <fx:application refid="fxApp"/>
|
|
2835 <fx:resources refid="appRes"/>
|
|
2836 <fx:info title="${application.title}" vendor="${application.vendor}"/>
|
|
2837 <fx:permissions elevated="${permissions.elevated}"/>
|
|
2838 <fx:preferences shortcut="${javafx.deploy.adddesktopshortcut}" install="${javafx.deploy.installpermanently}" menu="${javafx.deploy.addstartmenushortcut}"/>
|
|
2839 <fx:template file="${javafx.run.htmltemplate}" tofile="${javafx.run.htmltemplate.processed}"/>
|
|
2840 <!-- PLATFORM NOT PASSED IN FALLBACK -->
|
|
2841 <!-- CALLBACKS NOT PASSED IN FALLBACK -->
|
|
2842 </fx:deploy>
|
|
2843 <antcall target="-post-jfx-deploy"/>
|
|
2844 </sequential>
|
|
2845 </macrodef>
|
|
2846
|
|
2847
|
|
2848 <!-- Project Deployment Targets -->
|
|
2849
|
|
2850 <target name="-check-sign" depends="-check-project,-javafx-init-keystore" if="javafx.signed.true+signjars.task.available">
|
|
2851 <condition property="sign-nopreloader-notemplate">
|
|
2852 <and>
|
|
2853 <isset property="app-without-preloader"/>
|
|
2854 <not><isset property="html-template-available"/></not>
|
|
2855 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2856 <not><isset property="use-blob-signing"/></not>
|
|
2857 </and>
|
|
2858 </condition>
|
|
2859 <condition property="sign-preloader-notemplate">
|
|
2860 <and>
|
|
2861 <isset property="app-with-preloader"/>
|
|
2862 <not><isset property="html-template-available"/></not>
|
|
2863 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2864 <not><isset property="use-blob-signing"/></not>
|
|
2865 </and>
|
|
2866 </condition>
|
|
2867 <condition property="sign-nopreloader-template">
|
|
2868 <and>
|
|
2869 <isset property="app-without-preloader"/>
|
|
2870 <isset property="html-template-available"/>
|
|
2871 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2872 <not><isset property="use-blob-signing"/></not>
|
|
2873 </and>
|
|
2874 </condition>
|
|
2875 <condition property="sign-preloader-template">
|
|
2876 <and>
|
|
2877 <isset property="app-with-preloader"/>
|
|
2878 <isset property="html-template-available"/>
|
|
2879 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2880 <not><isset property="use-blob-signing"/></not>
|
|
2881 </and>
|
|
2882 </condition>
|
|
2883 <condition property="sign-nopreloader-notemplate-swing">
|
|
2884 <and>
|
|
2885 <isset property="app-without-preloader"/>
|
|
2886 <not><isset property="html-template-available"/></not>
|
|
2887 <isset property="fx-in-swing-app-workaround"/>
|
|
2888 <not><isset property="use-blob-signing"/></not>
|
|
2889 </and>
|
|
2890 </condition>
|
|
2891 <condition property="sign-nopreloader-template-swing">
|
|
2892 <and>
|
|
2893 <isset property="app-without-preloader"/>
|
|
2894 <isset property="html-template-available"/>
|
|
2895 <isset property="fx-in-swing-app-workaround"/>
|
|
2896 <not><isset property="use-blob-signing"/></not>
|
|
2897 </and>
|
|
2898 </condition>
|
|
2899 <condition property="sign-blob-nopreloader-notemplate">
|
|
2900 <and>
|
|
2901 <isset property="app-without-preloader"/>
|
|
2902 <not><isset property="html-template-available"/></not>
|
|
2903 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2904 <isset property="use-blob-signing"/>
|
|
2905 </and>
|
|
2906 </condition>
|
|
2907 <condition property="sign-blob-preloader-notemplate">
|
|
2908 <and>
|
|
2909 <isset property="app-with-preloader"/>
|
|
2910 <not><isset property="html-template-available"/></not>
|
|
2911 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2912 <isset property="use-blob-signing"/>
|
|
2913 </and>
|
|
2914 </condition>
|
|
2915 <condition property="sign-blob-nopreloader-template">
|
|
2916 <and>
|
|
2917 <isset property="app-without-preloader"/>
|
|
2918 <isset property="html-template-available"/>
|
|
2919 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2920 <isset property="use-blob-signing"/>
|
|
2921 </and>
|
|
2922 </condition>
|
|
2923 <condition property="sign-blob-preloader-template">
|
|
2924 <and>
|
|
2925 <isset property="app-with-preloader"/>
|
|
2926 <isset property="html-template-available"/>
|
|
2927 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2928 <isset property="use-blob-signing"/>
|
|
2929 </and>
|
|
2930 </condition>
|
|
2931 <condition property="sign-blob-nopreloader-notemplate-swing">
|
|
2932 <and>
|
|
2933 <isset property="app-without-preloader"/>
|
|
2934 <not><isset property="html-template-available"/></not>
|
|
2935 <isset property="fx-in-swing-app-workaround"/>
|
|
2936 <isset property="use-blob-signing"/>
|
|
2937 </and>
|
|
2938 </condition>
|
|
2939 <condition property="sign-blob-nopreloader-template-swing">
|
|
2940 <and>
|
|
2941 <isset property="app-without-preloader"/>
|
|
2942 <isset property="html-template-available"/>
|
|
2943 <isset property="fx-in-swing-app-workaround"/>
|
|
2944 <isset property="use-blob-signing"/>
|
|
2945 </and>
|
|
2946 </condition>
|
|
2947 </target>
|
|
2948 <target name="-check-nosign" depends="-check-project">
|
|
2949 <condition property="nosign-nopreloader-notemplate">
|
|
2950 <and>
|
|
2951 <isset property="app-without-preloader"/>
|
|
2952 <not><isset property="html-template-available"/></not>
|
|
2953 <not><isset property="javafx.signed.true"/></not>
|
|
2954 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2955 </and>
|
|
2956 </condition>
|
|
2957 <condition property="nosign-preloader-notemplate">
|
|
2958 <and>
|
|
2959 <isset property="app-with-preloader"/>
|
|
2960 <not><isset property="html-template-available"/></not>
|
|
2961 <not><isset property="javafx.signed.true"/></not>
|
|
2962 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2963 </and>
|
|
2964 </condition>
|
|
2965 <condition property="nosign-nopreloader-template">
|
|
2966 <and>
|
|
2967 <isset property="app-without-preloader"/>
|
|
2968 <isset property="html-template-available"/>
|
|
2969 <not><isset property="javafx.signed.true"/></not>
|
|
2970 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2971 </and>
|
|
2972 </condition>
|
|
2973 <condition property="nosign-preloader-template">
|
|
2974 <and>
|
|
2975 <isset property="app-with-preloader"/>
|
|
2976 <isset property="html-template-available"/>
|
|
2977 <not><isset property="javafx.signed.true"/></not>
|
|
2978 <not><isset property="fx-in-swing-app-workaround"/></not>
|
|
2979 </and>
|
|
2980 </condition>
|
|
2981 <condition property="nosign-nopreloader-notemplate-swing">
|
|
2982 <and>
|
|
2983 <isset property="app-without-preloader"/>
|
|
2984 <not><isset property="html-template-available"/></not>
|
|
2985 <not><isset property="javafx.signed.true"/></not>
|
|
2986 <isset property="fx-in-swing-app-workaround"/>
|
|
2987 </and>
|
|
2988 </condition>
|
|
2989 <condition property="nosign-nopreloader-template-swing">
|
|
2990 <and>
|
|
2991 <isset property="app-without-preloader"/>
|
|
2992 <isset property="html-template-available"/>
|
|
2993 <not><isset property="javafx.signed.true"/></not>
|
|
2994 <isset property="fx-in-swing-app-workaround"/>
|
|
2995 </and>
|
|
2996 </condition>
|
|
2997 </target>
|
|
2998
|
|
2999
|
|
3000 <!-- WITH SIGNING -->
|
|
3001
|
|
3002 <!-- project without preloader -->
|
|
3003 <!-- no html template -->
|
|
3004 <target name="-deploy-app-sign-nopreloader-notemplate" depends="-check-sign" if="sign-nopreloader-notemplate" unless="preloader-app">
|
|
3005 <echo message="-deploy-app-sign-nopreloader-notemplate" level="verbose"/>
|
|
3006 <deploy-defines/>
|
|
3007 <deploy-preprocess/>
|
|
3008 <deploy-jar/>
|
|
3009 <deploy-sign/>
|
|
3010 <deploy-deploy/>
|
|
3011 </target>
|
|
3012 <target name="-deploy-app-sign-blob-nopreloader-notemplate" depends="-check-sign" if="sign-blob-nopreloader-notemplate" unless="preloader-app">
|
|
3013 <echo message="-deploy-app-sign-blob-nopreloader-notemplate" level="verbose"/>
|
|
3014 <deploy-defines/>
|
|
3015 <deploy-preprocess/>
|
|
3016 <deploy-jar/>
|
|
3017 <deploy-sign-blob/>
|
|
3018 <deploy-deploy/>
|
|
3019 </target>
|
|
3020
|
|
3021 <!-- project with preloader -->
|
|
3022 <!-- no html template -->
|
|
3023 <target name="-deploy-app-sign-preloader-notemplate" depends="-check-sign" if="sign-preloader-notemplate" unless="preloader-app">
|
|
3024 <echo message="-deploy-app-sign-preloader-notemplate" level="verbose"/>
|
|
3025 <deploy-defines/>
|
|
3026 <deploy-preprocess/>
|
|
3027 <deploy-jar/>
|
|
3028 <deploy-sign-preloader/>
|
|
3029 <deploy-deploy/>
|
|
3030 </target>
|
|
3031 <target name="-deploy-app-sign-blob-preloader-notemplate" depends="-check-sign" if="sign-blob-preloader-notemplate" unless="preloader-app">
|
|
3032 <echo message="-deploy-app-sign-blob-preloader-notemplate" level="verbose"/>
|
|
3033 <deploy-defines/>
|
|
3034 <deploy-preprocess/>
|
|
3035 <deploy-jar/>
|
|
3036 <deploy-sign-blob-preloader/>
|
|
3037 <deploy-deploy/>
|
|
3038 </target>
|
|
3039
|
|
3040 <!-- project without preloader -->
|
|
3041 <!-- html template -->
|
|
3042 <target name="-deploy-app-sign-nopreloader-template" depends="-check-sign" if="sign-nopreloader-template" unless="preloader-app">
|
|
3043 <echo message="-deploy-app-sign-nopreloader-template" level="verbose"/>
|
|
3044 <deploy-defines/>
|
|
3045 <deploy-preprocess/>
|
|
3046 <deploy-jar/>
|
|
3047 <deploy-sign/>
|
|
3048 <deploy-process-template/>
|
|
3049 <deploy-deploy/>
|
|
3050 </target>
|
|
3051 <target name="-deploy-app-sign-blob-nopreloader-template" depends="-check-sign" if="sign-blob-nopreloader-template" unless="preloader-app">
|
|
3052 <echo message="-deploy-app-sign-blob-nopreloader-template" level="verbose"/>
|
|
3053 <deploy-defines/>
|
|
3054 <deploy-preprocess/>
|
|
3055 <deploy-jar/>
|
|
3056 <deploy-sign-blob/>
|
|
3057 <deploy-process-template/>
|
|
3058 <deploy-deploy/>
|
|
3059 </target>
|
|
3060
|
|
3061 <!-- project with preloader -->
|
|
3062 <!-- html template -->
|
|
3063 <target name="-deploy-app-sign-preloader-template" depends="-check-sign" if="sign-preloader-template" unless="preloader-app">
|
|
3064 <echo message="-deploy-app-sign-preloader-template" level="verbose"/>
|
|
3065 <deploy-defines/>
|
|
3066 <deploy-preprocess/>
|
|
3067 <deploy-jar/>
|
|
3068 <deploy-sign-preloader/>
|
|
3069 <deploy-process-template/>
|
|
3070 <deploy-deploy/>
|
|
3071 </target>
|
|
3072 <target name="-deploy-app-sign-blob-preloader-template" depends="-check-sign" if="sign-blob-preloader-template" unless="preloader-app">
|
|
3073 <echo message="-deploy-app-sign-blob-preloader-template" level="verbose"/>
|
|
3074 <deploy-defines/>
|
|
3075 <deploy-preprocess/>
|
|
3076 <deploy-jar/>
|
|
3077 <deploy-sign-blob-preloader/>
|
|
3078 <deploy-process-template/>
|
|
3079 <deploy-deploy/>
|
|
3080 </target>
|
|
3081
|
|
3082 <!-- project without preloader -->
|
|
3083 <!-- no html template -->
|
|
3084 <!-- FX in Swing app -->
|
|
3085 <target name="-deploy-app-sign-nopreloader-notemplate-swing" depends="-check-sign" if="sign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround">
|
|
3086 <echo message="-deploy-app-sign-nopreloader-notemplate-swing" level="verbose"/>
|
|
3087 <deploy-defines/>
|
|
3088 <deploy-preprocess/>
|
|
3089 <deploy-jar/>
|
|
3090 <deploy-sign/>
|
|
3091 <deploy-deploy-swing/>
|
|
3092 </target>
|
|
3093 <target name="-deploy-app-sign-blob-nopreloader-notemplate-swing" depends="-check-sign" if="sign-blob-nopreloader-notemplate-swing" unless="preloader-app-no-workaround">
|
|
3094 <echo message="-deploy-app-sign-blob-nopreloader-notemplate-swing" level="verbose"/>
|
|
3095 <deploy-defines/>
|
|
3096 <deploy-preprocess/>
|
|
3097 <deploy-jar/>
|
|
3098 <deploy-sign-blob/>
|
|
3099 <deploy-deploy-swing/>
|
|
3100 </target>
|
|
3101
|
|
3102 <!-- project without preloader -->
|
|
3103 <!-- html template -->
|
|
3104 <!-- FX in Swing app -->
|
|
3105 <target name="-deploy-app-sign-nopreloader-template-swing" depends="-check-sign" if="sign-nopreloader-template-swing" unless="preloader-app-no-workaround">
|
|
3106 <echo message="-deploy-app-sign-nopreloader-template-swing" level="verbose"/>
|
|
3107 <deploy-defines/>
|
|
3108 <deploy-preprocess/>
|
|
3109 <deploy-jar/>
|
|
3110 <deploy-sign/>
|
|
3111 <deploy-process-template/>
|
|
3112 <deploy-deploy-swing/>
|
|
3113 </target>
|
|
3114 <target name="-deploy-app-sign-blob-nopreloader-template-swing" depends="-check-sign" if="sign-blob-nopreloader-template-swing" unless="preloader-app-no-workaround">
|
|
3115 <echo message="-deploy-app-sign-blob-nopreloader-template-swing" level="verbose"/>
|
|
3116 <deploy-defines/>
|
|
3117 <deploy-preprocess/>
|
|
3118 <deploy-jar/>
|
|
3119 <deploy-sign-blob/>
|
|
3120 <deploy-process-template/>
|
|
3121 <deploy-deploy-swing/>
|
|
3122 </target>
|
|
3123
|
|
3124
|
|
3125 <!-- NO SIGNING -->
|
|
3126
|
|
3127 <!-- project without preloader -->
|
|
3128 <!-- no html template -->
|
|
3129 <target name="-deploy-app-nosign-nopreloader-notemplate" depends="-check-nosign" if="nosign-nopreloader-notemplate" unless="preloader-app">
|
|
3130 <echo message="-deploy-app-nosign-nopreloader-notemplate" level="verbose"/>
|
|
3131 <deploy-defines/>
|
|
3132 <deploy-preprocess/>
|
|
3133 <deploy-jar/>
|
|
3134 <deploy-deploy/>
|
|
3135 </target>
|
|
3136
|
|
3137 <!-- project with preloader -->
|
|
3138 <!-- no html template -->
|
|
3139 <target name="-deploy-app-nosign-preloader-notemplate" depends="-check-nosign" if="nosign-preloader-notemplate" unless="preloader-app">
|
|
3140 <echo message="-deploy-app-nosign-preloader-notemplate" level="verbose"/>
|
|
3141 <deploy-defines/>
|
|
3142 <deploy-preprocess/>
|
|
3143 <deploy-jar/>
|
|
3144 <deploy-deploy/>
|
|
3145 </target>
|
|
3146
|
|
3147 <!-- project without preloader -->
|
|
3148 <!-- html template -->
|
|
3149 <target name="-deploy-app-nosign-nopreloader-template" depends="-check-nosign" if="nosign-nopreloader-template" unless="preloader-app">
|
|
3150 <echo message="-deploy-app-nosign-nopreloader-template" level="verbose"/>
|
|
3151 <deploy-defines/>
|
|
3152 <deploy-preprocess/>
|
|
3153 <deploy-jar/>
|
|
3154 <deploy-process-template/>
|
|
3155 <deploy-deploy/>
|
|
3156 </target>
|
|
3157
|
|
3158 <!-- project with preloader -->
|
|
3159 <!-- html template -->
|
|
3160 <target name="-deploy-app-nosign-preloader-template" depends="-check-nosign" if="nosign-preloader-template" unless="preloader-app">
|
|
3161 <echo message="-deploy-app-nosign-preloader-template" level="verbose"/>
|
|
3162 <deploy-defines/>
|
|
3163 <deploy-preprocess/>
|
|
3164 <deploy-jar/>
|
|
3165 <deploy-process-template/>
|
|
3166 <deploy-deploy/>
|
|
3167 </target>
|
|
3168
|
|
3169 <!-- project without preloader -->
|
|
3170 <!-- no html template -->
|
|
3171 <!-- FX in Swing app -->
|
|
3172 <target name="-deploy-app-nosign-nopreloader-notemplate-swing" depends="-check-nosign" if="nosign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround">
|
|
3173 <echo message="-deploy-app-nosign-nopreloader-notemplate-swing" level="verbose"/>
|
|
3174 <deploy-defines/>
|
|
3175 <deploy-preprocess/>
|
|
3176 <deploy-jar/>
|
|
3177 <deploy-deploy-swing/>
|
|
3178 </target>
|
|
3179
|
|
3180 <!-- project without preloader -->
|
|
3181 <!-- html template -->
|
|
3182 <!-- FX in Swing app -->
|
|
3183 <target name="-deploy-app-nosign-nopreloader-template-swing" depends="-check-nosign" if="nosign-nopreloader-template-swing" unless="preloader-app-no-workaround">
|
|
3184 <echo message="-deploy-app-nosign-nopreloader-template-swing" level="verbose"/>
|
|
3185 <deploy-defines/>
|
|
3186 <deploy-preprocess/>
|
|
3187 <deploy-jar/>
|
|
3188 <deploy-process-template/>
|
|
3189 <deploy-deploy-swing/>
|
|
3190 </target>
|
|
3191
|
|
3192
|
|
3193 <!-- FALLBACK (NO JAVASCRIPT) TARGETS WITH SIGNING -->
|
|
3194
|
|
3195 <target name="-check-fallback-sign-deploy-swing-possible" depends="-check-sign">
|
|
3196 <local name="fail-deploy-swing-possible"/>
|
|
3197 <condition property="fail-deploy-swing-possible">
|
|
3198 <and>
|
|
3199 <or>
|
|
3200 <isset property="sign-nopreloader-notemplate-swing"/>
|
|
3201 <isset property="sign-nopreloader-template-swing"/>
|
|
3202 </or>
|
|
3203 <not><isset property="have-fx-ant-api-1.2"/></not>
|
|
3204 </and>
|
|
3205 </condition>
|
|
3206 <fail message="Error: JavaFX SDK version 2.2 or newer is needed to deploy FX-in-Swing on JDK without JavaScript support."
|
|
3207 if="fail-deploy-swing-possible"/>
|
|
3208 </target>
|
|
3209
|
|
3210 <!-- FALLBACK project without preloader -->
|
|
3211 <!-- FALLBACK no html template -->
|
|
3212 <target name="-fallback-deploy-app-sign-nopreloader-notemplate" depends="-check-sign" if="sign-nopreloader-notemplate" unless="preloader-app">
|
|
3213 <echo message="-fallback-deploy-app-sign-nopreloader-notemplate" level="verbose"/>
|
|
3214 <deploy-defines/>
|
|
3215 <deploy-preprocess/>
|
|
3216 <fallback-deploy-application-def/>
|
|
3217 <fallback-deploy-resources/>
|
|
3218 <fallback-deploy-jar/>
|
|
3219 <deploy-sign/>
|
|
3220 <fallback-deploy-deploy/>
|
|
3221 </target>
|
|
3222 <target name="-fallback-deploy-app-sign-blob-nopreloader-notemplate" depends="-check-sign" if="sign-blob-nopreloader-notemplate" unless="preloader-app">
|
|
3223 <echo message="-fallback-deploy-app-sign-blob-nopreloader-notemplate" level="verbose"/>
|
|
3224 <deploy-defines/>
|
|
3225 <deploy-preprocess/>
|
|
3226 <fallback-deploy-application-def/>
|
|
3227 <fallback-deploy-resources/>
|
|
3228 <fallback-deploy-jar/>
|
|
3229 <deploy-sign-blob/>
|
|
3230 <fallback-deploy-deploy/>
|
|
3231 </target>
|
|
3232
|
|
3233 <!-- FALLBACK project with preloader -->
|
|
3234 <!-- FALLBACK no html template -->
|
|
3235 <target name="-fallback-deploy-app-sign-preloader-notemplate" depends="-check-sign" if="sign-preloader-notemplate" unless="preloader-app">
|
|
3236 <echo message="-fallback-deploy-app-sign-preloader-notemplate" level="verbose"/>
|
|
3237 <deploy-defines/>
|
|
3238 <deploy-preprocess/>
|
|
3239 <fallback-deploy-application-def-preloader/>
|
|
3240 <fallback-deploy-resources-preloader/>
|
|
3241 <fallback-deploy-jar/>
|
|
3242 <deploy-sign-preloader/>
|
|
3243 <fallback-deploy-deploy/>
|
|
3244 </target>
|
|
3245 <target name="-fallback-deploy-app-sign-blob-preloader-notemplate" depends="-check-sign" if="sign-blob-preloader-notemplate" unless="preloader-app">
|
|
3246 <echo message="-fallback-deploy-app-sign-blob-preloader-notemplate" level="verbose"/>
|
|
3247 <deploy-defines/>
|
|
3248 <deploy-preprocess/>
|
|
3249 <fallback-deploy-application-def-preloader/>
|
|
3250 <fallback-deploy-resources-preloader/>
|
|
3251 <fallback-deploy-jar/>
|
|
3252 <deploy-sign-blob-preloader/>
|
|
3253 <fallback-deploy-deploy/>
|
|
3254 </target>
|
|
3255
|
|
3256 <!-- FALLBACK project without preloader -->
|
|
3257 <!-- FALLBACK html template -->
|
|
3258 <target name="-fallback-deploy-app-sign-nopreloader-template" depends="-check-sign" if="sign-nopreloader-template" unless="preloader-app">
|
|
3259 <echo message="-fallback-deploy-app-sign-nopreloader-template" level="verbose"/>
|
|
3260 <deploy-defines/>
|
|
3261 <deploy-preprocess/>
|
|
3262 <fallback-deploy-application-def/>
|
|
3263 <fallback-deploy-resources/>
|
|
3264 <fallback-deploy-jar/>
|
|
3265 <deploy-sign/>
|
|
3266 <fallback-deploy-deploy-template/>
|
|
3267 </target>
|
|
3268 <target name="-fallback-deploy-app-sign-blob-nopreloader-template" depends="-check-sign" if="sign-blob-nopreloader-template" unless="preloader-app">
|
|
3269 <echo message="-fallback-deploy-app-sign-blob-nopreloader-template" level="verbose"/>
|
|
3270 <deploy-defines/>
|
|
3271 <deploy-preprocess/>
|
|
3272 <fallback-deploy-application-def/>
|
|
3273 <fallback-deploy-resources/>
|
|
3274 <fallback-deploy-jar/>
|
|
3275 <deploy-sign-blob/>
|
|
3276 <fallback-deploy-deploy-template/>
|
|
3277 </target>
|
|
3278
|
|
3279 <!-- FALLBACK project with preloader -->
|
|
3280 <!-- FALLBACK html template -->
|
|
3281 <target name="-fallback-deploy-app-sign-preloader-template" depends="-check-sign" if="sign-preloader-template" unless="preloader-app">
|
|
3282 <echo message="-fallback-deploy-app-sign-preloader-template" level="verbose"/>
|
|
3283 <deploy-defines/>
|
|
3284 <deploy-preprocess/>
|
|
3285 <fallback-deploy-application-def-preloader/>
|
|
3286 <fallback-deploy-resources-preloader/>
|
|
3287 <fallback-deploy-jar/>
|
|
3288 <deploy-sign-preloader/>
|
|
3289 <fallback-deploy-deploy-template/>
|
|
3290 </target>
|
|
3291 <target name="-fallback-deploy-app-sign-blob-preloader-template" depends="-check-sign" if="sign-blob-preloader-template" unless="preloader-app">
|
|
3292 <echo message="-fallback-deploy-app-sign-blob-preloader-template" level="verbose"/>
|
|
3293 <deploy-defines/>
|
|
3294 <deploy-preprocess/>
|
|
3295 <fallback-deploy-application-def-preloader/>
|
|
3296 <fallback-deploy-resources-preloader/>
|
|
3297 <fallback-deploy-jar/>
|
|
3298 <deploy-sign-blob-preloader/>
|
|
3299 <fallback-deploy-deploy-template/>
|
|
3300 </target>
|
|
3301
|
|
3302 <!-- FALLBACK project without preloader -->
|
|
3303 <!-- FALLBACK no html template -->
|
|
3304 <!-- FALLBACK FX in Swing app -->
|
|
3305 <target name="-fallback-deploy-app-sign-nopreloader-notemplate-swing" depends="-check-fallback-sign-deploy-swing-possible" if="sign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround">
|
|
3306 <echo message="-fallback-deploy-app-sign-nopreloader-notemplate-swing" level="verbose"/>
|
|
3307 <deploy-defines/>
|
|
3308 <deploy-preprocess/>
|
|
3309 <fallback-deploy-application-def-swing/>
|
|
3310 <fallback-deploy-resources/>
|
|
3311 <fallback-deploy-jar/>
|
|
3312 <deploy-sign/>
|
|
3313 <fallback-deploy-deploy/>
|
|
3314 </target>
|
|
3315 <target name="-fallback-deploy-app-sign-blob-nopreloader-notemplate-swing" depends="-check-fallback-sign-deploy-swing-possible" if="sign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround">
|
|
3316 <echo message="-fallback-deploy-app-sign-blob-nopreloader-notemplate-swing" level="verbose"/>
|
|
3317 <deploy-defines/>
|
|
3318 <deploy-preprocess/>
|
|
3319 <fallback-deploy-application-def-swing/>
|
|
3320 <fallback-deploy-resources/>
|
|
3321 <fallback-deploy-jar/>
|
|
3322 <deploy-sign-blob/>
|
|
3323 <fallback-deploy-deploy/>
|
|
3324 </target>
|
|
3325
|
|
3326 <!-- FALLBACK project without preloader -->
|
|
3327 <!-- FALLBACK html template -->
|
|
3328 <!-- FALLBACK FX in Swing app -->
|
|
3329 <target name="-fallback-deploy-app-sign-nopreloader-template-swing" depends="-check-fallback-sign-deploy-swing-possible" if="sign-nopreloader-template-swing" unless="preloader-app-no-workaround">
|
|
3330 <echo message="-fallback-deploy-app-sign-nopreloader-template-swing" level="verbose"/>
|
|
3331 <deploy-defines/>
|
|
3332 <deploy-preprocess/>
|
|
3333 <fallback-deploy-application-def-swing/>
|
|
3334 <fallback-deploy-resources/>
|
|
3335 <fallback-deploy-jar/>
|
|
3336 <deploy-sign/>
|
|
3337 <fallback-deploy-deploy-template/>
|
|
3338 </target>
|
|
3339 <target name="-fallback-deploy-app-sign-blob-nopreloader-template-swing" depends="-check-fallback-sign-deploy-swing-possible" if="sign-nopreloader-template-swing" unless="preloader-app-no-workaround">
|
|
3340 <echo message="-fallback-deploy-app-sign-blob-nopreloader-template-swing" level="verbose"/>
|
|
3341 <deploy-defines/>
|
|
3342 <deploy-preprocess/>
|
|
3343 <fallback-deploy-application-def-swing/>
|
|
3344 <fallback-deploy-resources/>
|
|
3345 <fallback-deploy-jar/>
|
|
3346 <deploy-sign-blob/>
|
|
3347 <fallback-deploy-deploy-template/>
|
|
3348 </target>
|
|
3349
|
|
3350
|
|
3351 <!-- FALLBACK (NO JAVASCRIPT) TARGETS NO SIGNING -->
|
|
3352
|
|
3353 <target name="-check-fallback-nosign-deploy-swing-possible" depends="-check-nosign">
|
|
3354 <local name="fail-deploy-swing-possible"/>
|
|
3355 <condition property="fail-deploy-swing-possible">
|
|
3356 <and>
|
|
3357 <or>
|
|
3358 <isset property="nosign-nopreloader-notemplate-swing"/>
|
|
3359 <isset property="nosign-nopreloader-template-swing"/>
|
|
3360 </or>
|
|
3361 <not><isset property="have-fx-ant-api-1.2"/></not>
|
|
3362 </and>
|
|
3363 </condition>
|
|
3364 <fail message="Error: JavaFX SDK version 2.2 or newer is needed to deploy FX-in-Swing on JDK without JavaScript support."
|
|
3365 if="fail-deploy-swing-possible"/>
|
|
3366 </target>
|
|
3367
|
|
3368 <!-- FALLBACK project without preloader -->
|
|
3369 <!-- FALLBACK no html template -->
|
|
3370 <target name="-fallback-deploy-app-nosign-nopreloader-notemplate" depends="-check-nosign" if="nosign-nopreloader-notemplate" unless="preloader-app">
|
|
3371 <echo message="-fallback-deploy-app-nosign-nopreloader-notemplate" level="verbose"/>
|
|
3372 <deploy-defines/>
|
|
3373 <deploy-preprocess/>
|
|
3374 <fallback-deploy-application-def/>
|
|
3375 <fallback-deploy-resources/>
|
|
3376 <fallback-deploy-jar/>
|
|
3377 <fallback-deploy-deploy/>
|
|
3378 </target>
|
|
3379
|
|
3380 <!-- FALLBACK project with preloader -->
|
|
3381 <!-- FALLBACK no html template -->
|
|
3382 <target name="-fallback-deploy-app-nosign-preloader-notemplate" depends="-check-nosign" if="nosign-preloader-notemplate" unless="preloader-app">
|
|
3383 <echo message="-fallback-deploy-app-nosign-preloader-notemplate" level="verbose"/>
|
|
3384 <deploy-defines/>
|
|
3385 <deploy-preprocess/>
|
|
3386 <fallback-deploy-application-def-preloader/>
|
|
3387 <fallback-deploy-resources-preloader/>
|
|
3388 <fallback-deploy-jar/>
|
|
3389 <fallback-deploy-deploy/>
|
|
3390 </target>
|
|
3391
|
|
3392 <!-- FALLBACK project without preloader -->
|
|
3393 <!-- FALLBACK html template -->
|
|
3394 <target name="-fallback-deploy-app-nosign-nopreloader-template" depends="-check-nosign" if="nosign-nopreloader-template" unless="preloader-app">
|
|
3395 <echo message="-fallback-deploy-app-nosign-nopreloader-template" level="verbose"/>
|
|
3396 <deploy-defines/>
|
|
3397 <deploy-preprocess/>
|
|
3398 <fallback-deploy-application-def/>
|
|
3399 <fallback-deploy-resources/>
|
|
3400 <fallback-deploy-jar/>
|
|
3401 <fallback-deploy-deploy-template/>
|
|
3402 </target>
|
|
3403
|
|
3404 <!-- FALLBACK project with preloader -->
|
|
3405 <!-- FALLBACK html template -->
|
|
3406 <target name="-fallback-deploy-app-nosign-preloader-template" depends="-check-nosign" if="nosign-preloader-template" unless="preloader-app">
|
|
3407 <echo message="-fallback-deploy-app-nosign-preloader-template" level="verbose"/>
|
|
3408 <deploy-defines/>
|
|
3409 <deploy-preprocess/>
|
|
3410 <fallback-deploy-application-def-preloader/>
|
|
3411 <fallback-deploy-resources-preloader/>
|
|
3412 <fallback-deploy-jar/>
|
|
3413 <fallback-deploy-deploy-template/>
|
|
3414 </target>
|
|
3415
|
|
3416 <!-- FALLBACK project without preloader -->
|
|
3417 <!-- FALLBACK no html template -->
|
|
3418 <!-- FALLBACK FX in Swing app -->
|
|
3419 <target name="-fallback-deploy-app-nosign-nopreloader-notemplate-swing" depends="-check-fallback-nosign-deploy-swing-possible" if="nosign-nopreloader-notemplate-swing" unless="preloader-app-no-workaround">
|
|
3420 <echo message="-fallback-deploy-app-nosign-nopreloader-notemplate-swing" level="verbose"/>
|
|
3421 <deploy-defines/>
|
|
3422 <deploy-preprocess/>
|
|
3423 <fallback-deploy-application-def-swing/>
|
|
3424 <fallback-deploy-resources/>
|
|
3425 <fallback-deploy-jar/>
|
|
3426 <fallback-deploy-deploy/>
|
|
3427 </target>
|
|
3428
|
|
3429 <!-- FALLBACK project without preloader -->
|
|
3430 <!-- FALLBACK html template -->
|
|
3431 <!-- FALLBACK FX in Swing app -->
|
|
3432 <target name="-fallback-deploy-app-nosign-nopreloader-template-swing" depends="-check-fallback-nosign-deploy-swing-possible" if="nosign-nopreloader-template-swing" unless="preloader-app-no-workaround">
|
|
3433 <echo message="-fallback-deploy-app-nosign-nopreloader-template-swing" level="verbose"/>
|
|
3434 <deploy-defines/>
|
|
3435 <deploy-preprocess/>
|
|
3436 <fallback-deploy-application-def-swing/>
|
|
3437 <fallback-deploy-resources/>
|
|
3438 <fallback-deploy-jar/>
|
|
3439 <fallback-deploy-deploy-template/>
|
|
3440 </target>
|
|
3441
|
|
3442
|
|
3443 <!-- Project Build Targets -->
|
|
3444
|
|
3445 <target name="jfx-build" depends="-jfx-do-compile, -jfx-do-jar, -jfx-do-post-jar"/>
|
|
3446 <target name="jfx-build-noscript" depends="-set-fallback-no-javascript, -jfx-do-compile, -jfx-do-jar, -jfx-do-post-jar"/>
|
|
3447
|
|
3448 <target name="jfx-rebuild" depends="clean, -jfx-do-compile, -jfx-do-jar, -jfx-do-post-jar"/>
|
|
3449 <target name="jfx-rebuild-noscript" depends="-set-fallback-no-javascript, clean, -jfx-do-compile, -jfx-do-jar, -jfx-do-post-jar"/>
|
|
3450
|
|
3451 <target name="jfx-build-native" depends="-set-do-build-native-package, -check-ant-jre-supports-native-packaging, -check-native-packager-external-tools, jfx-rebuild"/>
|
|
3452 <target name="jfx-build-native-noscript" depends="-set-do-build-native-package, -check-ant-jre-supports-native-packaging, -check-native-packager-external-tools, jfx-rebuild-noscript"/>
|
|
3453
|
|
3454 <target name="build-native">
|
|
3455 <property name="javafx.native.bundling.type" value="${native.bundling.type}"/>
|
|
3456 <antcall target="jfx-build-native"/>
|
|
3457 </target>
|
|
3458 <target name="build-native-noscript">
|
|
3459 <property name="javafx.native.bundling.type" value="${native.bundling.type}"/>
|
|
3460 <antcall target="jfx-build-native-noscript"/>
|
|
3461 </target>
|
|
3462
|
|
3463 <target name="-check-do-jar">
|
|
3464 <condition property="do-jar-false">
|
|
3465 <and>
|
|
3466 <isset property="do.jar"/>
|
|
3467 <equals arg1="${do.jar}" arg2="false"/>
|
|
3468 </and>
|
|
3469 </condition>
|
|
3470 </target>
|
|
3471 <target name="-set-fallback-no-javascript">
|
|
3472 <property name="fallback.no.javascript" value="true"/>
|
|
3473 <echo message="Warning: Using fallback build infrastructure due to default JDK missing JavaScript support."/>
|
|
3474 </target>
|
|
3475 <target name="-jfx-do-compile" depends="-check-do-jar" if="do-jar-false">
|
|
3476 <antcall target="compile"/>
|
|
3477 </target>
|
|
3478 <target name="-jfx-do-jar" depends="-check-do-jar" unless="do-jar-false">
|
|
3479 <antcall target="jar"/>
|
|
3480 </target>
|
|
3481 <target name="-jfx-do-post-jar" depends="-init-check,-check-project" if="preloader-app">
|
|
3482 <!-- Preloaders are created using SE copylibs task that creates readme file relevant for SE only -->
|
|
3483 <delete file="${basedir}${file.separator}${dist.dir}${file.separator}README.TXT"/>
|
|
3484 </target>
|
|
3485
|
|
3486 <target name="-set-do-build-native-package">
|
|
3487 <property name="do.build.native.package" value="true"/>
|
|
3488 <echo message="do.build.native.package = ${do.build.native.package}" level="verbose"/>
|
|
3489 </target>
|
|
3490 <target name="-check-ant-jre-supports-native-packaging" depends="-check-ant-jre-version">
|
|
3491 <fail message="Error:${line.separator}JavaFX native packager requires NetBeans to run on JDK 1.7u6 or later !" if="have-ant-jre-pre7u6"/>
|
|
3492 </target>
|
|
3493
|
|
3494 <target name="-call-pre-jfx-native" if="do.build.native.package">
|
|
3495 <antcall target="-pre-jfx-native"/>
|
|
3496 </target>
|
|
3497 <target name="-call-post-jfx-native" if="do.build.native.package">
|
|
3498 <antcall target="-post-jfx-native"/>
|
|
3499 </target>
|
|
3500
|
|
3501 <target name="-check-native-bundling-type" depends="-check-operating-system" if="do.build.native.package">
|
|
3502 <condition property="need.Inno.presence">
|
|
3503 <and>
|
|
3504 <isset property="running.on.windows"/>
|
|
3505 <isset property="javafx.native.bundling.type"/>
|
|
3506 <or>
|
|
3507 <equals arg1="${javafx.native.bundling.type}" arg2="all" casesensitive="false"/>
|
|
3508 <equals arg1="${javafx.native.bundling.type}" arg2="installer" casesensitive="false"/>
|
|
3509 <equals arg1="${javafx.native.bundling.type}" arg2="exe" casesensitive="false"/>
|
|
3510 </or>
|
|
3511 </and>
|
|
3512 </condition>
|
|
3513 <condition property="need.WiX.presence">
|
|
3514 <and>
|
|
3515 <isset property="running.on.windows"/>
|
|
3516 <isset property="javafx.native.bundling.type"/>
|
|
3517 <or>
|
|
3518 <equals arg1="${javafx.native.bundling.type}" arg2="all" casesensitive="false"/>
|
|
3519 <equals arg1="${javafx.native.bundling.type}" arg2="installer" casesensitive="false"/>
|
|
3520 <equals arg1="${javafx.native.bundling.type}" arg2="msi" casesensitive="false"/>
|
|
3521 </or>
|
|
3522 </and>
|
|
3523 </condition>
|
|
3524 <condition property="need.dpkg.presence">
|
|
3525 <and>
|
|
3526 <isset property="running.on.unix"/>
|
|
3527 <isset property="javafx.native.bundling.type"/>
|
|
3528 <or>
|
|
3529 <equals arg1="${javafx.native.bundling.type}" arg2="deb" casesensitive="false"/>
|
|
3530 </or>
|
|
3531 </and>
|
|
3532 </condition>
|
|
3533 <condition property="need.rpmbuild.presence">
|
|
3534 <and>
|
|
3535 <isset property="running.on.unix"/>
|
|
3536 <isset property="javafx.native.bundling.type"/>
|
|
3537 <or>
|
|
3538 <equals arg1="${javafx.native.bundling.type}" arg2="rpm" casesensitive="false"/>
|
|
3539 </or>
|
|
3540 </and>
|
|
3541 </condition>
|
|
3542 <echo message="need.Inno.presence:${need.Inno.presence}" level="verbose"/>
|
|
3543 <echo message="need.WiX.presence:${need.WiX.presence}" level="verbose"/>
|
|
3544 <echo message="need.dpkg.presence:${need.dpkg.presence}" level="verbose"/>
|
|
3545 <echo message="need.rpmbuild.presence:${need.rpmbuild.presence}" level="verbose"/>
|
|
3546 </target>
|
|
3547 <target name="-check-Inno-presence" depends="-check-native-bundling-type" if="need.Inno.presence">
|
|
3548 <local name="exec-output"/>
|
|
3549 <local name="exec-error"/>
|
|
3550 <local name="exec-result"/>
|
|
3551 <exec executable="iscc" outputproperty="exec-output" failifexecutionfails="false" errorproperty="exec-error" resultproperty="exec-result"/>
|
|
3552 <echo message="exec-output:${exec-output}" level="verbose"/>
|
|
3553 <echo message="exec-error:${exec-error}" level="verbose"/>
|
|
3554 <echo message="exec-result:${exec-result}" level="verbose"/>
|
|
3555 <condition property="missing.Inno">
|
|
3556 <not><and>
|
|
3557 <contains string="${exec-output}" substring="Inno Setup"/>
|
|
3558 <not><contains string="${exec-output}" substring="Inno Setup 1"/></not>
|
|
3559 <not><contains string="${exec-output}" substring="Inno Setup 2"/></not>
|
|
3560 <not><contains string="${exec-output}" substring="Inno Setup 3"/></not>
|
|
3561 <not><contains string="${exec-output}" substring="Inno Setup 4"/></not>
|
|
3562 </and></not>
|
|
3563 </condition>
|
|
3564 </target>
|
|
3565 <target name="-check-WiX-presence" depends="-check-native-bundling-type" if="need.WiX.presence">
|
|
3566 <local name="exec-output"/>
|
|
3567 <local name="exec-error"/>
|
|
3568 <local name="exec-result"/>
|
|
3569 <exec executable="candle" outputproperty="exec-output" failifexecutionfails="false" errorproperty="exec-error" resultproperty="exec-result">
|
|
3570 <arg value="-?"/>
|
|
3571 </exec>
|
|
3572 <echo message="exec-output:${exec-output}" level="verbose"/>
|
|
3573 <echo message="exec-error:${exec-error}" level="verbose"/>
|
|
3574 <echo message="exec-result:${exec-result}" level="verbose"/>
|
|
3575 <condition property="missing.WiX">
|
|
3576 <not>
|
|
3577 <matches string="${exec-output}" pattern="windows\s+installer\s+xml\s+(toolset\s+)?compiler\s+version\s+3.*" casesensitive="false"/>
|
|
3578 </not>
|
|
3579 </condition>
|
|
3580 </target>
|
|
3581 <target name="-check-dpkg-presence" depends="-check-native-bundling-type" if="need.dpkg.presence">
|
|
3582 <local name="exec.which.dpkg.result"/>
|
|
3583 <local name="exec.which.dpkg.output"/>
|
|
3584 <exec executable="command" failifexecutionfails="false" failonerror="false" resultproperty="exec.which.dpkg.result" outputproperty="exec.which.dpkg.output">
|
|
3585 <arg line="-v dpkg"/>
|
|
3586 </exec>
|
|
3587 <condition property="missing.dpkg">
|
|
3588 <not><and>
|
|
3589 <isset property="exec.which.dpkg.result"/>
|
|
3590 <equals arg1="${exec.which.dpkg.result}" arg2="0"/>
|
|
3591 <isset property="exec.which.dpkg.output"/>
|
|
3592 <not><equals arg1="${exec.which.dpkg.output}" arg2=""/></not>
|
|
3593 </and></not>
|
|
3594 </condition>
|
|
3595 </target>
|
|
3596 <target name="-check-rpmbuild-presence" depends="-check-native-bundling-type" if="need.rpmbuild.presence">
|
|
3597 <local name="exec.which.rpmbuild.result"/>
|
|
3598 <local name="exec.which.rpmbuild.output"/>
|
|
3599 <exec executable="command" failifexecutionfails="false" failonerror="false" resultproperty="exec.which.rpmbuild.result" outputproperty="exec.which.rpmbuild.output">
|
|
3600 <arg line="-v rpmbuild"/>
|
|
3601 </exec>
|
|
3602 <condition property="missing.rpmbuild">
|
|
3603 <not><and>
|
|
3604 <isset property="exec.which.rpmbuild.result"/>
|
|
3605 <equals arg1="${exec.which.rpmbuild.result}" arg2="0"/>
|
|
3606 <isset property="exec.which.rpmbuild.output"/>
|
|
3607 <not><equals arg1="${exec.which.rpmbuild.output}" arg2=""/></not>
|
|
3608 </and></not>
|
|
3609 </condition>
|
|
3610 </target>
|
|
3611 <target name="-check-native-packager-external-tools" depends="-check-Inno-presence, -check-WiX-presence, -check-dpkg-presence, -check-rpmbuild-presence">
|
|
3612 <property name="missing.Inno.message" value="JavaFX native packager requires external Inno Setup 5+ tools installed and included on PATH to create EXE installer. See http://www.jrsoftware.org/"/>
|
|
3613 <property name="missing.WiX.message" value="JavaFX native packager requires external WiX 3.0+ tools installed and included on PATH to create MSI installer. See http://wix.sourceforge.net/"/>
|
|
3614 <property name="missing.dpkg.message" value="JavaFX native packager requires Debian Packager tools to create DEB package, but dpkg could not be found."/>
|
|
3615 <property name="missing.rpmbuild.message" value="JavaFX native packager requires RPMBuild to create RPM package, but rpmbuild could not be found."/>
|
|
3616 <condition property="missing.Inno.WiX">
|
|
3617 <and>
|
|
3618 <isset property="missing.Inno"/>
|
|
3619 <isset property="missing.WiX"/>
|
|
3620 </and>
|
|
3621 </condition>
|
|
3622 <fail message="Error:${line.separator}${missing.Inno.message}${line.separator}${missing.WiX.message}" if="missing.Inno.WiX"/>
|
|
3623 <fail message="Error:${line.separator}${missing.Inno.message}" if="missing.Inno"/>
|
|
3624 <fail message="Error:${line.separator}${missing.WiX.message}" if="missing.WiX"/>
|
|
3625 <fail message="Error:${line.separator}${missing.dpkg.message}" if="missing.dpkg"/>
|
|
3626 <fail message="Error:${line.separator}${missing.rpmbuild.message}" if="missing.rpmbuild"/>
|
|
3627 </target>
|
|
3628
|
|
3629 <!-- Project Run Support -->
|
|
3630
|
|
3631 <target name="-warn-of-preloader" depends="-check-project" if="preloader-app-no-workaround">
|
|
3632 <fail message="Error:${line.separator}JavaFX 2 Preloader Project can not be executed directly.${line.separator}Please execute instead a JavaFX Application that uses the Preloader."/>
|
|
3633 </target>
|
|
3634
|
|
3635 <target name="-mark-project-state-running">
|
|
3636 <property name="project.state.running" value="true"/>
|
|
3637 <echo message="project.state.running = ${project.state.running}" level="verbose"/>
|
|
3638 </target>
|
|
3639 <target name="-mark-project-state-debugging">
|
|
3640 <property name="project.state.debugging" value="true"/>
|
|
3641 <echo message="project.state.debugging = ${project.state.debugging}" level="verbose"/>
|
|
3642 </target>
|
|
3643 <target name="-mark-project-state-debugging-in-browser" depends="-mark-project-state-debugging">
|
|
3644 <property name="project.state.debugging.in.browser" value="true"/>
|
|
3645 <echo message="project.state.debugging.in.browser = ${project.state.debugging.in.browser}" level="verbose"/>
|
|
3646 </target>
|
|
3647 <target name="-mark-project-state-profiling">
|
|
3648 <property name="project.state.profiling" value="true"/>
|
|
3649 <echo message="project.state.profiling = ${project.state.profiling}" level="verbose"/>
|
|
3650 </target>
|
|
3651 <target name="-mark-project-needs-jnlp">
|
|
3652 <property name="project.needs.jnlp" value="true"/>
|
|
3653 <echo message="project.needs.jnlp = ${project.needs.jnlp}" level="verbose"/>
|
|
3654 </target>
|
|
3655
|
|
3656 <!-- set property javafx.disable.concurrent.runs=true to disable runs from temporary directory -->
|
|
3657 <target name="-check-concurrent-runs">
|
|
3658 <condition property="disable-concurrent-runs">
|
|
3659 <and>
|
|
3660 <isset property="javafx.disable.concurrent.runs"/>
|
|
3661 <equals arg1="${javafx.disable.concurrent.runs}" arg2="true" trim="true"/>
|
|
3662 </and>
|
|
3663 </condition>
|
|
3664 <condition property="temp.run.jar" value="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}">
|
|
3665 <isset property="disable-concurrent-runs"/>
|
|
3666 </condition>
|
|
3667 <condition property="temp.run.jnlp" value="${jfx.deployment.jnlp}">
|
|
3668 <isset property="disable-concurrent-runs"/>
|
|
3669 </condition>
|
|
3670 <condition property="temp.run.html" value="${jfx.deployment.html}">
|
|
3671 <isset property="disable-concurrent-runs"/>
|
|
3672 </condition>
|
|
3673 </target>
|
|
3674 <target name="-create-temp-run-dir" depends="-check-concurrent-runs" unless="disable-concurrent-runs">
|
|
3675 <echo message="Creating temp run dir" level="verbose"/>
|
|
3676 <tempfile property="temp.run.dir" destDir="${basedir}${file.separator}${dist.dir}${file.separator}" prefix="run"/>
|
|
3677 <echo message="temp.run.dir = ${temp.run.dir}" level="verbose"/>
|
|
3678 <copy todir="${temp.run.dir}" includeemptydirs="true" overwrite="true">
|
|
3679 <fileset dir="${basedir}${file.separator}${dist.dir}">
|
|
3680 <exclude name="**${file.separator}bundles${file.separator}**"/>
|
|
3681 <exclude name="**${file.separator}run*${file.separator}**"/>
|
|
3682 </fileset>
|
|
3683 </copy>
|
|
3684 <property name="temp.run.jar" value="${temp.run.dir}${file.separator}${jfx.deployment.jar}"/>
|
|
3685 <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
|
|
3686 <property name="temp.run.jnlp" value="${temp.run.dir}${file.separator}${jfx.deployment.base}.jnlp"/>
|
|
3687 <property name="temp.run.html" value="${temp.run.dir}${file.separator}${jfx.deployment.base}.html"/>
|
|
3688 </target>
|
|
3689 <target name="-remove-temp-run-dir" if="temp.run.dir">
|
|
3690 <echo message="Removing temp run dir" level="verbose"/>
|
|
3691 <delete dir="${temp.run.dir}" quiet="true" failonerror="false"/>
|
|
3692 </target>
|
|
3693 <target depends="init,compile,jar,-create-temp-run-dir" description="Run JavaFX project standalone." name="jfx-project-run">
|
|
3694 <echo message="Executing ${temp.run.jar} using platform ${platform.java}"/>
|
|
3695 <property name="run.jvmargs" value=""/>
|
|
3696 <property name="run.jvmargs.ide" value=""/>
|
|
3697 <java jar="${temp.run.jar}" dir="${work.dir}" fork="true" jvm="${platform.java}">
|
|
3698 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
3699 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
|
3700 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
|
3701 <jvmarg line="${run.jvmargs}"/>
|
|
3702 <jvmarg line="${run.jvmargs.ide}"/>
|
|
3703 <classpath>
|
|
3704 <path path="${temp.run.jar}:${javac.classpath}"/>
|
|
3705 </classpath>
|
|
3706 <arg line="${application.args}"/>
|
|
3707 <syspropertyset>
|
|
3708 <propertyref prefix="run-sys-prop."/>
|
|
3709 <mapper from="run-sys-prop.*" to="*" type="glob"/>
|
|
3710 </syspropertyset>
|
|
3711 </java>
|
|
3712 <antcall target="-remove-temp-run-dir"/>
|
|
3713 </target>
|
|
3714 <target depends="init,compile,jar,-create-temp-run-dir,-debug-start-debugger" description="Debug JavaFX project standalone." name="jfx-project-debug">
|
|
3715 <echo message="Executing ${temp.run.jar} using platform ${platform.java}"/>
|
|
3716 <property name="run.jvmargs" value=""/>
|
|
3717 <property name="run.jvmargs.ide" value=""/>
|
|
3718 <java jar="${temp.run.jar}" dir="${work.dir}" fork="true" jvm="${platform.java}">
|
|
3719 <jvmarg line="${endorsed.classpath.cmd.line.arg}"/>
|
|
3720 <jvmarg line="${debug-args-line}"/>
|
|
3721 <jvmarg value="-Xrunjdwp:transport=${debug-transport},address=${jpda.address}"/>
|
|
3722 <jvmarg value="-Dglass.disableGrab=true"/>
|
|
3723 <jvmarg value="-Dfile.encoding=${runtime.encoding}"/>
|
|
3724 <redirector errorencoding="${runtime.encoding}" inputencoding="${runtime.encoding}" outputencoding="${runtime.encoding}"/>
|
|
3725 <jvmarg line="${run.jvmargs}"/>
|
|
3726 <jvmarg line="${run.jvmargs.ide}"/>
|
|
3727 <classpath>
|
|
3728 <path path="${temp.run.jar}:${javac.classpath}"/>
|
|
3729 </classpath>
|
|
3730 <arg line="${application.args}"/>
|
|
3731 <syspropertyset>
|
|
3732 <propertyref prefix="run-sys-prop."/>
|
|
3733 <mapper from="run-sys-prop.*" to="*" type="glob"/>
|
|
3734 </syspropertyset>
|
|
3735 </java>
|
|
3736 <antcall target="-remove-temp-run-dir"/>
|
|
3737 </target>
|
|
3738
|
|
3739
|
|
3740 <!-- Running/Debugging/Profiling Standalone -->
|
|
3741
|
|
3742 <target name="jfxsa-run" depends="-mark-project-state-running,-clean-if-config-changed,-check-jfx-runtime,-warn-of-preloader,jfx-project-run"/>
|
|
3743 <target name="jfxsa-run-noscript" depends="-set-fallback-no-javascript, jfxsa-run"/>
|
|
3744
|
|
3745 <target name="jfxsa-debug" depends="-mark-project-state-debugging,-clean-if-config-changed,jar,-check-jfx-runtime,-warn-of-preloader,jfx-project-debug"/>
|
|
3746 <target name="jfxsa-debug-noscript" depends="-set-fallback-no-javascript, jfxsa-debug"/>
|
|
3747
|
|
3748 <target name="jfxsa-profile" depends="-mark-project-state-profiling,-check-jfx-runtime,-warn-of-preloader,jfx-project-profile"/>
|
|
3749 <target name="jfxsa-profile-noscript" depends="-set-fallback-no-javascript, jfxsa-profile"/>
|
|
3750
|
|
3751 <target name="-check-clean-if-config-changed" depends="-init-project">
|
|
3752 <deploy-defines/>
|
|
3753 <uptodate property="jfx.deployment.jar.newer.than.nbproject" targetfile="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}" >
|
|
3754 <srcfiles dir="${basedir}${file.separator}nbproject" includes="**${file.separator}*"/>
|
|
3755 </uptodate>
|
|
3756 <echo message="jfx.deployment.jar.newer.than.nbproject = ${jfx.deployment.jar.newer.than.nbproject}" level="verbose"/>
|
|
3757 <available file="${jfx.deployment.dir}${file.separator}${jfx.deployment.jar}" type="file" property="jfx.deployment.jar.exists"/>
|
|
3758 <condition property="request.clean.due.to.config.change">
|
|
3759 <and>
|
|
3760 <isset property="jfx.deployment.jar.exists"/>
|
|
3761 <not><isset property="jfx.deployment.jar.newer.than.nbproject"/></not>
|
|
3762 </and>
|
|
3763 </condition>
|
|
3764 </target>
|
|
3765 <target name="-clean-if-config-changed" depends="-check-clean-if-config-changed" if="request.clean.due.to.config.change">
|
|
3766 <echo message="Config change detected. Invoking clean." level="verbose"/>
|
|
3767 <antcall target="clean"/>
|
|
3768 </target>
|
|
3769
|
|
3770 <target depends="-profile-check-1,-profile-pre72" description="Profile a project in the IDE." if="profiler.configured" name="jfx-project-profile" unless="profiler.info.jvmargs.agent">
|
|
3771 <startprofiler/>
|
|
3772 <antcall target="jfxsa-run"/>
|
|
3773 </target>
|
|
3774
|
|
3775 <!-- Shared Debugging init -->
|
|
3776
|
|
3777 <target name="-init-debug-args">
|
|
3778 <property name="version-output" value="java version "${ant.java.version}"/>
|
|
3779 <condition property="have-jdk-older-than-1.4">
|
|
3780 <or>
|
|
3781 <contains string="${version-output}" substring="java version "1.0"/>
|
|
3782 <contains string="${version-output}" substring="java version "1.1"/>
|
|
3783 <contains string="${version-output}" substring="java version "1.2"/>
|
|
3784 <contains string="${version-output}" substring="java version "1.3"/>
|
|
3785 </or>
|
|
3786 </condition>
|
|
3787 <condition else="-Xdebug" property="debug-args-line" value="-Xdebug -Xnoagent -Djava.compiler=none">
|
|
3788 <istrue value="${have-jdk-older-than-1.4}"/>
|
|
3789 </condition>
|
|
3790 <condition else="dt_socket" property="debug-transport-by-os" value="dt_shmem">
|
|
3791 <os family="windows"/>
|
|
3792 </condition>
|
|
3793 <condition else="${debug-transport-by-os}" property="debug-transport" value="${debug.transport}">
|
|
3794 <isset property="debug.transport"/>
|
|
3795 </condition>
|
|
3796 </target>
|
|
3797
|
|
3798
|
|
3799 <!-- Running/Debugging/Profiling as WebStart -->
|
|
3800
|
|
3801 <target name="-check-jnlp-file-fx" depends="-swing-api-check" unless="fx-in-swing-app-workaround">
|
|
3802 <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
|
|
3803 <property name="jfx.deployment.jnlp" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.jnlp"/>
|
|
3804 </target>
|
|
3805 <target name="-check-jnlp-file-swing" depends="-swing-api-check" if="fx-in-swing-app-workaround">
|
|
3806 <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
|
|
3807 <property name="jfx.deployment.jnlp" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}_application.jnlp"/>
|
|
3808 </target>
|
|
3809 <target name="-check-jnlp-file" depends="-check-jnlp-file-fx,-check-jnlp-file-swing">
|
|
3810 <condition property="jnlp-file-exists">
|
|
3811 <available file="${jfx.deployment.jnlp}"/>
|
|
3812 </condition>
|
|
3813 <condition property="jnlp-file-exists+netbeans.home">
|
|
3814 <and>
|
|
3815 <isset property="jnlp-file-exists"/>
|
|
3816 <isset property="netbeans.home"/>
|
|
3817 </and>
|
|
3818 </condition>
|
|
3819 </target>
|
|
3820
|
|
3821 <target name="-resolve-jnlp-file" depends="-check-jnlp-file" unless="jnlp-file-exists">
|
|
3822 <antcall target="jfx-deployment"/>
|
|
3823 <antcall target="-check-jnlp-file"/>
|
|
3824 </target>
|
|
3825
|
|
3826 <!-- set property javafx.enable.concurrent.external.runs=true to enable multiple runs of the same WebStart or Run-in-Browser project -->
|
|
3827 <target name="-check-concurrent-jnlp-runs" depends="-resolve-jnlp-file">
|
|
3828 <condition property="disable-concurrent-runs">
|
|
3829 <not>
|
|
3830 <and>
|
|
3831 <isset property="javafx.enable.concurrent.external.runs"/>
|
|
3832 <equals arg1="${javafx.enable.concurrent.external.runs}" arg2="true" trim="true"/>
|
|
3833 </and>
|
|
3834 </not>
|
|
3835 </condition>
|
|
3836 <condition property="temp.run.jnlp" value="${jfx.deployment.jnlp}">
|
|
3837 <isset property="disable-concurrent-runs"/>
|
|
3838 </condition>
|
|
3839 </target>
|
|
3840 <target name="-warn-concurrent-jnlp-runs" unless="disable-concurrent-runs">
|
|
3841 <echo message="Note: Concurrent Run as WebStart enabled.${line.separator}Temporary directory ${temp.run.dir}${line.separator}will remain unused when WebStart execution has finished. Use project Clean to delete unused directories."/>
|
|
3842 </target>
|
|
3843
|
|
3844 <target name="jfxws-run" if="jnlp-file-exists" depends="-mark-project-state-running,-clean-if-config-changed,-mark-project-needs-jnlp,-check-jdk-7u4or5-mac,jar,
|
|
3845 -check-jfx-webstart,-resolve-jnlp-file,-check-jfx-runtime,-check-concurrent-jnlp-runs,-create-temp-run-dir,-warn-insufficient-signing"
|
|
3846 description="Start JavaFX javaws execution">
|
|
3847 <echo message="Executing ${temp.run.jnlp} using ${active.webstart.executable}"/>
|
|
3848 <exec executable="${active.webstart.executable}">
|
|
3849 <arg file="${temp.run.jnlp}"/>
|
|
3850 </exec>
|
|
3851 <antcall target="-warn-concurrent-jnlp-runs"/>
|
|
3852 </target>
|
|
3853
|
|
3854 <target name="jfxws-debug" if="jnlp-file-exists+netbeans.home" depends="-mark-project-state-debugging,-clean-if-config-changed,-mark-project-needs-jnlp,
|
|
3855 -check-jdk-7u4or5-mac,jar,-check-jfx-webstart,-resolve-jnlp-file,-check-jfx-runtime,-warn-insufficient-signing,
|
|
3856 -debug-start-debugger,-debug-javaws-debuggee" description="Debug JavaFX javaws project in IDE"/>
|
|
3857
|
|
3858 <target name="-debug-javaws-debuggee" depends="-init-debug-args">
|
|
3859 <echo message="Executing ${jfx.deployment.jnlp} in debug mode using ${active.webstart.executable}"/>
|
|
3860 <exec executable="${active.webstart.executable}">
|
|
3861 <env key="JAVAWS_VM_ARGS" value="${debug-args-line} -Xrunjdwp:transport=${debug-transport},address=${jpda.address} -Dglass.disableGrab=true"/>
|
|
3862 <arg value="-wait"/>
|
|
3863 <arg file="${jfx.deployment.jnlp}"/>
|
|
3864 </exec>
|
|
3865 </target>
|
|
3866
|
|
3867 <target name="-profile-check-1">
|
|
3868 <property name="run.jvmargs.ide" value=""/>
|
|
3869 <condition property="profiler.configured">
|
|
3870 <or>
|
|
3871 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-agentpath:"/>
|
|
3872 <contains casesensitive="true" string="${run.jvmargs.ide}" substring="-javaagent:"/>
|
|
3873 </or>
|
|
3874 </condition>
|
|
3875 </target>
|
|
3876
|
|
3877 <target if="jnlp-file-exists+netbeans.home" name="-profile-check-jnlp">
|
|
3878 <antcall target="-profile-check-1"/>
|
|
3879 </target>
|
|
3880
|
|
3881 <target name="-do-jfxws-profile" depends="-mark-project-state-profiling,-mark-project-needs-jnlp,
|
|
3882 -check-jdk-7u4or5-mac,jar,-check-jfx-webstart,-resolve-jnlp-file,-check-jfx-runtime,-warn-insufficient-signing">
|
|
3883 <echo message="Executing ${jfx.deployment.jnlp} in profile mode using ${active.webstart.executable}"/>
|
|
3884 <property name="run.jvmargs.ide" value=""/>
|
|
3885 <exec executable="${active.webstart.executable}">
|
|
3886 <env key="JAVAWS_VM_ARGS" value="${run.jvmargs.ide}"/>
|
|
3887 <arg value="-wait"/>
|
|
3888 <arg file="${jfx.deployment.jnlp}"/>
|
|
3889 </exec>
|
|
3890 </target>
|
|
3891
|
|
3892 <target name="jfxws-profile" if="profiler.configured"
|
|
3893 depends="-profile-check-1"
|
|
3894 description="Profile JavaFX javaws project in IDE">
|
|
3895 <startprofiler/>
|
|
3896 <antcall target="-do-jfxws-profile"/>
|
|
3897 </target>
|
|
3898
|
|
3899 <target name="jfxws-run-noscript" depends="-set-fallback-no-javascript, jfxws-run"/>
|
|
3900
|
|
3901 <target name="jfxws-debug-noscript" depends="-set-fallback-no-javascript, jfxws-debug"/>
|
|
3902
|
|
3903 <target name="jfxws-profile-noscript" depends="-set-fallback-no-javascript, jfxws-profile"/>
|
|
3904
|
|
3905
|
|
3906 <!-- Running/Debugging/Profiling in Browser -->
|
|
3907
|
|
3908 <target name="-check-selected-browser-path" depends="-check-default-run-config">
|
|
3909 <condition property="javafx.run.inbrowser.undefined">
|
|
3910 <or>
|
|
3911 <and>
|
|
3912 <isset property="javafx.run.inbrowser"/>
|
|
3913 <equals arg1="${javafx.run.inbrowser}" arg2="undefined"/>
|
|
3914 </and>
|
|
3915 <and>
|
|
3916 <isset property="javafx.run.inbrowser.path"/>
|
|
3917 <equals arg1="${javafx.run.inbrowser.path}" arg2="undefined"/>
|
|
3918 </and>
|
|
3919 </or>
|
|
3920 </condition>
|
|
3921 <condition property="javafx.run.inbrowser.path-exists">
|
|
3922 <and>
|
|
3923 <isset property="javafx.run.inbrowser.path"/>
|
|
3924 <available file="${javafx.run.inbrowser.path}"/>
|
|
3925 </and>
|
|
3926 </condition>
|
|
3927 <fail message="Error:${line.separator}Browser selection not recognizable from ${config} run configuration.${line.separator}Please go to Project Properties dialog, category Run, to select a valid browser." unless="javafx.run.inbrowser.path"/>
|
|
3928 <fail message="Error:${line.separator}No browser defined in ${config} run configuration.${line.separator}Please verify in Tools->Options dialog that NetBeans recognizes a valid browser, then go to Project Properties dialog, category Run, to select a valid browser." if="javafx.run.inbrowser.undefined"/>
|
|
3929 <fail message="Error:${line.separator}Browser ${javafx.run.inbrowser.path} referred from ${config} run configuration can not be found.${line.separator}(This can happen, e.g, when the JavaFX Project is transferred to another system.)${line.separator}Please go to Project Properties dialog, category Run, to select a valid browser." unless="javafx.run.inbrowser.path-exists"/>
|
|
3930 </target>
|
|
3931
|
|
3932 <target name="-substitute-template-processed-html-file" depends="-check-project" if="html-template-available">
|
|
3933 <deploy-process-template/>
|
|
3934 </target>
|
|
3935 <target name="-check-template-processed-html-file" depends="-substitute-template-processed-html-file">
|
|
3936 <condition property="html-file-exists">
|
|
3937 <and>
|
|
3938 <isset property="html-template-available"/>
|
|
3939 <available file="${javafx.run.htmltemplate.processed}"/>
|
|
3940 </and>
|
|
3941 </condition>
|
|
3942 </target>
|
|
3943
|
|
3944 <target name="-set-template-processed-html-file" depends="-check-template-processed-html-file" if="html-file-exists">
|
|
3945 <property name="jfx.deployment.html" location="${javafx.run.htmltemplate.processed}"/>
|
|
3946 </target>
|
|
3947
|
|
3948 <target name="-set-html-file" depends="-set-template-processed-html-file" unless="html-file-exists">
|
|
3949 <basename property="jfx.deployment.base" file="${jfx.deployment.jar}" suffix=".jar"/>
|
|
3950 <property name="jfx.deployment.html" location="${jfx.deployment.dir}${file.separator}${jfx.deployment.base}.html"/>
|
|
3951 <condition property="html-file-exists">
|
|
3952 <available file="${jfx.deployment.html}"/>
|
|
3953 </condition>
|
|
3954 <condition property="html-file-exists+netbeans.home">
|
|
3955 <and>
|
|
3956 <isset property="html-file-exists"/>
|
|
3957 <isset property="netbeans.home"/>
|
|
3958 </and>
|
|
3959 </condition>
|
|
3960 </target>
|
|
3961
|
|
3962 <!-- set property javafx.enable.concurrent.external.runs=true to enable multiple runs of the same WebStart or Run-in-Browser project -->
|
|
3963 <target name="-check-concurrent-html-runs" depends="-set-html-file">
|
|
3964 <condition property="disable-concurrent-runs">
|
|
3965 <or>
|
|
3966 <not>
|
|
3967 <and>
|
|
3968 <isset property="javafx.enable.concurrent.external.runs"/>
|
|
3969 <equals arg1="${javafx.enable.concurrent.external.runs}" arg2="true" trim="true"/>
|
|
3970 </and>
|
|
3971 </not>
|
|
3972 <and>
|
|
3973 <isset property="html-template-available"/>
|
|
3974 <available file="${javafx.run.htmltemplate.processed}"/>
|
|
3975 </and>
|
|
3976 </or>
|
|
3977 </condition>
|
|
3978 <condition property="temp.run.html" value="${jfx.deployment.html}">
|
|
3979 <isset property="disable-concurrent-runs"/>
|
|
3980 </condition>
|
|
3981 </target>
|
|
3982 <target name="-warn-concurrent-html-runs" unless="disable-concurrent-runs">
|
|
3983 <echo message="Note: Concurrent Run in Browser enabled.${line.separator}Temporary directory ${temp.run.dir}${line.separator}will remain unused when execution in browser has finished. Use project Clean to delete unused directories."/>
|
|
3984 </target>
|
|
3985
|
|
3986 <target name="jfxbe-run" if="html-file-exists" depends="-mark-project-state-running,-clean-if-config-changed,-mark-project-needs-jnlp,-check-jdk-7u4or5-mac,jar,
|
|
3987 -check-selected-browser-path,-set-html-file,-check-jfx-runtime,-check-concurrent-html-runs,-create-temp-run-dir,-warn-insufficient-signing"
|
|
3988 description="Start JavaFX execution in browser">
|
|
3989 <echo message="Executing ${temp.run.html} using ${javafx.run.inbrowser}"/>
|
|
3990 <echo message="(${javafx.run.inbrowser.path})"/>
|
|
3991 <property name="javafx.run.inbrowser.arguments" value=""/>
|
|
3992 <exec executable="${javafx.run.inbrowser.path}">
|
|
3993 <arg line="${javafx.run.inbrowser.arguments}"/>
|
|
3994 <arg file="${temp.run.html}"/>
|
|
3995 </exec>
|
|
3996 <antcall target="-warn-concurrent-html-runs"/>
|
|
3997 </target>
|
|
3998
|
|
3999 <target name="jfxbe-debug" if="html-file-exists+netbeans.home" depends="-mark-project-state-debugging-in-browser,-init-debug-args,
|
|
4000 clean,-debug-start-debugger,-mark-project-needs-jnlp,-check-jdk-7u4or5-mac,jar,
|
|
4001 -check-selected-browser-path,-set-html-file,-check-jfx-runtime,-warn-insufficient-signing,
|
|
4002 -debug-jfxbe-debuggee" description="Debug JavaFX project in browser">
|
|
4003 <!-- after the session clean up the jnlp containing debug settings -->
|
|
4004 <antcall target="clean"/>
|
|
4005 </target>
|
|
4006
|
|
4007 <target name="-debug-jfxbe-debuggee" depends="-init-debug-args">
|
|
4008 <echo message="Executing ${jfx.deployment.html} in debug mode using ${javafx.run.inbrowser}"/>
|
|
4009 <echo message="(${javafx.run.inbrowser.path})"/>
|
|
4010 <property name="javafx.run.inbrowser.arguments" value=""/>
|
|
4011 <exec executable="${javafx.run.inbrowser.path}">
|
|
4012 <arg line="${javafx.run.inbrowser.arguments}"/>
|
|
4013 <env key="_JPI_VM_OPTIONS" value="-agentlib:jdwp=transport=${debug-transport},address=${jpda.address}"/>
|
|
4014 <arg file="${jfx.deployment.html}"/>
|
|
4015 </exec>
|
|
4016 </target>
|
|
4017
|
|
4018 <target if="html-file-exists+netbeans.home" name="-profile-check-html">
|
|
4019 <antcall target="-profile-check-1"/>
|
|
4020 </target>
|
|
4021
|
|
4022 <target name="-do-jfxbe-profile" depends="-mark-project-state-profiling,-mark-project-needs-jnlp,
|
|
4023 -check-jdk-7u4or5-mac,jar,-check-selected-browser-path,-set-html-file,-check-jfx-runtime,-warn-insufficient-signing">
|
|
4024 <echo message="Executing ${jfx.deployment.html} in profile mode using ${javafx.run.inbrowser}"/>
|
|
4025 <echo message="(${javafx.run.inbrowser.path})"/>
|
|
4026 <property name="run.jvmargs.ide" value=""/>
|
|
4027 <property name="javafx.run.inbrowser.arguments" value=""/>
|
|
4028 <exec executable="${javafx.run.inbrowser.path}">
|
|
4029 <arg line="${javafx.run.inbrowser.arguments}"/>
|
|
4030 <env key="_JPI_VM_OPTIONS" value="${run.jvmargs.ide}"/>
|
|
4031 <arg file="${jfx.deployment.html}"/>
|
|
4032 </exec>
|
|
4033 </target>
|
|
4034
|
|
4035 <target name="jfxbe-profile" if="profiler.configured"
|
|
4036 depends="-profile-check-html"
|
|
4037 description="Profile JavaFX project in browser">
|
|
4038 <startprofiler/>
|
|
4039 <antcall target="-do-jfxbe-profile"/>
|
|
4040 </target>
|
|
4041
|
|
4042 <target name="jfxbe-run-noscript" depends="-set-fallback-no-javascript, jfxbe-run"/>
|
|
4043
|
|
4044 <target name="jfxbe-debug-noscript" depends="-set-fallback-no-javascript, jfxbe-debug"/>
|
|
4045
|
|
4046 <target name="jfxbe-profile-noscript" depends="-set-fallback-no-javascript, jfxbe-profile"/>
|
|
4047
|
|
4048
|
|
4049 </project>
|