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>