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