-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
100 lines (87 loc) · 3.54 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
<?xml version="1.0" encoding="utf-8"?>
<project name="TIImageTool" default="dist" basedir=".">
<!-- set global properties for this build -->
<property name="src" value="src"/>
<property name="build" value="build"/>
<property name="dist" value="dist"/>
<property name="ext" value="ext"/>
<property name="util" value="util"/>
<property name="serial" value="RXTXcomm.jar"/>
<!-- property name="build.compiler" value="classic"/ -->
<target name="init">
<!-- Create the time stamp -->
<tstamp/>
<!-- Create the build directory structure used by compile -->
<mkdir dir="${build}"/>
</target>
<target name="tiimagetool" depends="init">
<!-- Check for the serial package -->
<available file="${ext}/${serial}" property="rxtx.available"/>
<fail message="${serial} not found in folder ${ext}" unless="rxtx.available"/>
<echo>
**** Building TIImageTool ****
</echo>
<!-- Compile the java code from ${src} into ${build} -->
<javac srcdir="${src}" destdir="${build}" debug="on" includeAntRuntime="false"
classpath="${ext}/${serial}"
encoding="utf-8"
source="1.8"
target="1.8"
includes="de/mizapf/timt/**/*.java" >
<compilerarg value="-Xlint:unchecked" />
<compilerarg value="-Xlint:deprecation" />
<!-- javac>
<compilerarg value="-Xmaxerrs"/>
<compilerarg value="10"/> -->
</javac>
<copy todir="${build}/de/mizapf/timt/ui">
<fileset dir="${src}/de/mizapf/timt/ui">
<include name="*.png"/>
<include name="*.jpg"/>
<include name="*.txt"/>
<include name="*.html"/>
<include name="*.prop"/>
<include name="*.properties"/>
</fileset>
</copy>
<copy todir="${build}/de/mizapf/timt/util">
<fileset dir="${src}/de/mizapf/timt/util">
<include name="*.tfi"/>
<include name="autoexec.txt"/>
</fileset>
</copy>
</target>
<target name="dist" depends="distri"/>
<target name="distri" depends="tiimagetool">
<!-- Create the distribution directory -->
<mkdir dir="${dist}/lib"/>
<delete file="${dist}/lib/tiimagetool.jar"/>
<jar jarfile="${dist}/lib/tiimagetool.jar" basedir="${build}"
includes="de/mizapf/timt/**/*.class de/mizapf/timt/ui/*.png de/mizapf/timt/ui/*.html de/mizapf/timt/ui/*.txt de/mizapf/timt/ui/*.jpg de/mizapf/timt/util/*.tfi de/mizapf/timt/util/autoexec.txt de/mizapf/timt/ui/names*.prop de/mizapf/timt/ui/Strings*.properties">
<manifest>
<attribute name="Main-Class" value="de.mizapf.timt.TIImageTool" />
</manifest>
</jar>
</target>
<target name="srczip">
<delete file="${src}/src.zip"/>
<zip destfile="${src}/src.zip" basedir="${src}"
includes="build.xml de/mizapf/timt/**/*.java de/mizapf/timt/**/*.txt de/mizapf/timt/**/*.jpg de/mizapf/timt/**/*.prop de/mizapf/timt/**/*.html de/mizapf/timt/**/*.tfi de/mizapf/timt/ui/Strings*.properties" />
</target>
<target name="ship" depends="srczip, dist">
<delete file="${src}/tiimagetool.zip"/>
<copy file="LICENSE" todir="${dist}"/>
<copy file="README" todir="${dist}"/>
<copy file="whatsnew.txt" todir="${dist}"/>
<copy file="prgicon.png" todir="${dist}"/>
<copy file="${src}/src.zip" todir="${dist}"/>
<copy file="${dist}/lib/tiimagetool.jar" todir="${dist}"/>
<zip destfile="${dist}/tiimagetool.zip" basedir="${dist}"
includes="src.zip tiimagetool.jar LICENSE README whatsnew.txt prgicon.png" />
</target>
<target name="clean">
<!-- Delete the ${build} and ${dist} directory trees -->
<delete dir="${build}"/>
<delete dir="${dist}"/>
</target>
</project>