forked from libgdx/libgdx
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
382 lines (351 loc) · 16.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
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
<project name="gdx" default="all" basedir=".">
<description>libgdx distribution build file</description>
<property environment="env" />
<!-- ndk directory -->
<property name="env.NDK_HOME" value="/home/mzechner/android-ndk-r5"/>
<!-- library version -->
<property name="version" value="0.9.9-SNAPSHOT"/>
<!-- define distribution/output directory -->
<property name="distDir" value="${basedir}/dist"/>
<!-- should we build natives? -->
<property name="build-natives" value="false"/>
<!-- clean distribution/output directory -->
<target name="clean">
<delete dir="${distDir}"/>
</target>
<!-- build the core of the library plus all backends -->
<!-- gdx jnigen -->
<target name="gdx-jnigen">
<ant antfile="../../build-template.xml" dir="extensions/gdx-jnigen">
<property name="distDir" value="${distDir}/extensions/gdx-jnigen"/>
<property name="jar" value="gdx-jnigen"/>
<!-- we shouldn't build any natives -->
<property name="build-natives" value="false"/>
</ant>
</target>
<!-- gdx setup ui, custom target -->
<target name="gdx-setup-ui">
<ant antfile="build.xml" dir="extensions/gdx-setup-ui/"/>
<copy tofile="${distDir}/gdx-setup-ui.jar" file="extensions/gdx-setup-ui/gdx-setup-ui.jar"/>
</target>
<!-- gdx core -->
<target name="gdx-core" depends="gdx-jnigen">
<path id="classpath">
<pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
</path>
<fileset id="resourcefiles" dir="gdx/src">
<include name="com/badlogic/gdx/graphics/g3d/shaders/default.fragment.glsl"/>
<include name="com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl"/>
<include name="com/badlogic/gdx/utils/arial-15.png"/>
<include name="com/badlogic/gdx/utils/arial-15.fnt"/>
</fileset>
<ant antfile="../build-template.xml" dir="gdx">
<property name="jar" value="gdx"/>
<reference refid="classpath"/>
<reference refid="resourcefiles"/>
</ant>
</target>
<!-- gdx openal, for all desktop backends -->
<target name="gdx-openal" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-openal">
<property name="jar" value="gdx-openal"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx lwjgl backend -->
<target name="gdx-backend-lwjgl" depends="gdx-core,gdx-openal">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-openal.jar"/>
</path>
<zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-lwjgl">
<property name="jar" value="gdx-backend-lwjgl"/>
<reference refid="classpath"/>
<reference refid="jarfiles"/>
</ant>
</target>
<!-- gdx jglfw backend -->
<target name="gdx-backend-jglfw" depends="gdx-core">
<mkdir dir="backends/gdx-backend-jglfw/libs"/>
<get src="http://libgdx.badlogicgames.com/jglfw/nightlies/dist/jglfw.jar" dest="backends/gdx-backend-jglfw/libs/jglfw.jar"/>
<get src="http://libgdx.badlogicgames.com/jglfw/nightlies/dist/jglfw-natives.jar" dest="backends/gdx-backend-jglfw/libs/gdx-backend-jglfw-natives.jar"/>
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-jglfw">
<property name="jar" value="gdx-backend-jglfw"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx android backend -->
<target name="gdx-backend-android" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-android">
<property name="jar" value="gdx-backend-android"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx gwt backend -->
<target name="gdx-backend-gwt" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-backends-gwt">
<property name="jar" value="gdx-backend-gwt"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx ios-monotouch backend -->
<target name="gdx-backend-iosmonotouch" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/monotouch-5.4.0.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/mscorlib-4.0.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/opentk-5.4.0.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-2.1.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-core-2.1.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-data-2.1.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/objectal/libObjectAL.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="backends/gdx-backend-iosmonotouch">
<property name="jar" value="gdx-backend-iosmonotouch"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- build the extensions -->
<!-- gdx tools -->
<target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-lwjgl">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
</path>
<fileset id="resourcefiles" dir="extensions/gdx-tools/assets"/>
<ant antfile="../../build-template.xml" dir="extensions/gdx-tools">
<property name="distDir" value="${distDir}/extensions/gdx-tools"/>
<property name="jar" value="gdx-tools"/>
<reference refid="classpath"/>
<reference refid="resourcefiles"/>
</ant>
</target>
<!-- gdx tiled preprocessor -->
<target name="gdx-tiled-preprocessor" depends="gdx-core,gdx-backend-lwjgl,gdx-tools">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
<pathelement location="${distDir}/extensions/gdx-tools/gdx-tools.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-tiled-preprocessor">
<property name="distDir" value="${distDir}/extensions/gdx-tiled-preprocessor"/>
<property name="jar" value="gdx-tiled-preprocessor"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx controllers -->
<target name="gdx-controllers" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
</path>
<ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers">
<property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
<property name="jar" value="gdx-controllers"/>
<reference refid="classpath"/>
</ant>
</target>
<target name="gdx-controllers-desktop" depends="gdx-core,gdx-jnigen,gdx-controllers">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
<pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
</path>
<ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-desktop">
<property name="distDir" value="${distDir}/extensions/gdx-controllers/"/>
<property name="jar" value="gdx-controllers-desktop"/>
<reference refid="classpath"/>
</ant>
</target>
<target name="gdx-controllers-android" depends="gdx-core,gdx-backend-android,gdx-controllers">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-backend-android.jar"/>
<pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
<pathelement location="${basedir}/backends/gdx-backend-android/libs/android-4.2.jar"/>
</path>
<ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-android">
<property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
<property name="jar" value="gdx-controllers-android"/>
<reference refid="classpath"/>
</ant>
</target>
<target name="gdx-controllers-gwt" depends="gdx-core,gdx-backend-gwt,gdx-controllers">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/gdx-backend-gwt.jar"/>
<pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
<pathelement location="${basedir}/backends/gdx-backends-gwt/libs/gwt-dev.jar"/>
<pathelement location="${basedir}/backends/gdx-backends-gwt/libs/gwt-user.jar"/>
</path>
<ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-gwt">
<property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
<property name="jar" value="gdx-controllers-gwt"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx image -->
<target name="gdx-image" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-image">
<property name="distDir" value="${distDir}/extensions/gdx-image"/>
<property name="jar" value="gdx-image"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx audio -->
<target name="gdx-audio" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-audio">
<property name="distDir" value="${distDir}/extensions/gdx-audio"/>
<property name="jar" value="gdx-audio"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx freetype -->
<target name="gdx-freetype" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-freetype">
<property name="distDir" value="${distDir}/extensions/gdx-freetype"/>
<property name="jar" value="gdx-freetype"/>
<reference refid="classpath"/>
</ant>
</target>
<!-- gdx bullet -->
<target name="gdx-bullet" depends="gdx-core">
<path id="classpath">
<pathelement location="${distDir}/gdx.jar"/>
<pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
</path>
<path id="src">
<pathelement location="extensions/gdx-bullet/src"/>
<pathelement location="extensions/gdx-bullet/jni/swig-src"/>
</path>
<ant antfile="../../build-template.xml" dir="extensions/gdx-bullet">
<property name="distDir" value="${distDir}/extensions/gdx-bullet"/>
<property name="jar" value="gdx-bullet"/>
<reference refid="classpath"/>
<reference refid="src"/>
</ant>
</target>
<!-- generates the javadoc for the core api and the application implementations -->
<target name="docs" depends="clean">
<javadoc destdir="${distDir}/docs/api" author="true" version="true" use="true"
windowtitle="libgdx API" doctitle="libgdx API" footer="libgdx API" useexternalfile="true">
<header><![CDATA[
libgdx API
<style>
body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
.TableHeadingColor { background:#EEEEFF; }
a { text-decoration:none }
a:hover { text-decoration:underline }
a:link, a:visited { color:blue }
table { border:0px }
.TableRowColor td:first-child { border-left:1px solid black }
.TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
hr { border:0px; border-bottom:1px solid #333366; }
</style>
]]></header>
<bottom><![CDATA[
<div style="font-size:9pt"><i>
Copyright © 2010-2013 Mario Zechner ([email protected]), Nathan Sweet ([email protected])
</i></div>
]]></bottom>
<fileset dir="gdx/src" defaultexcludes="yes">
<include name="com/badlogic/gdx/**" />
<exclude name="com/badlogic/gdx/**/*.glsl"/>
<exclude name="com/badlogic/gdx/utils/arial-15.fnt" />
<exclude name="com/badlogic/gdx/utils/arial-15.png" />
<exclude name="com/badlogic/gdx/utils/XmlReader.rl" />
<exclude name="com/badlogic/gdx/utils/JsonReader.rl" />
</fileset>
<fileset dir="backends" includes="gdx-backend-jglfw/src/com/badlogic/gdx/backends/jglfw/JglfwApplication.java"/>
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>
<fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
<fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
<fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java"/>
<fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplicationConfiguration.java"/>
<fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java"/>
<fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplicationConfiguration.java"/>
</javadoc>
</target>
<!-- assumes that all the .dll and .a files have been compiled on a Mac and copied on top
of the current libgdx folder -->
<target name="copy-iosfiles">
<!-- copy dll and .a files as well as IKVM, monotouch and ObjectAL binaries to ios folder-->
<copy todir="${distDir}/ios" flatten="true" failonerror="false">
<fileset dir="gdx/libs/ios32/">
<include name="*.a"/>
<include name="*.dll"/>
<include name="*.dll.mdb"/>
</fileset>
<fileset dir="backends/gdx-backend-iosmonotouch/libs/ios32">
<include name="*.dll"/>
<include name="*.dll.mdb"/>
<include name="*.a"/>
</fileset>
</copy>
<copy todir="${distDir}/ios/ikvm" failonerror="false">
<fileset dir="backends/gdx-backend-iosmonotouch/libs/ikvm"/>
</copy>
<copy todir="${distDir}/ios/monotouch-jars" failonerror="false">
<fileset dir="backends/gdx-backend-iosmonotouch/libs/monotouch-jars"/>
</copy>
<copy todir="${distDir}/ios/objectal" failonerror="false">
<fileset dir="backends/gdx-backend-iosmonotouch/libs/objectal"/>
</copy>
<!-- copy freetype extension dll and .a files -->
<copy todir="${distDir}/extensions/gdx-freetype/ios" failonerror="false">
<fileset dir="extensions/gdx-freetype/libs/ios32">
<include name="*.a"/>
<include name="*.dll"/>
<include name="*.dll.mdb"/>
</fileset>
</copy>
<!-- copy bullet extension dll and .a files -->
<copy todir="${distDir}/extensions/gdx-bullet/ios" failonerror="false">
<fileset dir="extensions/gdx-bullet/libs/ios32">
<include name="*.a"/>
<include name="*.dll"/>
<include name="*.dll.mdb"/>
</fileset>
</copy>
</target>
<target name="jars"
depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-android,gdx-backend-gwt,gdx-backend-iosmonotouch,gdx-tools,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-image,gdx-audio,gdx-freetype,gdx-bullet"/>
<target name="all" depends="jars,docs,copy-iosfiles">
<!-- copy distribution files (licences etc.) -->
<copy tofile="${distDir}/README" file="README.md"/>
<copy tofile="${distDir}/LICENSE" file="LICENSE"/>
<copy tofile="${distDir}/CC-LICENSE" file="CC-LICENSE"/>
<copy tofile="${distDir}/AUTHORS" file="AUTHORS"/>
<copy tofile="${distDir}/CONTRIBUTORS" file="CONTRIBUTORS"/>
<!-- zip dist dir -->
<zip destfile="libgdx-${version}.zip" basedir="${distDir}"/>
</target>
</project>