-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdetect_javafx.xml
29 lines (29 loc) · 1.22 KB
/
detect_javafx.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?xml version="1.0" encoding="UTF-8"?>
<project default="find-javafx">
<target name="write-javafx-rt" if="javafx.rt">
<propertyfile file="${basedir}/build.properties">
<entry key="javafx.rt" value="${javafx.rt}"/>
</propertyfile>
</target>
<target name="read-javafx-rt" unless="javafx.rt">
<property file="build.properties"/>
</target>
<target name="check-javafx-in-jdk" unless="javafx.rt">
<!--fail unless="fx-jar-exists" message="${java.home}/lib/ javafx do not exist"/-->
<property name="javafx.rt" value="${java.home}"/>
<antcall target="write-javafx-rt" inheritall="true"/>
</target>
<target name="validate-fx-jars">
<condition property="fx-jar-exists">
<or>
<available file="${javafx.rt}/lib/jfxrt.jar"/>
<available file="${java.home}/lib/jfxrt.jar"/>
<available file="${javafx.rt}/lib/jfxrt-graphics.jar"/>
</or>
</condition>
</target>
<target name="find-javafx" depends="write-javafx-rt, read-javafx-rt, validate-fx-jars, check-javafx-in-jdk">
<property file="build.properties"/>
<echo message="Building with JavaFX from ${javafx.rt}"/>
</target>
</project>