forked from andrew-jacobs/dev65
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
190 lines (164 loc) · 7.03 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- This DOCTYPE tag shuts off the warning from Eclipse that there is no DTD
associated with this XML file. -->
<!DOCTYPE project>
<project basedir="." default="installer" name="dev65">
<property environment="env" />
<property name="debuglevel" value="source,lines,vars" />
<property name="dir.buildfile" value="." />
<property name="dir.jarfile" value="${dir.buildfile}" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="app.jar" value="${build.dir}/${ant.project.name}-1.6.jar" />
<property name="app.jar.1.4" value="${build.dir}/${ant.project.name}.jar" />
<property name="app.jar.1.3" value="${build.dir}/${ant.project.name}-1.3.jar" />
<property name="izpack.dist" value="${user.home}/IzPack" />
<property name="app.installer.setup.dir" value="${build.dir}/${ant.project.name}-setup" />
<property name="app.installer" value="${build.dir}/${ant.project.name}-setup-1.5.jar" />
<property name="app.installer.1.4" value="${build.dir}/${ant.project.name}-setup-for-java-1.5-and-up.jar" />
<property name="java.1.3.dir" value="N/A" />
<property name="java.1.4.dir" value="${user.home}/Dropbox/opt/j2sdk1.4.2/j2sdk1.4.2_19" />
<property name="java.1.5.dir" value="${user.home}/Dropbox/opt/jdk1.5.0/jdk1.5.0_22" />
<property name="javac-1.4" value="${java.1.4.dir}/bin/javac" />
<property name="javac-1.5" value="${java.1.5.dir}/bin/javac" />
<property name="retro.tx.ver" value="1.2.9" />
<property name="retro.tx.dir" value="lib/Retrotranslator-${retro.tx.ver}-bin" />
<path id="lib.path">
<!-- <fileset dir="${izpack.dist}" includes="**/*.jar" /> -->
<fileset dir="lib">
<include name="izpack-standalone-compiler-4.3.5.jar"/>
</fileset>
</path>
<taskdef name="izpack" classname="com.izforge.izpack.ant.IzPackTask" classpathref="lib.path" />
<taskdef name="retrotranslator" classname="net.sf.retrotranslator.transformer.RetrotranslatorTask">
<classpath>
<fileset dir="${retro.tx.dir}">
<include name="retrotranslator-transformer-${retro.tx.ver}.jar" />
<include name="retrotranslator-runtime-${retro.tx.ver}.jar" />
<include name="backport-util-concurrent-3.1.jar" />
</fileset>
</classpath>
</taskdef>
<path id="dev65.classpath">
<pathelement location="${classes.dir}" />
<pathelement location="lib/javadocking.jar" />
<pathelement location="lib/rsyntaxtextarea-2.6.1.jar" />
<pathelement location="lib/jSerialComm-2.6.2.jar" />
</path>
<path id="run.as65.classpath">
<path refid="dev65.classpath" />
<pathelement location="lib/javadocking.jar" />
<pathelement location="lib/rsyntaxtextarea-2.6.1.jar" />
<pathelement location="lib/jSerialComm-2.6.2.jar" />
</path>
<target name="init">
<mkdir dir="${classes.dir}" />
<copy includeemptydirs="false" todir="${classes.dir}">
<fileset dir="src">
<exclude name="**/*.java" />
</fileset>
</copy>
<copy includeemptydirs="false" todir="${classes.dir}">
<fileset dir="src-65016">
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target depends="clean" name="cleanall" />
<target depends="build-subprojects,build-project" name="build" />
<target name="build-subprojects" />
<target depends="init" name="build-project">
<echo message="${ant.project.name}: ${ant.file}" />
<javac debug="true" debuglevel="${debuglevel}" destdir="${classes.dir}" includeantruntime="false" source="1.6" target="1.6">
<src path="src" />
<src path="src-65016" />
<classpath refid="dev65.classpath" />
</javac>
</target>
<target name="jar" depends="build">
<jar destfile="${app.jar}">
<manifest>
<attribute name="Main-Class" value="uk.co.demon.obelisk.w65xx.Dev65" />
<attribute name="Class-Path" value="./ javadocking.jar rsyntaxtextarea-2.6.1.jar jSerialComm-2.6.2.jar" />
</manifest>
<fileset dir="${classes.dir}" />
<zipfileset src="lib/rsyntaxtextarea-2.6.1.jar" />
<zipfileset src="lib/jSerialComm-2.6.2.jar" />
<zipfileset src="lib/javadocking.jar" />
</jar>
</target>
<target name="backport" depends="jar">
<retrotranslator target="1.4" destjar="${app.jar.1.4}" smart="true"
verify="true" failonwarning="false"
embed="com.alteredmechanism.retrotranslator.backport">
<!-- <fileset dir="${classes.dir}" includes="**/*.class" /> -->
<jarfileset file="${app.jar}" />
<classpath>
<fileset dir="${java.1.4.dir}/jre/lib" includes="**/*.jar" />
<fileset dir="${retro.tx.dir}">
<include name="retrotranslator-runtime-${retro.tx.ver}.jar" />
<include name="backport-util-concurrent-3.1.jar" />
</fileset>
<fileset file="${app.jar}" />
</classpath>
</retrotranslator>
</target>
<!-- Will not work until a 1.3 JDK is defined. -->
<target name="backport-to-1.3" depends="jar">
<retrotranslator target="1.3" destjar="${app.jar.1.3}" smart="true" verify="true" failonwarning="false">
<fileset dir="build/classes" includes="**/*.class" />
<jarfileset dir="build/lib" includes="**/*.jar" />
<classpath>
<fileset dir="${java.1.3.dir}/jre/lib" includes="**/*.jar" />
<fileset dir="${retro.tx.dir}">
<include name="retrotranslator-runtime13-${retro.tx.ver}.jar" />
<include name="backport-util-concurrent-java12-3.1.jar" />
</fileset>
<fileset dir="lib" includes="**/*.jar" />
</classpath>
</retrotranslator>
</target>
<target name="installer-setup" depends="backport">
<mkdir dir="${app.installer.setup.dir}" />
<copy includeemptydirs="false" todir="${app.installer.setup.dir}/bin" verbose="true">
<fileset dir="scripts">
<include name="*" />
</fileset>
</copy>
<mkdir dir="${app.installer.setup.dir}/lib" />
<copy includeemptydirs="false" todir="${app.installer.setup.dir}/lib" verbose="true">
<fileset dir="${build.dir}">
<include name="dev65.jar" />
</fileset>
</copy>
</target>
<target name="installer" depends="installer-setup">
<izpack input="build-installer.xml" output="${app.installer}" installerType="standard" basedir="${basedir}" izPackDir="${izpack.dist}" />
</target>
<target name="dist-zip" depends="installer">
<zip destfile="build/dev65-setup.zip">
<zipfileset dir="scripts" includes="dev65-setup.*" />
<zipfileset dir="build" includes="dev65-setup.jar" />
</zip>
</target>
<!-- Trying to get back to 1.4 but it only backports back to 1.5 because the
installer uses classes not present in 1.4. -->
<target name="backport-installer" depends="installer">
<retrotranslator target="1.4" destjar="${app.installer.1.4}"
smart="true" verify="true" failonwarning="false"
embed="com.alteredmechanism.retrotranslator.backport">
<jarfileset file="${app.installer}" />
<classpath>
<fileset dir="${java.1.4.dir}/jre/lib" includes="**/*.jar" />
<fileset dir="${retro.tx.dir}">
<include name="retrotranslator-runtime-${retro.tx.ver}.jar" />
<include name="backport-util-concurrent-3.1.jar" />
</fileset>
<fileset file="${app.installer}" />
</classpath>
</retrotranslator>
</target>
</project>