-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.xml
290 lines (269 loc) · 12.1 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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
<!-- Buildfile -->
<project name="jake2" default="usage" basedir=".">
<property environment="env" />
<taskdef name="izpack" classpath="lib/izpack/standalone-compiler.jar"
classname="com.izforge.izpack.ant.IzPackTask"/>
<!-- properties -->
<property name="version" value="cvs"/>
<property name="src" location="src"/>
<property name="test" location="test"/>
<property name="build" location="build"/>
<property name="dist" location="dist"/>
<!-- default values -->
<property name="javacdebug" value="true" />
<property name="javacdebuglevel" value="source,lines" />
<condition property="target.rt.jar" value="${env.PLUGIN_JAR}">
<not>
<equals arg1="${env.PLUGIN_JAR}" arg2="$${env.PLUGIN_JAR}" casesensitive="true" />
</not>
</condition>
<condition property="target.rt.jar" value="${env.TARGET_RT_JAR}">
<not>
<equals arg1="${env.TARGET_RT_JAR}" arg2="$${env.TARGET_RT_JAR}" casesensitive="true" />
</not>
</condition>
<condition property="plugin.jar"
value="${java.home}/lib/plugin.jar">
<available file="${java.home}/lib/plugin.jar"/>
</condition>
<condition property="plugin.jar"
value="/usr/share/icedtea-web/plugin.jar">
<available file="/usr/share/icedtea-web/plugin.jar"/>
</condition>
<!-- Default value for std Java (incl. Java7 on OS X) -->
<condition property="target.rt.jar"
value="${java.home}/lib/rt.jar">
<available file="${java.home}/lib/rt.jar"/>
</condition>
<!-- Default value for std Java (incl. Java7 on OS X) -->
<condition property="target.rt.jar"
value="${java.home}/lib/rt.jar">
<available file="${java.home}/lib/rt.jar"/>
</condition>
<!-- Default fallback value for Java6 OS X -->
<condition property="target.rt.jar"
value="${java.home}/../Classes/classes.jar">
<available file="${java.home}/../Classes/classes.jar"/>
</condition>
<!-- different classpaths -->
<path id="build.class.path">
<pathelement location="lib/jogamp/gluegen-rt.jar"/>
<pathelement location="lib/jogamp/jogl-all.jar"/>
<pathelement location="lib/jogamp/joal.jar"/>
<pathelement location="${plugin.jar}"/>
</path>
<!-- usage -->
<target name="usage">
<echo message="command line arguments for build.sh or build.bat"/>
<echo message=""/>
<echo message="installer build installer"/>
<echo message="bindist build .tar.gz and .zip binary distribution"/>
<echo message="srcdist build only source distribution"/>
<echo message="all build everything"/>
<echo message="clean delete classfiles keep distribution files"/>
<echo message="distclean delete all generated files"/>
<echo message="jar build only dist/lib/jake2.jar"/>
<echo message=""/>
</target>
<!-- initialize directories -->
<target name="init">
<mkdir dir="${build}"/>
<mkdir dir="${dist}/lib"/>
<get dest="lib/jogamp" verbose="true" skipexisting="true">
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-android-armv6.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-armv6.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-armv6hf.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-linux-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-macosx-universal.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-solaris-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-solaris-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-windows-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt-natives-windows-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/gluegen-rt.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-linux-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-linux-armv6.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-linux-armv6hf.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-linux-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-macosx-universal.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-solaris-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-solaris-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-windows-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal-natives-windows-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/joal.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-armv6.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-armv6hf.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-linux-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-macosx-universal.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-solaris-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-solaris-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-windows-amd64.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all-natives-windows-i586.jar"/>
<url url="http://jogamp.org/deployment/jogamp-current/jar/jogl-all.jar"/>
</get>
</target>
<!-- compile -->
<target name="compile" depends="init">
<javac destdir="${build}"
source="1.6" target="1.6" bootclasspath="${target.rt.jar}"
debug="${javacdebug}" debuglevel="${javacdebuglevel}">
<src path="${src}"/>
<include name="jake2/**"/>
<classpath refid="build.class.path"/>
<compilerarg value="-Xlint"/>
</javac>
</target>
<!-- copy resources -->
<target name="copyres" depends="init">
<copy todir="${build}">
<fileset dir="resources">
<include name="**/*"/>
</fileset>
</copy>
</target>
<!-- copy files -->
<target name="copy">
<copy todir="${dist}/lib/jogamp">
<fileset dir="lib/jogamp">
<include name="*.jar"/>
</fileset>
</copy>
<copy todir="${dist}">
<fileset dir="scripts">
<include name="Jake2*"/>
</fileset>
<fileset dir=".">
<include name="ChangeLog"/>
<include name="LICENSE"/>
<include name="README"/>
<include name="readme.id"/>
</fileset>
</copy>
<chmod perm="755">
<fileset dir="${dist}">
<include name="*.sh"/>
</fileset>
</chmod>
<fixcrlf srcdir="${dist}"
eol="crlf"
includes="*.bat"
/>
<fixcrlf srcdir="${dist}"
eol="lf"
includes="*.sh"
/>
</target>
<!-- jar -->
<target name="jar" depends="compile,copyres">
<jar destfile="${dist}/lib/jake2.jar" basedir="${build}">
<include name="jake2/**"/>
<include name="*.png"/>
<include name="mirrors"/>
</jar>
</target>
<!-- everything -->
<target name="all" depends="installer,bindist,srcdist">
</target>
<!-- dist -->
<target name="dist" depends="jar,copy">
</target>
<!-- binary distribution -->
<target name="bindist" depends="dist">
<tar destfile="jake2-${version}.tar.gz" compression="gzip">
<tarfileset dir="${dist}" prefix="Jake2" mode="755">
<include name="*.sh"/>
</tarfileset>
<tarfileset dir="${dist}" prefix="Jake2">
<include name="**"/>
<exclude name="*.sh"/>
</tarfileset>
</tar>
<zip destfile="jake2-${version}.zip">
<zipfileset dir="${dist}" prefix="Jake2">
<include name="**"/>
</zipfileset>
</zip>
</target>
<!-- source distribution -->
<target name="srcdist">
<tar destfile="jake2src-${version}.tar.gz" compression="gzip">
<tarfileset dir="." prefix="Jake2" mode="755">
<include name="scripts/*.*"/>
<include name="build.sh"/>
</tarfileset>
<tarfileset dir="." prefix="Jake2">
<include name="src/jake2/**"/>
<include name="resources/**"/>
<include name="lib/**"/>
<include name="build.xml"/>
<include name="build.bat"/>
<include name="ChangeLog"/>
<include name="LICENSE"/>
<include name="README*"/>
<include name="install.xml"/>
<include name="readme.id"/>
<include name="Jake2_Eclipse_Setup.txt"/>
</tarfileset>
</tar>
<zip destfile="jake2src-${version}.zip">
<zipfileset dir="." prefix="Jake2">
<include name="src/jake2/**"/>
<include name="resources/**"/>
<include name="scripts/*.*"/>
<include name="lib/**"/>
<include name="build.xml"/>
<include name="build.sh"/>
<include name="build.bat"/>
<include name="ChangeLog"/>
<include name="LICENSE"/>
<include name="README*"/>
<include name="install.xml"/>
<include name="readme.id"/>
<include name="Jake2_Eclipse_Setup.txt"/>
</zipfileset>
</zip>
</target>
<!-- standalone installer -->
<target name="installer" depends="dist">
<izpack input="${basedir}/install.xml"
output="${basedir}/Jake2-${version}-install.jar"
installerType="standard"
basedir="${dist}"
izPackDir="${basedir}/lib/izpack"/>
</target>
<!-- webstart -->
<target name="webstart" depends="dist">
<mkdir dir="webstart/lib"/>
<copy todir="webstart/lib">
<fileset dir="${dist}/lib">
<include name="**/*.jar"/>
<exclude name="joal*.jar"/>
<exclude name="gluegen-rt*.jar"/>
<exclude name="jogl-all*.jar"/>
</fileset>
</copy>
<signjar keystore="${user.home}/bytonic" alias="bytonic" storepass="${bytonic.pass}">
<fileset dir="webstart/lib">
<include name="**/*.jar"/>
</fileset>
</signjar>
</target>
<!-- clean -->
<target name="clean">
<delete dir="${build}"/>
</target>
<!-- distclean -->
<target name="distclean" depends="clean">
<delete dir="${dist}"/>
<delete dir="webstart/lib"/>
<delete>
<fileset dir=".">
<include name="*.tar.gz"/>
<include name="*.zip"/>
<include name="*.map"/>
<include name="*.jar"/>
</fileset>
</delete>
</target>
</project>