-
Notifications
You must be signed in to change notification settings - Fork 96
/
build.xml
executable file
·315 lines (281 loc) · 10.2 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
<project name="WiEngine" default="WiEngine_library" basedir=".">
<description>
WiEngine Android SDK Ant build file
</description>
<property name="version" value="3.10.3"/>
<property name="build" value="bin/classes"/>
<property name="lib.name" value="WiEngine.jar"/>
<property name="lib.chipmunk.name" value="WiEngine-chipmunk.jar"/>
<property name="lib.box2d.name" value="WiEngine-box2d.jar"/>
<property name="lib.lua.name" value="WiEngine-lua.jar"/>
<property name="lib.iap.name" value="WiEngine-iap.jar"/>
<property name="lib.network.name" value="WiEngine-network.jar"/>
<property name="lib.binding.name" value="WiEngine-binding.jar"/>
<property name="proguard.dir" location="proguard"/>
<property name="dist.zip" location="dist/WiEngine_sdk_android_${version}.zip"/>
<property name="top.dir" location="dist/WiEngine_sdk_android_${version}"/>
<property name="wiengine.library.dir" location="dist/WiEngine_sdk_android_${version}/WiEngine_library"/>
<property name="sdk.package.path" value="com/wiyun/engine"/>
<!-- for different platform, doxygen path -->
<condition
property="doxygen"
value="C:\Software\doxygen\bin\doxygen"
else="/usr/local/bin/doxygen">
<and>
<os family="windows"/>
</and>
</condition>
<!-- make distribution package -->
<target name="pack">
<!-- zip sdk -->
<zip destfile="${dist.zip}">
<zipfileset dir="${top.dir}" includes="**/*"/>
</zip>
<!-- delete dir -->
<delete dir="${top.dir}"/>
</target>
<!-- build WiEngine_library project -->
<target name="WiEngine_library">
<!-- delete some garbage generated by ndk -->
<delete>
<fileset dir="libs">
<exclude name="**/lib*"/>
</fileset>
</delete>
<!-- copy library project -->
<copy todir="${wiengine.library.dir}">
<fileset dir="samples/WiEngine_library_skeleton"/>
</copy>
<!-- copy libs to WiEngine library project -->
<copy todir="${wiengine.library.dir}/libs">
<fileset dir="libs"/>
</copy>
<!-- copy headers -->
<antcall target="copy_headers"></antcall>
<!-- build jar -->
<antcall target="jar-core"/>
<antcall target="jar-chipmunk"/>
<antcall target="jar-box2d"/>
<antcall target="jar-lua"/>
<antcall target="jar-iap"/>
<antcall target="jar-network"/>
<antcall target="jar-binding"/>
</target>
<!-- copy headers -->
<target name="copy_headers">
<copy todir="${wiengine.library.dir}/jni">
<fileset dir="jni">
<include name="**/*.h"/>
<include name="**/*.hpp"/>
<include name="**/*.inl"/>
<exclude name="**/jni_init.h"/>
<exclude name="android_adapter/**"/>
<exclude name="expat/**"/>
<exclude name="freetype/**"/>
<exclude name="Box2D/binding/**"/>
<exclude name="chipmunk/binding/**"/>
<exclude name="libmpg123/**"/>
<exclude name="libjpeg/**"/>
<exclude name="libnsbmp/**"/>
<exclude name="libpng/**"/>
<exclude name="libxml2/*.h"/>
<exclude name="libpvr/platform/**"/>
<exclude name="lua/binding/**"/>
<exclude name="openal/**"/>
<exclude name="vorbis/**"/>
<exclude name="yajl/**"/>
<exclude name="iap/**"/>
<exclude name="sqlite3/**"/>
<exclude name="WiEngine/impl/**"/>
<exclude name="WiEngine_binding/**"/>
<exclude name="WiNetwork/**"/>
<exclude name="WiSound/**"/>
</fileset>
</copy>
</target>
<!-- build WiEngine.jar file -->
<target name="jar-core">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine sdk jar -->
<jar destfile="${wiengine.library.dir}/libs/${lib.name}">
<!-- wiengine core classes -->
<fileset
dir="${build}"
includes="${sdk.package.path}/Base*.class,
${sdk.package.path}/actions/Action*.class,
${sdk.package.path}/actions/IntervalAction*.class,
${sdk.package.path}/actions/FiniteTimeAction*.class,
${sdk.package.path}/actions/ease/EaseAction*.class,
${sdk.package.path}/grid/BaseGrid*.class,
${sdk.package.path}/opengl/Camera*.class,
${sdk.package.path}/opengl/Texture2D*.class,
${sdk.package.path}/opengl/*GLSurfaceView*.class,
${sdk.package.path}/nodes/Director*.class,
${sdk.package.path}/nodes/Node*.class,
${sdk.package.path}/nodes/Scene*.class,
${sdk.package.path}/nodes/TextBox*.class,
${sdk.package.path}/events/*.class,
${sdk.package.path}/sound/*.class,
${sdk.package.path}/types/ICopyable*.class,
${sdk.package.path}/types/WYAffineTransform*.class,
${sdk.package.path}/types/WYColor3B*.class,
${sdk.package.path}/types/WYColor4B*.class,
${sdk.package.path}/types/WYColor4F*.class,
${sdk.package.path}/types/WYPoint*.class,
${sdk.package.path}/types/WYRect*.class,
${sdk.package.path}/types/WYSize*.class,
${sdk.package.path}/utils/ResourceDecoder*.class,
${sdk.package.path}/utils/ImagePicker*.class,
${sdk.package.path}/utils/VideoPlayingActivity*.class,
${sdk.package.path}/utils/PrefUtil*.class,
${sdk.package.path}/utils/TargetSelector*.class"/>
</jar>
</target>
<!-- build WiEngine-binding.jar file -->
<target name="jar-binding">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine java binding jar -->
<jar
destfile="${wiengine.library.dir}/libs/${lib.binding.name}"
basedir="${build}"
includes="${sdk.package.path}/**/*.class"
excludes="${sdk.package.path}/R*.class,
${sdk.package.path}/BuildConfig*.class
${sdk.package.path}/Base*.class,
${sdk.package.path}/chipmunk/*.class,
${sdk.package.path}/box2d/**/*.class,
${sdk.package.path}/lua/*.class,
${sdk.package.path}/events/*.class,
${sdk.package.path}/iap/**/*.class,
${sdk.package.path}/network/*.class,
${sdk.package.path}/sound/*.class,
${sdk.package.path}/actions/Action*.class,
${sdk.package.path}/actions/IntervalAction*.class,
${sdk.package.path}/actions/FiniteTimeAction*.class,
${sdk.package.path}/actions/ease/EaseAction*.class,
${sdk.package.path}/grid/BaseGrid*.class,
${sdk.package.path}/opengl/Camera*.class,
${sdk.package.path}/opengl/Texture2D*.class,
${sdk.package.path}/opengl/*GLSurfaceView*.class,
${sdk.package.path}/nodes/Director*.class,
${sdk.package.path}/nodes/Node*.class,
${sdk.package.path}/nodes/Scene*.class,
${sdk.package.path}/nodes/TextBox*.class,
${sdk.package.path}/nodes/_*.class,
${sdk.package.path}/types/ICopyable*.class,
${sdk.package.path}/types/WYAffineTransform*.class,
${sdk.package.path}/types/WYColor3B*.class,
${sdk.package.path}/types/WYColor4B*.class,
${sdk.package.path}/types/WYColor4F*.class,
${sdk.package.path}/types/WYPoint*.class,
${sdk.package.path}/types/WYRect*.class,
${sdk.package.path}/types/WYSize*.class,
${sdk.package.path}/utils/ResourceDecoder*.class,
${sdk.package.path}/utils/ImagePicker*.class,
${sdk.package.path}/utils/VideoPlayingActivity*.class,
${sdk.package.path}/utils/PrefUtil*.class,
${sdk.package.path}/utils/TargetSelector*.class"/>
</target>
<!-- build WiEngine-chipmunk.jar file -->
<target name="jar-chipmunk">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine chipmunk jar -->
<jar
destfile="${wiengine.library.dir}/libs/${lib.chipmunk.name}"
basedir="${build}"
includes="${sdk.package.path}/chipmunk/*.class"/>
</target>
<!-- build WiEngine-box2d.jar file -->
<target name="jar-box2d">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine box2d jar -->
<jar
destfile="${wiengine.library.dir}/libs/${lib.box2d.name}"
basedir="${build}"
includes="${sdk.package.path}/box2d/**/*.class"/>
</target>
<!-- build WiEngine-lua.jar file -->
<target name="jar-lua">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine lua jar -->
<jar
destfile="${wiengine.library.dir}/libs/${lib.lua.name}"
basedir="${build}"
includes="${sdk.package.path}/lua/*.class"/>
</target>
<!-- build WiEngine-iap.jar file -->
<target name="jar-iap">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine iap jar -->
<jar
destfile="${wiengine.library.dir}/libs/${lib.iap.name}"
basedir="${build}"
includes="${sdk.package.path}/iap/**/*.class,
com/android/**/*.class"/>
</target>
<!-- build WiEngine-network.jar file -->
<target name="jar-network">
<mkdir dir="${wiengine.library.dir}/libs" />
<!-- make wiengine network jar -->
<jar
destfile="${wiengine.library.dir}/libs/${lib.network.name}"
basedir="${build}"
includes="${sdk.package.path}/network/*.class"/>
</target>
<!-- generate javadoc -->
<target name="javadoc_chinese">
<exec executable="${doxygen}" dir="doxygen">
<arg value="javadoc_chinese.cfg"/>
</exec>
<!-- copy auxiliary resources -->
<copy todir="javadoc/html">
<fileset dir="doxygen/images">
<include name="*.jpg"/>
<include name="*.png"/>
</fileset>
</copy>
<!-- ensure debug.txt deleted -->
<delete file="doxygen/debug.txt"/>
</target>
<!-- generate javadoc -->
<target name="javadoc_english">
<exec executable="${doxygen}" dir="doxygen">
<arg value="javadoc_english.cfg"/>
</exec>
<!-- copy auxiliary resources -->
<copy todir="javadoc/html">
<fileset dir="doxygen/images">
<include name="*.jpg"/>
<include name="*.png"/>
</fileset>
</copy>
<!-- ensure debug.txt deleted -->
<delete file="doxygen/debug.txt"/>
</target>
<!-- generate cppdoc -->
<target name="cppdoc_chinese">
<exec executable="${doxygen}" dir="doxygen">
<arg value="cppdoc_chinese_android.cfg"/>
</exec>
<!-- copy auxiliary resources -->
<copy todir="cppdoc/html">
<fileset dir="doxygen/images">
<include name="*.jpg"/>
<include name="*.png"/>
</fileset>
</copy>
</target>
<!-- generate cppdoc -->
<target name="cppdoc_english">
<exec executable="${doxygen}" dir="doxygen">
<arg value="cppdoc_english_android.cfg"/>
</exec>
<!-- copy auxiliary resources -->
<copy todir="cppdoc/html">
<fileset dir="doxygen/images">
<include name="*.jpg"/>
<include name="*.png"/>
</fileset>
</copy>
</target>
</project>