annotate KinaMine-Galaxy-7-7/nbproject/jfx-impl.xml @ 0:67635b462045 draft

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