-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.xml
249 lines (221 loc) · 8.46 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
<?xml version="1.0"?>
<project name="spacesettlers" basedir=".">
<description>
Ant build file for compiling and running Space Settlers
</description>
<!-- src: root directory for the main codebase. -->
<property name="src" value="src" />
<!-- build: staging directory for any files generated by the build. -->
<property name="build" value="build" />
<!-- lib: directory for third party jars shipped with the project. -->
<property name="lib" value="lib" />
<!-- dist: target directory for generated distributables. -->
<property name="dist" value="dist" />
<!-- docs: directory containing the project's javadocs -->
<property name="docs" value="docs/api" />
<!-- clean: blow away any and all generated files. -->
<target name="clean">
<delete dir="${build}" />
<delete dir="${dist}" />
<delete dir="${docs}" />
</target>
<!-- init: the first step of any build. -->
<target name="init">
<tstamp />
<mkdir dir="${build}" />
<mkdir dir="${dist}" />
<mkdir dir="${docs}" />
</target>
<!-- Make 3rd-party libs accessible to tasks. -->
<path id="lib.classpath">
<fileset dir="${lib}" includes="*.jar" />
</path>
<!-- Make the jars -->
<target name="compile-all" depends="init">
<javac debug="on" srcdir="${src}"
destdir="${build}"
includes="**"
source="1.10">
<classpath refid="lib.classpath" />
</javac>
</target>
<!-- Jar all the jars into one (because ant won't do it otherwise). This comes from a hint here
http://stackoverflow.com/questions/515428/clean-way-to-combine-multiple-jars-preferably-using-ant
-->
<target name="jar-spacesettlers" depends="compile-all">
<unzip dest="${build}">
<fileset dir="${lib}">
<include name="**/*.jar" />
</fileset>
</unzip>
<jar destfile="${dist}/spacesettlers.jar"
basedir="${build}" >
</jar>
</target>
<!-- Projects:
The following is a list of all the ways to run spacewar
-->
<target name="spacesettlers-human" depends="jar-spacesettlers">
<java classname="spacesettlers.simulator.RunSimulator"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics true "/>
<arg line="--configPath ../config/human/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="testLadder" depends="jar-spacesettlers">
<java classname="spacesettlers.ladder.RunLadder"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics false "/>
<arg line="--configPath ../config/ladder/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<arg line="--ladderConfigFile SelfLadderConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="coopLadder" depends="jar-spacesettlers">
<java classname="spacesettlers.ladder.RunLadder"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx32G" />
<arg line="--graphics false "/>
<arg line="--configPath ../config/heuristicCooperative/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<arg line="--ladderConfigFile LadderConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="competeLadder" depends="jar-spacesettlers">
<java classname="spacesettlers.ladder.RunLadder"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx32G" />
<arg line="--graphics false "/>
<arg line="--configPath ../config/heuristicCompetitive/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<arg line="--ladderConfigFile LadderConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="spacesettlers-coop" depends="jar-spacesettlers">
<java classname="spacesettlers.simulator.RunSimulator"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics true "/>
<arg line="--configPath ../config/heuristicCooperative/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="spacesettlers-compete" depends="jar-spacesettlers">
<java classname="spacesettlers.simulator.RunSimulator"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics true "/>
<arg line="--configPath ../config/heuristicCompetitive/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="spacesettlers-ctf-compete" depends="jar-spacesettlers">
<java classname="spacesettlers.simulator.RunSimulator"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics true "/>
<arg line="--configPath ../config/captureTheFlagCompetitive/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="spacesettlers-ctf-coop" depends="jar-spacesettlers">
<java classname="spacesettlers.simulator.RunSimulator"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics true "/>
<arg line="--configPath ../config/captureTheFlagCooperative/"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="ctfLadderCompete" depends="jar-spacesettlers">
<java classname="spacesettlers.ladder.RunLadder"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics false "/>
<arg line="--configPath ../config/captureTheFlagCompetitive/"/>
<arg line="--ladderConfigFile LadderConfig.xml"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="ctfLadderCoop" depends="jar-spacesettlers">
<java classname="spacesettlers.ladder.RunLadder"
fork="true"
dir="src"
classpath="${dist}/spacesettlers.jar">
<jvmarg value="-Xmx10G" />
<arg line="--graphics false "/>
<arg line="--configPath ../config/captureTheFlagCooperative/"/>
<arg line="--ladderConfigFile LadderConfig.xml"/>
<arg line="--simulatorConfigFile SpaceSettlersConfig.xml"/>
<classpath>
<pathelement location="${dist}/spacesettlers.jar"/>
</classpath>
</java>
</target>
<target name="doc" depends="init">
<javadoc destdir="docs/api"
author="true"
version="true"
use="true"
windowtitle="SpaceSettlers API"
overview="src/spacesettlers/overview.html">
<packageset dir="src" defaultexcludes="yes">
<include name="spacesettlers/*" />
</packageset>
<doctitle>
<![CDATA[<h1>Spacewar2 API</h1>]]>
</doctitle>
<bottom>
<![CDATA[<i>Copyright © 2015 University of Oklahoma. All Rights Reserved.</i>]]>
</bottom>
</javadoc>
</target>
</project>