1 <?xml version="1.0" encoding="UTF-8"?> 2 <project default="find-javafx"> 3 <target name="write-javafx-rt" if="javafx.rt"> 4 <propertyfile file="${basedir}/build.properties"> 5 <entry key="javafx.rt" value="${javafx.rt}"/> 6 </propertyfile> 7 </target> 8 <target name="read-javafx-rt" unless="javafx.rt"> 9 <property file="build.properties"/> 10 </target> 11 <target name="check-javafx-in-jdk" unless="javafx.rt"> 12 <fail unless="fx-jar-exists" message="${java.home}/lib/ext/ javafx do not exist"/> 13 <property name="javafx.rt" value="${java.home}"/> 14 <antcall target="write-javafx-rt" inheritall="true"/> 15 </target> 16 <target name="check-javafx-rt" if="javafx.rt"> 17 <fail unless="fx-jar-exists" message="${javafx.rt}/lib/ext/ javafx jars do not exist"/> 18 </target> 19 <target name="validate-fx-jars"> 20 <condition property="fx-jar-exists"> 21 <or> 22 <available file="${javafx.rt}/lib/ext/jfxrt.jar"/> 23 <available file="${java.home}/lib/ext/jfxrt.jar"/> 24 <available file="${javafx.rt}/lib/ext/jfxrt-graphics.jar"/> 25 </or> 26 </condition> 27 </target> 28 <target name="find-javafx" depends="write-javafx-rt, read-javafx-rt, validate-fx-jars, check-javafx-in-jdk, check-javafx-rt"> 29 <property file="build.properties"/> 30 <echo message="Building with JavaFX from ${javafx.rt}"/> 31 </target> 32 </project> | 1 <?xml version="1.0" encoding="UTF-8"?> 2 <project default="find-javafx"> 3 <target name="write-javafx-rt" if="javafx.rt"> 4 <propertyfile file="${basedir}/build.properties"> 5 <entry key="javafx.rt" value="${javafx.rt}"/> 6 </propertyfile> 7 </target> 8 <target name="read-javafx-rt" unless="javafx.rt"> 9 <property file="build.properties"/> 10 </target> 11 <target name="check-javafx-in-jdk" unless="javafx.rt"> 12 <!--fail unless="fx-jar-exists" message="${java.home}/lib/ javafx do not exist"/--> 13 <property name="javafx.rt" value="${java.home}"/> 14 <antcall target="write-javafx-rt" inheritall="true"/> 15 </target> 16 <target name="validate-fx-jars"> 17 <condition property="fx-jar-exists"> 18 <or> 19 <available file="${javafx.rt}/lib/jfxrt.jar"/> 20 <available file="${java.home}/lib/jfxrt.jar"/> 21 <available file="${javafx.rt}/lib/jfxrt-graphics.jar"/> 22 </or> 23 </condition> 24 </target> 25 <target name="find-javafx" depends="write-javafx-rt, read-javafx-rt, validate-fx-jars, check-javafx-in-jdk"> 26 <property file="build.properties"/> 27 <echo message="Building with JavaFX from ${javafx.rt}"/> 28 </target> 29 </project> |