forked from lart2150/kmttg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
114 lines (114 loc) · 4.83 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
108
109
110
111
112
113
114
<?xml version="1.0"?>
<project name="kmttg" basedir="." default="all">
<property name="rversion" value="v2.9-l-rc1"/>
<tstamp/>
<property name="bversion" value="${DSTAMP}-${TSTAMP}"/>
<property name="lib" value="lib"/>
<property name="fxlib" value="C:\Program Files\Eclipse Adoptium\javafx-sdk-17.0.12\lib"/>
<property name="release" value="release"/>
<property name="main" value="."/>
<property name="main.class" value="com.tivo.kmttg.main.kmttg"/>
<property name="debuglevel" value="source,lines,vars"/>
<property name="target" value="1.8"/>
<property name="source" value="1.8"/>
<path id="main.classpath">
<pathelement location="${lib}/jmdns.jar"/>
<pathelement location="${lib}/tivo-libre.jar"/>
<pathelement location="${lib}/httpclient5-5.1.3.jar"/>
<pathelement location="${lib}/httpcore5-5.1.3.jar"/>
<pathelement location="${lib}/Java-WebSocket-1.5.5.jar"/>
<pathelement location="${fxlib}/javafx.base.jar"/>
<pathelement location="${fxlib}/javafx.controls.jar"/>
<pathelement location="${fxlib}/javafx.fxml.jar"/>
<pathelement location="${fxlib}/javafx.graphics.jar"/>
<pathelement location="${fxlib}/jjavafx.media.jar"/>
<pathelement location="${fxlib}/javafx.swing.jar"/>
<pathelement location="${fxlib}/javafx.web.jar"/>
<pathelement location="${fxlib}/javafx-swt.jar"/>
</path>
<target name="clean">
<delete dir="bin"/>
<delete dir="dist"/>
</target>
<target name="create">
<mkdir dir="bin"/>
<mkdir dir="${release}"/>
</target>
<target name="create-dist">
<mkdir dir="dist"/>
<mkdir dir="dist/${dist}"/>
</target>
<target name="create-dist-src" depends="create-dist">
<mkdir dir="dist/${dist}-src"/>
</target>
<target name="writeversion">
<echo file="${main}/version.txt" append="false" message="${ant.project.name}|${version}"/>
</target>
<target name="jar" depends="build">
<delete file="${release}/kmttg.jar"/>
<jar destfile="${release}/kmttg.jar">
<fileset dir="${main}/bin"/>
<fileset dir="${main}/images"/>
<zipgroupfileset dir="${lib}" includes="jmdns.jar"/>
<zipgroupfileset dir="${lib}" includes="tivo-libre.jar"/>
<zipgroupfileset dir="${lib}" includes="httpclient5-5.1.3.jar"/>
<zipgroupfileset dir="${lib}" includes="httpcore5-5.1.3.jar"/>
<zipgroupfileset dir="${lib}" includes="Java-WebSocket-1.5.5.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
</target>
<target name="build" depends="create">
<javac
includeantruntime="false"
debug="true"
debuglevel="${debuglevel}"
destdir="bin"
source="${source}"
target="${target}"
>
<!-- to better test java 8 compatability bootclasspath="C:\Program Files\Eclipse Adoptium\jdk-8.0.362.9-hotspot\jre\lib\rt.jar" -->
<src path="src"/>
<classpath refid="main.classpath"/>
<compilerarg value="-Xlint:deprecation" />
</javac>
</target>
<target name="load">
<property name="version" value="${bversion}"/>
<property name="dist" value="kmttg_${version}"/>
</target>
<target name="all" depends="load,clean,build,jar,dist-both"/>
<target name="release">
<property name="version" value="${rversion}"/>
<antcall target="all"/>
</target>
<target name="dist-src" depends="create-dist-src">
<copy todir="dist/${dist}-src">
<fileset dir=".">
<include name="src/**"/>
<include name="build.xml"/>
<include name="release/**"/>
</fileset>
</copy>
<chmod file="dist/${release}/kmttg" perm="ugo+x"/>
<chmod file="dist/${release}/kmttg.bat" perm="ugo+x"/>
<zip destfile="dist/${dist}-src.zip">
<zipfileset dir="dist/${dist}-src" prefix="${dist}" includes="**" excludes="release META-INF"/>
<zipfileset file="dist/${dist}-src/${release}/kmttg" filemode="755" prefix="${dist}"/>
<zipfileset file="dist/${dist}-src/${release}/kmttg.bat" filemode="755" prefix="${dist}"/>
</zip>
<delete dir="dist/${dist}-src"/>
</target>
<target name="dist-both" depends="create-dist">
<antcall target="build"/>
<copy todir="dist/${dist}/release">
<fileset dir="release"/>
</copy>
<chmod file="dist/${dist}/${release}/kmttg" perm="ugo+x"/>
<zip destfile="dist/${dist}.zip">
<zipfileset dir="dist/${dist}/${release}" filemode="755" includes="**" excludes="*.ini,auto.*,*.sp,*.csv"/>
</zip>
<delete dir="dist/${dist}"/>
</target>
</project>