-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
486 lines (480 loc) · 8.08 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
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<?xml version="1.0" encoding="UTF-8"?>
<!-- This is an ant build file. See: "http://jakarta.apache.org/ant"-->
<project
default="compile"
name="MekWars"
>
<!-- Global properties for this build -->
<property
name="src"
value="src"
>
</property>
<property
name="build"
value="${basedir}/classes"
>
</property>
<property name="serverdist" value="${basedir}/server-dist"/>
<property
name="doc"
value="docs"
>
</property>
<property
name="timestampfile"
value="timestamp"
>
</property>
<property name="properties.dir" value="${basedir}/server-dist" />
<property
name="jarfile"
value="MekWarsServer.jar"
>
</property>
<property
name="dedfile"
value="MekWarsDed.jar"
>
</property>
<property
name="adminfile"
value="MekWarsAdmin.jar"
>
</property>
<property
name="trackerfile"
value="MekWarsTracker.jar"
>
</property>
<property
name="hpgnetfile"
value="HPGNet.jar"
/>
<property
name="PlanetDatConverterFile"
value="PlanetDatConverter.jar"
>
</property>
<property
name="opeditor"
value="MekWarsOpEditor.jar"
>
</property>
<property
name="autoupdater"
value="MekWarsAutoUpdate.jar"
>
</property>
<property
name="serverfile"
value="MekWarsServer.jar"
>
</property>
<property
name="clientfile"
value="MekWarsClient.jar"
>
</property>
<property
name="dedfile"
value="MekWarsDed.jar"
>
</property>
<property
name="jarmanifest"
value="manifest.txt"
>
</property>
<path
id="project.classpath"
>
<pathelement
path="${build}"
>
</pathelement>
<fileset
dir="${basedir}"
>
<include
name="MegaMek.jar"
>
</include>
<include
name="server-dist/*.jar"
>
</include>
<include
name="server-dist/lib/*.jar"
>
</include>
<include name="hpg-dist/lib/*.jar" />
<include
name="client-dist/*.jar"
>
</include>
<include
name="client-dist/lib/*.jar"
>
</include>
<include
name="lib/*.jar"
>
</include>
</fileset>
</path>
<target
description="Initialize system before build"
name="init"
>
<!-- Create the time stamp -->
<tstamp>
</tstamp>
<!-- Ensure that the build directory exists. -->
<mkdir
dir="${build}"
>
</mkdir>
<mkdir dir="${serverdist}"/>
</target>
<target
depends="init"
description="Compile java sources into class files"
name="compile"
>
<javac
encoding="UTF-8"
classpathref="project.classpath"
debug="true"
deprecation="true"
destdir="${build}"
srcdir="${src}"
target="1.8"
source="1.8"
includeantruntime="false"
>
</javac>
<touch
file="${timestampfile}"
>
</touch>
</target>
<target
depends="compile"
description="Create application jar file"
name="server-jar"
>
<delete
file="${serverfile}"
>
</delete>
<jar
basedir="${build}"
compress="true"
destfile="${serverfile}"
excludes="admin/**,dedicatedhost/**"
includes="common/**,server/**,client/**"
jarfile="${serverfile}"
manifest="ServerManifest.txt"
>
</jar>
</target>
<target
depends="compile"
description="Create tracker jar file"
name="tracker-jar"
>
<delete file="${trackerfile}" />
<delete file="${hpgnetfile}" />
<jar
basedir="${build}"
compress="true"
destfile="${trackerfile}"
excludes="server/**,admin/**,dedicatedhost/**,hpgnet/**"
includes="tracker/**"
jarfile="${trackerfile}"
manifest="TrackerManifest.txt"
>
</jar>
<jar
basedir="${build}"
compress="true"
destfile="${hpgnetfile}"
excludes="server/**,admin/**,dedicatedhost/**,tracker/**"
includes="hpgnet/**"
jarfile="${hpgnetfile}"
manifest="HPGNetManifest.txt"
/>
</target>
<target
depends="compile"
description="Create PlanetDatConverter jar file"
name="PlanetDatConverter-jar"
>
<delete
file="${PlanetDatConverterFile}"
>
</delete>
<jar
basedir="${build}"
compress="true"
destfile="${PlanetDatConverterFile}"
includes="common/**,server/**"
jarfile="${PlanetDatConverterFile}"
manifest="PlanetDatConverterManifest.txt"
>
</jar>
</target>
<target
depends="compile"
description="Create opEditor jar file"
name="opEditor-jar"
>
<delete
file="${opeditor}"
>
</delete>
<jar
basedir="${build}"
compress="true"
destfile="${opeditor}"
excludes="server/**,admin/**,dedicatedhost/**,hpgnet/**"
includes="OperationsEditor/**,common/campaign/operations/**,common/util/SpringLayoutHelper*,common/flags/**,common/CampaignData*,common/TerrainProvider*,common/util/MWLogger*,common/VerticalLayout*"
jarfile="${opeditor}"
manifest="OpEditorManifest.txt"
>
</jar>
</target>
<target
depends="compile"
description="Create AutoUpdate jar file"
name="MekWarsAutoUpdate-jar"
>
<delete
file="${autoupdater}"
>
</delete>
<jar
basedir="${build}"
compress="true"
destfile="${autoupdater}"
excludes="server/**,admin/**,dedicatedhost/**"
includes="updaters/**"
jarfile="${autoupdater}"
manifest="MekWarsAutoUpdateManifest.txt"
>
</jar>
</target>
<target
name="doc"
>
<mkdir
dir="${doc}"
>
</mkdir>
<javadoc
classpath="${basedir}"
destdir="${doc}"
package="yes"
packagenames="megamek.*"
sourcepath="${src}"
windowtitle="MegaMek API"
>
</javadoc>
</target>
<target
description="Remove all compiled and generated files"
name="clean"
>
<!-- Delete the ${build} directory tree -->
<delete
dir="${build}"
>
</delete>
<delete
dir="${doc}"
>
</delete>
<delete
file="${timestampfile}"
>
</delete>
<delete
dir="dist"
>
</delete>
<delete
file="${jarfile}"
>
</delete>
<delete
file="MekWarsClient.jar"
>
</delete>
<delete
file="MekWarsAdmin.jar"
>
</delete>
<delete
file="MekWarsTracker.jar"
>
</delete>
<delete file="HPGNet.jar" />
<delete
file="MekWarsOpEditor.jar"
>
</delete>
<delete
file="MekWarsAutoUpdate.jar"
>
</delete>
<delete
file="MekWarsDed.jar"
>
</delete>
</target>
<target
depends="compile"
description="Create application jar file"
name="client-jar"
>
<delete
file="${clientfile}"
>
</delete>
<delete
file="${adminfile}"
>
</delete>
<delete
file="${dedfile}"
>
</delete>
<jar
basedir="${build}"
compress="true"
destfile="${clientfile}"
excludes="server/**,admin/**,dedicatedhost/**"
includes="client/**,com/**,common/**"
jarfile="${clientfile}"
manifest="ClientManifest.txt"
>
</jar>
<jar
basedir="${build}"
compress="true"
destfile="${adminfile}"
excludes="server/**,client/**,dedicatedhost/**"
includes="admin/**,com/**,common/**"
jarfile="${adminfile}"
manifest="AdminManifest.txt"
>
</jar>
<jar
basedir="${build}"
compress="true"
destfile="${dedfile}"
excludes="server/**,client/**,admin/**"
includes="dedicatedhost/**,common/**"
jarfile="${dedfile}"
manifest="DedHostManifest.txt"
>
</jar>
</target>
<target
depends="dist-client"
name="run-client"
>
<java
dir="${basedir}\dist\client"
fork="true"
jar="MekWarsClient.jar"
>
</java>
</target>
<target
name="run-server"
>
<java
dir="${basedir}\dist\server"
fork="true"
jar="MekWarsServer.jar"
>
</java>
</target>
<target
depends="client-jar"
name="dist-client"
>
<mkdir
dir="dist"
>
</mkdir>
<mkdir
dir="dist/client"
>
</mkdir>
<mkdir
dir="dist/client/logs"
>
</mkdir>
<mkdir
dir="dist/server/logs"
>
</mkdir>
<copy
todir="dist\client"
file="MegaMek.jar"
>
</copy>
<copy
todir="dist\client"
>
<fileset
dir="client-dist"
>
</fileset>
</copy>
<copy
file="MekWarsClient.jar"
todir="dist\client"
>
</copy>
<copy
file="MekWarsDed.jar"
todir="dist\client"
>
</copy>
</target>
<target
depends="server-jar"
name="dist-server"
>
<mkdir
dir="dist"
>
</mkdir>
<mkdir
dir="dist/server"
>
</mkdir>
<copy
file="MegaMek.jar"
todir="dist\server"
>
</copy>
<copy
file="MekWarsServer.jar"
todir="dist\server"
>
</copy>
<copy
todir="dist\server"
>
<fileset
dir="server-dist"
>
</fileset>
</copy>
</target>
</project>