-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
316 lines (276 loc) · 10.5 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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
<?xml version="1.0" encoding="UTF-8"?>
<project name="j-Algo" default="dist" basedir=".">
<tstamp>
<format property="VERSION_ID" pattern="yyyyMMdd" />
</tstamp>
<property name="classpath" value=" ../extlibs/jh.jar ../extlibs/swing-layout-1.0.jar ../runtime/modules/avl.jar ../runtime/modules/dijkstra.jar ../runtime/modules/ebnf.jar ../runtime/modules/heapsort.jar ../runtime/modules/hoare.jar ../runtime/modules/kmp.jar ../runtime/modules/pulsemem.jar ../runtime/modules/app.jar ../runtime/modules/am0c0.jar ../runtime/modules/unifikation.jar ../runtime/modules/lambda.jar ../runtime/modules/bfsdfs.jar ../runtime/modules/c0h0.jar ../runtime/modules/em.jar" />
<property name="module_classpath" value="../j-Algo.jar" />
<property name="dist" location="dist" />
<property name="bin" location="bin" />
<property name="res" location="res" />
<target name="clean">
<delete dir="${dist}" />
</target>
<target name="dist" depends="dist_base,linux,macosx,windows">
<delete dir="${dist}/tmp" />
</target>
<target name="init">
<mkdir dir="${dist}/tmp" />
</target>
<target name="dist_base" depends="main, parser">
<antcall target="module_jar">
<param name="modulename" value="avl" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="avl" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="dijkstra" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="dijkstra" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="ebnf" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="ebnf" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="heapsort" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="heapsort" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="hoare" />
<param name="classpath" value="${module_classpath} ../../extlibs/antlr-3.0b6.jar ../../extlibs/neu-ext-1.1.1.b.jar ../../extlibs/jep-2.4.1.b.jar ../../extlibs/parser.jar ../../extlibs/jgraph.jar" />
</antcall>
<copy todir="${dist}/hoare_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="antlr-3.0b6.jar" />
<include name="neu-ext-1.1.1.b.jar" />
<include name="jep-2.4.1.b.jar" />
<include name="jgraph.jar" />
</fileset>
<fileset dir="${dist}/tmp/extlibs/">
<include name="parser.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="hoare" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="lambda" />
<param name="classpath" value="${module_classpath} ../../extlibs/antlr-runtime-313-custom.jar" />
</antcall>
<copy todir="${dist}/lambda_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="antlr-runtime-313-custom.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="lambda" />
</antcall>
<!-- ### BEGIN BUILD am0c0 -->
<antcall target="module_jar">
<param name="modulename" value="am0c0" />
<param name="classpath" value="${module_classpath} ../../extlibs/beaver-rt.jar ../../extlibs/commons-lang-2.5.jar" />
</antcall>
<copy todir="${dist}/am0c0_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="beaver-rt.jar" />
<include name="commons-lang-2.5.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="am0c0" />
</antcall>
<!-- ### END BUILD -->
<!-- ### BEGIN BUILD unifikation -->
<antcall target="module_jar">
<param name="modulename" value="unifikation" />
<param name="classpath" value="${module_classpath} ../../extlibs/antlr-runtime-3.2.jar" />
</antcall>
<copy todir="${dist}/unifikation_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="antlr-runtime-3.2.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="unifikation" />
</antcall>
<!-- ### END BUILD -->
<!-- ### BEGIN BUILD bfsdfs -->
<antcall target="module_jar">
<param name="modulename" value="bfsdfs" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="bfsdfs" />
</antcall>
<!-- ### END BUILD -->
<!-- ### BEGIN BUILD c0h0 -->
<antcall target="module_jar">
<param name="modulename" value="c0h0" />
<param name="classpath" value="${module_classpath} ../../extlibs/beaver-rt.jar ../../extlibs/jgraphx.jar ../../extlibs/jsyntaxpane-0.9.5-b29.jar" />
</antcall>
<copy todir="${dist}/c0h0_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="beaver-rt.jar" />
<include name="jgraphx.jar" />
<include name="jsyntaxpane-0.9.5-b29.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="c0h0" />
</antcall>
<!-- ### END BUILD -->
<!-- ### BEGIN BUILD am1simulator -->
<antcall target="module_jar">
<param name="modulename" value="am1simulator" />
<param name="classpath" value="${module_classpath} ../../extlibs/beaver-rt.jar ../../extlibs/jsyntaxpane-0.9.5-b29.jar" />
</antcall>
<copy todir="${dist}/am1simulator_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="beaver-rt.jar" />
<include name="jsyntaxpane-0.9.5-b29.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="am1simulator" />
</antcall>
<!-- ### END BUILD -->
<!-- ### BEGIN BUILD em -->
<antcall target="module_jar">
<param name="modulename" value="em" />
<param name="classpath" value="${module_classpath} ../../extlibs/jmathplot.jar ../../extlibs/xstream-1.4.2.jar ../../extlibs/jmatharray.jar ../../extlibs/kxml2-2.3.0.jar" />
</antcall>
<copy todir="${dist}/em_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="jmathplot.jar" />
<include name="xstream-1.4.2.jar" />
<include name="jmatharray.jar" />
<include name="kxml2-2.3.0.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="em" />
</antcall>
<!-- ### END BUILD -->
<antcall target="module_jar">
<param name="modulename" value="kmp" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="kmp" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="pulsemem" />
<param name="classpath" value="${module_classpath} ../../extlibs/parser.jar ../../extlibs/antlr-3.0b6.jar" />
</antcall>
<copy todir="${dist}/pulsemem_${VERSION_ID}/extlibs">
<fileset dir="extlibs">
<include name="antlr-3.0b6.jar" />
</fileset>
<fileset dir="${dist}/tmp/extlibs/">
<include name="parser.jar" />
</fileset>
</copy>
<antcall target="module_pkg">
<param name="modulename" value="pulsemem" />
</antcall>
<antcall target="module_jar">
<param name="modulename" value="app" />
<param name="classpath" value="${module_classpath}" />
</antcall>
<antcall target="module_pkg">
<param name="modulename" value="app" />
</antcall>
<copy todir="${dist}/tmp">
<fileset dir="." includes="examples/**" excludes="**/SVN" />
</copy>
<copy todir="${dist}/tmp">
<fileset dir="." includes="extlibs/**" excludes="**/SVN" />
</copy>
</target>
<target name="linux">
<antcall target="platform_base">
<param name="platform" value="linux" />
</antcall>
<copy todir="${dist}/linux/j-Algo" file="j-Algo.sh" />
<copy todir="${dist}/linux/j-Algo" file="j-Algo.ico" />
<chmod file="${dist}/linux/j-Algo/j-Algo.sh" perm="+x" />
<tar tarfile="${dist}/j-Algo-linux-complete-${VERSION_ID}.tar" basedir="${dist}/linux/" />
<gzip zipfile="${dist}/j-Algo-linux-complete-${VERSION_ID}.tar.gz" src="${dist}/j-Algo-linux-complete-${VERSION_ID}.tar" />
<delete file="${dist}/j-Algo-linux-complete-${VERSION_ID}.tar" />
</target>
<target name="macosx">
<antcall target="platform_base">
<param name="platform" value="macosx" />
</antcall>
</target>
<target name="windows">
<antcall target="platform_base">
<param name="platform" value="windows" />
</antcall>
<copy todir="${dist}/windows/j-Algo/" file="j-Algo.bat" />
<copy todir="${dist}/windows/j-Algo/" file="j-Algo.ico" />
<zip destfile="${dist}/j-Algo-windows-complete-${VERSION_ID}.zip" basedir="${dist}/windows/" />
</target>
<target name="main" depends="init">
<mkdir dir="${dist}/tmp/runtime/" />
<jar destfile="${dist}/tmp/runtime/j-Algo.jar">
<fileset dir="${bin}" includes="org/jalgo/main/**">
</fileset>
<fileset dir="${res}/main">
</fileset>
<manifest>
<attribute name="Class-Path" value="${classpath}" />
<attribute name="Main-Class" value="org.jalgo.main.JAlgoMain" />
</manifest>
</jar>
</target>
<target name="module_jar" depends="init">
<mkdir dir="${dist}/tmp/runtime/modules" />
<jar destfile="${dist}/tmp/runtime/modules/${modulename}.jar">
<fileset dir="${bin}" includes="org/jalgo/module/${modulename}/**">
</fileset>
<fileset dir="${res}/module/${modulename}">
</fileset>
<manifest>
<attribute name="Class-Path" value="${classpath}" />
</manifest>
</jar>
</target>
<target name="module_pkg">
<copy todir="${dist}/${modulename}_${VERSION_ID}">
<fileset dir="." excludes="**/SVN">
<include name="examples/${modulename}/**" />
</fileset>
<fileset dir="${dist}/tmp/">
<include name="runtime/modules/${modulename}.jar" />
</fileset>
</copy>
<tar tarfile="${dist}/${modulename}_${VERSION_ID}.tar" basedir="${dist}/${modulename}_${VERSION_ID}" />
<gzip zipfile="${dist}/${modulename}_${VERSION_ID}.tar.gz" src="${dist}/${modulename}_${VERSION_ID}.tar" />
<delete file="${dist}/${modulename}_${VERSION_ID}.tar" />
<delete dir="${dist}/${modulename}_${VERSION_ID}" />
</target>
<target name="parser" depends="init">
<mkdir dir="${dist}/tmp/extlibs" />
<jar destfile="${dist}/tmp/extlibs/parser.jar">
<fileset dir="${bin}" includes="c00/**">
</fileset>
</jar>
</target>
<target name="platform_base">
<copy todir="${dist}/${platform}/j-Algo">
<fileset dir="${dist}/tmp" includes="**" />
</copy>
</target>
</project>