1 <project name="gdx" default="all" basedir=".">
\r
2 <description>libgdx distribution build file</description>
\r
3 <property environment="env" />
\r
5 <!-- ndk directory -->
\r
6 <property name="env.NDK_HOME" value="/home/mzechner/android-ndk-r5"/>
\r
8 <!-- library version -->
\r
9 <property name="version" value="0.9.9-SNAPSHOT"/>
\r
11 <!-- define distribution/output directory -->
\r
12 <property name="distDir" value="${basedir}/dist"/>
\r
14 <!-- should we build natives? -->
\r
15 <property name="build-natives" value="false"/>
\r
17 <!-- clean distribution/output directory -->
\r
18 <target name="clean">
\r
19 <delete dir="${distDir}"/>
\r
22 <!-- build the core of the library plus all backends -->
\r
24 <target name="gdx-jnigen">
\r
25 <ant antfile="../../build-template.xml" dir="extensions/gdx-jnigen">
\r
26 <property name="distDir" value="${distDir}/extensions/gdx-jnigen"/>
\r
27 <property name="jar" value="gdx-jnigen"/>
\r
28 <!-- we shouldn't build any natives -->
\r
29 <property name="build-natives" value="false"/>
\r
33 <!-- gdx setup ui, custom target -->
\r
34 <target name="gdx-setup-ui">
\r
35 <ant antfile="build.xml" dir="extensions/gdx-setup-ui/"/>
\r
36 <copy tofile="${distDir}/gdx-setup-ui.jar" file="extensions/gdx-setup-ui/gdx-setup-ui.jar"/>
\r
40 <target name="gdx-core" depends="gdx-jnigen">
\r
41 <path id="classpath">
\r
42 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
44 <fileset id="resourcefiles" dir="gdx/src">
\r
45 <include name="com/badlogic/gdx/graphics/g3d/shaders/default.fragment.glsl"/>
\r
46 <include name="com/badlogic/gdx/graphics/g3d/shaders/default.vertex.glsl"/>
\r
47 <include name="com/badlogic/gdx/utils/arial-15.png"/>
\r
48 <include name="com/badlogic/gdx/utils/arial-15.fnt"/>
\r
50 <ant antfile="../build-template.xml" dir="gdx">
\r
51 <property name="jar" value="gdx"/>
\r
52 <reference refid="classpath"/>
\r
53 <reference refid="resourcefiles"/>
\r
57 <!-- gdx openal, for all desktop backends -->
\r
58 <target name="gdx-openal" depends="gdx-core">
\r
59 <path id="classpath">
\r
60 <pathelement location="${distDir}/gdx.jar"/>
\r
62 <ant antfile="../../build-template.xml" dir="backends/gdx-openal">
\r
63 <property name="jar" value="gdx-openal"/>
\r
64 <reference refid="classpath"/>
\r
68 <!-- gdx lwjgl backend -->
\r
69 <target name="gdx-backend-lwjgl" depends="gdx-core,gdx-openal">
\r
70 <path id="classpath">
\r
71 <pathelement location="${distDir}/gdx.jar"/>
\r
72 <pathelement location="${distDir}/gdx-openal.jar"/>
\r
74 <zipfileset id="jarfiles" src="${distDir}/gdx-openal.jar"/>
\r
75 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-lwjgl">
\r
76 <property name="jar" value="gdx-backend-lwjgl"/>
\r
77 <reference refid="classpath"/>
\r
78 <reference refid="jarfiles"/>
\r
82 <!-- gdx jglfw backend -->
\r
83 <target name="gdx-backend-jglfw" depends="gdx-core">
\r
84 <mkdir dir="backends/gdx-backend-jglfw/libs"/>
\r
85 <get src="http://libgdx.badlogicgames.com/jglfw/nightlies/dist/jglfw.jar" dest="backends/gdx-backend-jglfw/libs/jglfw.jar"/>
\r
86 <get src="http://libgdx.badlogicgames.com/jglfw/nightlies/dist/jglfw-natives.jar" dest="backends/gdx-backend-jglfw/libs/gdx-backend-jglfw-natives.jar"/>
\r
87 <path id="classpath">
\r
88 <pathelement location="${distDir}/gdx.jar"/>
\r
90 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-jglfw">
\r
91 <property name="jar" value="gdx-backend-jglfw"/>
\r
92 <reference refid="classpath"/>
\r
96 <!-- gdx android backend -->
\r
97 <target name="gdx-backend-android" depends="gdx-core">
\r
98 <path id="classpath">
\r
99 <pathelement location="${distDir}/gdx.jar"/>
\r
101 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-android">
\r
102 <property name="jar" value="gdx-backend-android"/>
\r
103 <reference refid="classpath"/>
\r
107 <!-- gdx gwt backend -->
\r
108 <target name="gdx-backend-gwt" depends="gdx-core">
\r
109 <path id="classpath">
\r
110 <pathelement location="${distDir}/gdx.jar"/>
\r
112 <ant antfile="../../build-template.xml" dir="backends/gdx-backends-gwt">
\r
113 <property name="jar" value="gdx-backend-gwt"/>
\r
114 <reference refid="classpath"/>
\r
118 <!-- gdx robovm backend -->
\r
119 <target name="gdx-backend-robovm" depends="gdx-core">
\r
120 <path id="classpath">
\r
121 <pathelement location="${distDir}/gdx.jar"/>
\r
123 <ant antfile="fetch.xml">
\r
124 <target name="fetch-robovm"/>
\r
126 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-robovm">
\r
127 <property name="jar" value="gdx-backend-robovm"/>
\r
128 <reference refid="classpath"/>
\r
132 <!-- gdx ios-monotouch backend -->
\r
133 <target name="gdx-backend-iosmonotouch" depends="gdx-core">
\r
134 <path id="classpath">
\r
135 <pathelement location="${distDir}/gdx.jar"/>
\r
136 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/monotouch-5.4.0.jar"/>
\r
137 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/mscorlib-4.0.jar"/>
\r
138 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/opentk-5.4.0.jar"/>
\r
139 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-2.1.jar"/>
\r
140 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-core-2.1.jar"/>
\r
141 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/monotouch-jars/system-data-2.1.jar"/>
\r
142 <pathelement location="${basedir}/backends/gdx-backend-iosmonotouch/libs/objectal/libObjectAL.jar"/>
\r
144 <ant antfile="../../build-template.xml" dir="backends/gdx-backend-iosmonotouch">
\r
145 <property name="jar" value="gdx-backend-iosmonotouch"/>
\r
146 <reference refid="classpath"/>
\r
150 <!-- build the extensions -->
\r
152 <target name="gdx-tools" depends="gdx-core,gdx-backend-lwjgl,gdx-backend-lwjgl">
\r
153 <path id="classpath">
\r
154 <pathelement location="${distDir}/gdx.jar"/>
\r
155 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
157 <fileset id="resourcefiles" dir="extensions/gdx-tools/assets"/>
\r
158 <ant antfile="../../build-template.xml" dir="extensions/gdx-tools">
\r
159 <property name="distDir" value="${distDir}/extensions/gdx-tools"/>
\r
160 <property name="jar" value="gdx-tools"/>
\r
161 <reference refid="classpath"/>
\r
162 <reference refid="resourcefiles"/>
\r
166 <!-- gdx tiled preprocessor -->
\r
167 <target name="gdx-tiled-preprocessor" depends="gdx-core,gdx-backend-lwjgl,gdx-tools">
\r
168 <path id="classpath">
\r
169 <pathelement location="${distDir}/gdx.jar"/>
\r
170 <pathelement location="${distDir}/gdx-backend-lwjgl.jar"/>
\r
171 <pathelement location="${distDir}/extensions/gdx-tools/gdx-tools.jar"/>
\r
173 <ant antfile="../../build-template.xml" dir="extensions/gdx-tiled-preprocessor">
\r
174 <property name="distDir" value="${distDir}/extensions/gdx-tiled-preprocessor"/>
\r
175 <property name="jar" value="gdx-tiled-preprocessor"/>
\r
176 <reference refid="classpath"/>
\r
180 <!-- gdx controllers -->
\r
181 <target name="gdx-controllers" depends="gdx-core">
\r
182 <path id="classpath">
\r
183 <pathelement location="${distDir}/gdx.jar"/>
\r
185 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers">
\r
186 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
187 <property name="jar" value="gdx-controllers"/>
\r
188 <reference refid="classpath"/>
\r
192 <target name="gdx-controllers-desktop" depends="gdx-core,gdx-jnigen,gdx-controllers">
\r
193 <path id="classpath">
\r
194 <pathelement location="${distDir}/gdx.jar"/>
\r
195 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
196 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
198 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-desktop">
\r
199 <property name="distDir" value="${distDir}/extensions/gdx-controllers/"/>
\r
200 <property name="jar" value="gdx-controllers-desktop"/>
\r
201 <reference refid="classpath"/>
\r
205 <target name="gdx-controllers-android" depends="gdx-core,gdx-backend-android,gdx-controllers">
\r
206 <path id="classpath">
\r
207 <pathelement location="${distDir}/gdx.jar"/>
\r
208 <pathelement location="${distDir}/gdx-backend-android.jar"/>
\r
209 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
210 <pathelement location="${basedir}/backends/gdx-backend-android/libs/android-4.2.jar"/>
\r
212 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-android">
\r
213 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
214 <property name="jar" value="gdx-controllers-android"/>
\r
215 <reference refid="classpath"/>
\r
219 <target name="gdx-controllers-gwt" depends="gdx-core,gdx-backend-gwt,gdx-controllers">
\r
220 <path id="classpath">
\r
221 <pathelement location="${distDir}/gdx.jar"/>
\r
222 <pathelement location="${distDir}/gdx-backend-gwt.jar"/>
\r
223 <pathelement location="${distDir}/extensions/gdx-controllers/gdx-controllers.jar"/>
\r
224 <pathelement location="${basedir}/backends/gdx-backends-gwt/libs/gwt-dev.jar"/>
\r
225 <pathelement location="${basedir}/backends/gdx-backends-gwt/libs/gwt-user.jar"/>
\r
227 <ant antfile="../../../build-template.xml" dir="extensions/gdx-controllers/gdx-controllers-gwt">
\r
228 <property name="distDir" value="${distDir}/extensions/gdx-controllers"/>
\r
229 <property name="jar" value="gdx-controllers-gwt"/>
\r
230 <reference refid="classpath"/>
\r
235 <target name="gdx-image" depends="gdx-core">
\r
236 <path id="classpath">
\r
237 <pathelement location="${distDir}/gdx.jar"/>
\r
238 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
240 <ant antfile="../../build-template.xml" dir="extensions/gdx-image">
\r
241 <property name="distDir" value="${distDir}/extensions/gdx-image"/>
\r
242 <property name="jar" value="gdx-image"/>
\r
243 <reference refid="classpath"/>
\r
248 <target name="gdx-audio" depends="gdx-core">
\r
249 <path id="classpath">
\r
250 <pathelement location="${distDir}/gdx.jar"/>
\r
251 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
253 <ant antfile="../../build-template.xml" dir="extensions/gdx-audio">
\r
254 <property name="distDir" value="${distDir}/extensions/gdx-audio"/>
\r
255 <property name="jar" value="gdx-audio"/>
\r
256 <reference refid="classpath"/>
\r
260 <!-- gdx freetype -->
\r
261 <target name="gdx-freetype" depends="gdx-core">
\r
262 <path id="classpath">
\r
263 <pathelement location="${distDir}/gdx.jar"/>
\r
264 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
266 <ant antfile="../../build-template.xml" dir="extensions/gdx-freetype">
\r
267 <property name="distDir" value="${distDir}/extensions/gdx-freetype"/>
\r
268 <property name="jar" value="gdx-freetype"/>
\r
269 <reference refid="classpath"/>
\r
273 <!-- gdx bullet -->
\r
274 <target name="gdx-bullet" depends="gdx-core">
\r
275 <path id="classpath">
\r
276 <pathelement location="${distDir}/gdx.jar"/>
\r
277 <pathelement location="${distDir}/extensions/gdx-jnigen/gdx-jnigen.jar"/>
\r
280 <pathelement location="extensions/gdx-bullet/src"/>
\r
281 <pathelement location="extensions/gdx-bullet/jni/swig-src"/>
\r
283 <ant antfile="../../build-template.xml" dir="extensions/gdx-bullet">
\r
284 <property name="distDir" value="${distDir}/extensions/gdx-bullet"/>
\r
285 <property name="jar" value="gdx-bullet"/>
\r
286 <reference refid="classpath"/>
\r
287 <reference refid="src"/>
\r
291 <!-- generates the javadoc for the core api and the application implementations -->
\r
292 <target name="docs" depends="clean">
\r
293 <javadoc destdir="${distDir}/docs/api" author="true" version="true" use="true"
\r
294 windowtitle="libgdx API" doctitle="libgdx API" footer="libgdx API" useexternalfile="true">
\r
298 body, td, th { font-family:Helvetica, Tahoma, Arial, sans-serif; font-size:10pt }
\r
299 pre, code, tt { font-size:9pt; font-family:Lucida Console, Courier New, sans-serif }
\r
300 h1, h2, h3, .FrameTitleFont, .FrameHeadingFont, .TableHeadingColor font { font-size:105%; font-weight:bold }
\r
301 .TableHeadingColor { background:#EEEEFF; }
\r
302 a { text-decoration:none }
\r
303 a:hover { text-decoration:underline }
\r
304 a:link, a:visited { color:blue }
\r
305 table { border:0px }
\r
306 .TableRowColor td:first-child { border-left:1px solid black }
\r
307 .TableRowColor td { border:0px; border-bottom:1px solid black; border-right:1px solid black }
\r
308 hr { border:0px; border-bottom:1px solid #333366; }
\r
312 <div style="font-size:9pt"><i>
\r
313 Copyright © 2010-2013 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)
\r
316 <fileset dir="gdx/src" defaultexcludes="yes">
\r
317 <include name="com/badlogic/gdx/**" />
\r
318 <exclude name="com/badlogic/gdx/**/*.glsl"/>
\r
319 <exclude name="com/badlogic/gdx/utils/arial-15.fnt" />
\r
320 <exclude name="com/badlogic/gdx/utils/arial-15.png" />
\r
321 <exclude name="com/badlogic/gdx/utils/XmlReader.rl" />
\r
322 <exclude name="com/badlogic/gdx/utils/JsonReader.rl" />
\r
324 <fileset dir="backends" includes="gdx-backend-jglfw/src/com/badlogic/gdx/backends/jglfw/JglfwApplication.java"/>
\r
325 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplication.java"/>
\r
326 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglCanvas.java"/>
\r
327 <fileset dir="backends" includes="gdx-backend-lwjgl/src/com/badlogic/gdx/backends/lwjgl/LwjglApplet.java"/>
\r
328 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplication.java"/>
\r
329 <fileset dir="backends" includes="gdx-backend-android/src/com/badlogic/gdx/backends/android/AndroidApplicationConfiguration.java"/>
\r
330 <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplication.java"/>
\r
331 <fileset dir="backends" includes="gdx-backend-iosmonotouch/src/com/badlogic/gdx/backends/ios/IOSApplicationConfiguration.java"/>
\r
332 <fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplication.java"/>
\r
333 <fileset dir="backends" includes="gdx-backends-gwt/src/com/badlogic/gdx/backends/gwt/GwtApplicationConfiguration.java"/>
\r
337 <!-- assumes that all the .dll and .a files have been compiled on a Mac and copied on top
\r
338 of the current libgdx folder -->
\r
339 <target name="copy-iosfiles">
\r
340 <!-- copy dll and .a files as well as IKVM, monotouch and ObjectAL binaries to ios folder-->
\r
341 <copy todir="${distDir}/ios" flatten="true" failonerror="false">
\r
342 <fileset dir="gdx/libs/ios32/">
\r
343 <include name="*.a"/>
\r
344 <include name="*.dll"/>
\r
345 <include name="*.dll.mdb"/>
\r
347 <fileset dir="backends/gdx-backend-iosmonotouch/libs/ios32">
\r
348 <include name="*.dll"/>
\r
349 <include name="*.dll.mdb"/>
\r
350 <include name="*.a"/>
\r
353 <copy todir="${distDir}/ios/ikvm" failonerror="false">
\r
354 <fileset dir="backends/gdx-backend-iosmonotouch/libs/ikvm"/>
\r
356 <copy todir="${distDir}/ios/monotouch-jars" failonerror="false">
\r
357 <fileset dir="backends/gdx-backend-iosmonotouch/libs/monotouch-jars"/>
\r
359 <copy todir="${distDir}/ios/objectal" failonerror="false">
\r
360 <fileset dir="backends/gdx-backend-iosmonotouch/libs/objectal"/>
\r
363 <!-- copy freetype extension dll and .a files -->
\r
364 <copy todir="${distDir}/extensions/gdx-freetype/ios" failonerror="false">
\r
365 <fileset dir="extensions/gdx-freetype/libs/ios32">
\r
366 <include name="*.a"/>
\r
367 <include name="*.dll"/>
\r
368 <include name="*.dll.mdb"/>
\r
372 <!-- copy bullet extension dll and .a files -->
\r
373 <copy todir="${distDir}/extensions/gdx-bullet/ios" failonerror="false">
\r
374 <fileset dir="extensions/gdx-bullet/libs/ios32">
\r
375 <include name="*.a"/>
\r
376 <include name="*.dll"/>
\r
377 <include name="*.dll.mdb"/>
\r
382 <target name="jars"
\r
383 depends="clean,gdx-setup-ui,gdx-core,gdx-openal,gdx-backend-lwjgl,gdx-backend-jglfw,gdx-backend-android,gdx-backend-gwt,gdx-backend-robovm,gdx-backend-iosmonotouch,gdx-tools,gdx-controllers,gdx-controllers-desktop,gdx-controllers-android,gdx-controllers-gwt,gdx-image,gdx-audio,gdx-freetype,gdx-bullet,gdx-tiled-preprocessor"/>
\r
385 <target name="all" depends="jars,docs,copy-iosfiles">
\r
386 <!-- copy distribution files (licences etc.) -->
\r
387 <copy tofile="${distDir}/README" file="README.md"/>
\r
388 <copy tofile="${distDir}/LICENSE" file="LICENSE"/>
\r
389 <copy tofile="${distDir}/CC-LICENSE" file="CC-LICENSE"/>
\r
390 <copy tofile="${distDir}/AUTHORS" file="AUTHORS"/>
\r
391 <copy tofile="${distDir}/CONTRIBUTORS" file="CONTRIBUTORS"/>
\r
393 <!-- zip dist dir -->
\r
394 <zip destfile="libgdx-${version}.zip" basedir="${distDir}"/>
\r
395 <checksum file="libgdx-${version}.zip" forceOverwrite="yes" />
\r