forked from simonsalykov/cirqwizard
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
107 lines (88 loc) · 4.07 KB
/
build.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<project name="cirqwizard" default="dist" basedir="." xmlns:fx="javafx:com.sun.javafx.tools.ant">
<property name="src" location="src"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<property name="deploy" location="deploy"/>
<property name="res" location="res"/>
<property name="javafx.lib.ant-javafx.jar" location="${java.home}/../lib/ant-javafx.jar"/>
<property name="classpath" location="lib/RXTXcomm.jar:lib/controlsfx-8.0.6.jar:${java.home}/lib/jfxrt.jar"/>
<property name="application.title" value="cirqwizard"/>
<property name="application.vendor" value="cirqwizard"/>
<condition property="application.version" value="1.0">
<os name="Linux"/>
</condition>
<loadfile property="application.version" srcfile="src/version.number"/>
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${dist}"/>
<mkdir dir="${deploy}"/>
</target>
<target name="clean">
<delete dir="${build}"/>
<delete dir="${dist}"/>
<delete dir="${deploy}"/>
</target>
<target name="compile" depends="init" description="compile the source " >
<echo message="java.home ${java.home}"/>
<echo message="os.name ${os.name}"/>
<javac srcdir="${src}" classpath="${classpath}" destdir="${build}"/>
<copy todir="${build}">
<fileset dir="${src}" includes="**/*.fxml"/>
<fileset dir="${src}" includes="**/*.css"/>
<fileset dir="${src}" includes="**/*.png"/>
<fileset dir="${src}" includes="**/*.txt"/>
<fileset dir="${src}" includes="version.number"/>
<fileset dir="${res}" includes="**/*.*"/>
</copy>
</target>
<target name="run" depends="compile" description="run the application">
<java classname="org.cirqwizard.fx.MainApplication" fork="true">
<jvmarg value="-Djava.library.path=${basedir}/lib/native/${os.name}"/>
<classpath>
<pathelement path="${build}"/>
<pathelement path="${classpath}"/>
</classpath>
</java>
</target>
<target name="package" depends="clean,compile">
<taskdef resource="com/sun/javafx/tools/ant/antlib.xml"
uri="javafx:com.sun.javafx.tools.ant"
classpath="${javafx.lib.ant-javafx.jar}:${res}"/>
<fx:application id="cirQWizard"
name="cirQWizard"
version = "${application.version}"
mainClass="org.cirqwizard.fx.MainApplication" />
<fx:resources id="appRes">
<fx:fileset dir="${dist}" includes="cirqwizard.jar"/>
<fx:fileset dir="${basedir}/lib" includes="*.jar"/>
<fx:fileset dir="${basedir}/lib/native/${os.name}" type="data">
<include name="*.dll"/>
<include name="*.jnilib"/>
<include name="*.so"/>
</fx:fileset>
</fx:resources>
<fx:jar destfile="dist/cirqwizard.jar">
<!-- Define what to launch -->
<fx:application refid="cirQWizard"/>
<!-- Define what classpath to use -->
<fx:resources refid="appRes"/>
<manifest>
<attribute name="Implementation-Vendor" value="simon"/>
<attribute name="Implementation-Title" value="simon"/>
<attribute name="Implementation-Version" value="${application.version}"/>
</manifest>
<!-- Define what files to include -->
<fileset dir="${build}"/>
</fx:jar>
<fx:deploy width="800" height="600"
outdir="${deploy}" embedJNLP="true"
outfile="${application.title}"
nativeBundles="all">
<fx:application refId="cirQWizard"/>
<fx:resources refid="appRes"/>
<fx:info title="cirQWizard" vendor="${application.vendor}"/>
<!-- Request elevated permissions -->
<fx:permissions elevated="true"/>
</fx:deploy>
</target>
</project>