forked from apache/flex-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
511 lines (444 loc) · 22.1 KB
/
build.xml
File metadata and controls
511 lines (444 loc) · 22.1 KB
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
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
<?xml version="1.0"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!-- Note:
If you modify this file you may have to make the same change in build_framework.xml.
build_framework.xml is renamed to build.xml when it is packaged.
It is used to build the frameworks directory from the zip file.
-->
<project name="frameworks" default="main" basedir=".">
<property name="FLEX_HOME" location=".."/>
<!-- Required for OSX 10.6 / Snow Leopard Performance. -->
<!-- Java 7 on Mac requires OSX 10.7.3 or higher and is 64-bit only -->
<!-- local.d32 is set/used in build.properties so this needs to be done first. -->
<condition property="local.d32" value="-d32">
<and>
<os family="mac"/>
<matches pattern="1.6.*" string="${java.version}"/>
<equals arg1="${sun.arch.data.model}" arg2="64"/>
<equals arg1="${os.arch}" arg2="x86_64"/>
</and>
</condition>
<!-- Property for the platform. -->
<condition property="isMac">
<os family="mac"/>
</condition>
<condition property="isWindows">
<os family="windows" />
</condition>
<condition property="isLinux">
<and>
<os family="unix"/>
<not>
<os family="mac"/>
</not>
</and>
</condition>
<property file="${FLEX_HOME}/env.properties"/>
<property environment="env"/>
<property file="${FLEX_HOME}/build.properties"/>
<target name="main" depends="check-compile-env,check-tlf-home,clean,prepare,compile,javascript"
description="Clean build of all SWCs"/>
<target name="check-compile-env" description="Check for the required environment variables">
<ant antfile="${FLEX_HOME}/build.xml" target="check-compile-env" dir="${FLEX_HOME}"/>
</target>
<target name="check-tlf-home" unless="TLF_HOME"
description="Check TLF_HOME is a directory.">
<echo message="TLF_HOME is ${env.TLF_HOME}"/>
<available file="${env.TLF_HOME}"
type="dir"
property="TLF_HOME"
value="${env.TLF_HOME}"/>
<fail message="TLF_HOME must be set correctly for a release build"
unless="TLF_HOME"/>
</target>
<target name="prepare" depends="local-fonts-snapshot, thirdparty-downloads"/>
<!--
Font snapshot files for the JREFontManager.
For some fonts it is possible to determine if it is illegal to embed them.
If that information is known for a particular font, a warning message can be
displayed.if an attempt is made to embed that font.
-->
<target name="local-fonts-snapshot"
description="Files required by FlashBuilder but not by Flex.">
<touch file="localFonts.ser"/>
<touch file="macFonts.ser"/>
<touch file="winFonts.ser"/>
</target>
<target name="thirdparty-downloads" unless="no.thirdparty-downloads" description="Downloads all the required thirdparty code.">
<ant antfile="${basedir}/downloads.xml" dir="${basedir}"/>
</target>
<!-- Note:
Removed osmf from build. For now, just use the downloaded swc.
We can move the osmf source from osmf-download to projects/osmf and add back the
property files for all the languages if we choose.
Should consider updating the OSMF and TLF versions in use.
-->
<target name="compile" description="Builds all SWCs but not their resource bundles" depends="flex-config">
<antcall target="framework"/>
<antcall target="mx"/>
<antcall target="textLayout"/>
<antcall target="rpc"/>
<antcall target="charts"/>
<antcall target="advancedgrids"/>
<antcall target="spark"/>
<antcall target="sparkskins"/>
<antcall target="spark_dmv"/>
<antcall target="airframework"/>
<antcall target="airspark"/>
<antcall target="mobilecomponents"/>
<antcall target="mobiletheme"/>
<antcall target="core"/>
<antcall target="flash_integration"/>
<antcall target="authoringsupport"/>
<antcall target="halo"/>
<antcall target="wireframe"/>
<antcall target="aeongraphical"/>
<antcall target="apache"/>
<antcall target="experimental"/>
<antcall target="experimental_mobile"/>
<antcall target="compile-automation"/>
</target>
<target name="flex-config" depends="playerglobal-setswfversion" description="Copy the flex/air/airmobile config templates to flex/air/airmobile-config.xml and inject version numbers">
<copy file="${basedir}/flex-config-template.xml" tofile="${basedir}/flex-config.xml" overwrite="true">
<filterset>
<filter token="playerversion" value="${playerglobal.version}"/>
<filter token="swfversion" value="${playerglobal.swfversion}"/>
<filter token="locale" value="${locale}"/>
</filterset>
</copy>
<copy file="${basedir}/air-config-template.xml" tofile="${basedir}/air-config.xml" overwrite="true">
<filterset>
<filter token="playerversion" value="${playerglobal.version}"/>
<filter token="swfversion" value="${playerglobal.swfversion}"/>
<filter token="locale" value="${locale}"/>
</filterset>
</copy>
<copy file="${basedir}/airmobile-config-template.xml" tofile="${basedir}/airmobile-config.xml" overwrite="true">
<filterset>
<filter token="playerversion" value="${playerglobal.version}"/>
<filter token="swfversion" value="${playerglobal.swfversion}"/>
<filter token="locale" value="${locale}"/>
</filterset>
</copy>
</target>
<target name="playerglobal-setswfversion" description="Set the swfversion to insert into the flex config file">
<condition property="playerglobal.swfversion" value="11">
<equals arg1="${playerglobal.version}" arg2="10.2" />
</condition>
<condition property="playerglobal.swfversion" value="12">
<equals arg1="${playerglobal.version}" arg2="10.3" />
</condition>
<condition property="playerglobal.swfversion" value="13">
<equals arg1="${playerglobal.version}" arg2="11.0" />
</condition>
<condition property="playerglobal.swfversion" value="14">
<equals arg1="${playerglobal.version}" arg2="11.1" />
</condition>
<condition property="playerglobal.swfversion" value="15">
<equals arg1="${playerglobal.version}" arg2="11.2" />
</condition>
<condition property="playerglobal.swfversion" value="16">
<equals arg1="${playerglobal.version}" arg2="11.3" />
</condition>
<condition property="playerglobal.swfversion" value="17">
<equals arg1="${playerglobal.version}" arg2="11.4" />
</condition>
<condition property="playerglobal.swfversion" value="18">
<equals arg1="${playerglobal.version}" arg2="11.5" />
</condition>
<condition property="playerglobal.swfversion" value="19">
<equals arg1="${playerglobal.version}" arg2="11.6" />
</condition>
<condition property="playerglobal.swfversion" value="20">
<equals arg1="${playerglobal.version}" arg2="11.7" />
</condition>
<condition property="playerglobal.swfversion" value="21">
<equals arg1="${playerglobal.version}" arg2="11.8" />
</condition>
<condition property="playerglobal.swfversion" value="22">
<equals arg1="${playerglobal.version}" arg2="11.9" />
</condition>
<condition property="playerglobal.swfversion" value="23">
<equals arg1="${playerglobal.version}" arg2="12.0" />
</condition>
<condition property="playerglobal.swfversion" value="24">
<equals arg1="${playerglobal.version}" arg2="13.0" />
</condition>
<condition property="playerglobal.swfversion" value="25">
<equals arg1="${playerglobal.version}" arg2="14.0" />
</condition>
<condition property="playerglobal.swfversion" value="26">
<equals arg1="${playerglobal.version}" arg2="15.0" />
</condition>
</target>
<!--
automation: tool was formerly qtp and tool_air was formerly qtp_air
-->
<target name="compile-automation" description="Builds all automation SWCs but not their resource bundles">
<antcall target="automation_agent"/>
<antcall target="automation_dmv"/>
<antcall target="tool"/>
<antcall target="automation"/>
<antcall target="tool_air"/>
<antcall target="automation_spark"/>
<antcall target="automation_flashflexkit"/>
<antcall target="automation_air"/>
<antcall target="automation_airspark"/>
</target>
<target name="other.locales" description ="Builds resource SWCs for all locales">
<ant dir="${basedir}/projects/framework" target="other.locales"/>
<ant dir="${basedir}/projects/mx" target="other.locales"/>
<ant dir="${basedir}/projects/textLayout" target="other.locales"/>
<ant dir="${basedir}/projects/airframework" target="other.locales"/>
<ant dir="${basedir}/projects/airspark" target="other.locales"/>
<ant dir="${basedir}/projects/rpc" target="other.locales"/>
<ant dir="${basedir}/projects/charts" target="other.locales"/>
<ant dir="${basedir}/projects/advancedgrids" target="other.locales"/>
<ant dir="${basedir}/projects/spark" target="other.locales"/>
<ant dir="${basedir}/projects/mobilecomponents" target="other.locales" />
<ant dir="${basedir}/projects/playerglobal" target="other.locales" />
<ant dir="${basedir}/projects/flash-integration" target="other.locales"/>
<ant dir="${basedir}/projects/automation" target="other.locales"/>
<ant dir="${basedir}/projects/automation_agent" target="other.locales"/>
<ant dir="${basedir}/projects/tool" target="other.locales"/>
<ant dir="${basedir}/projects/tool_air" target="other.locales"/>
<ant dir="${basedir}/projects/apache" target="other.locales"/>
<ant dir="${basedir}/projects/experimental" target="other.locales"/>
<ant dir="${basedir}/projects/experimental_mobile" target="other.locales"/>
</target>
<target name="doc" >
<ant dir="${basedir}/projects/framework" target="doc" />
<ant dir="${basedir}/projects/mx" target="doc" />
<ant dir="${basedir}/projects/textLayout" target="doc" />
<ant dir="${basedir}/projects/rpc" target="doc" />
<ant dir="${basedir}/projects/charts" target="doc" />
<ant dir="${basedir}/projects/advancedgrids" target="doc" />
<ant dir="${basedir}/projects/spark" target="doc" />
<ant dir="${basedir}/projects/spark_dmv" target="doc" />
<ant dir="${basedir}/projects/sparkskins" target="doc" />
<ant dir="${basedir}/projects/airframework" target="doc" />
<ant dir="${basedir}/projects/airspark" target="doc" />
<ant dir="${basedir}/projects/mobilecomponents" target="doc" />
<ant dir="${basedir}/projects/mobiletheme" target="doc" />
<ant dir="${basedir}/projects/core" target="doc" />
<ant dir="${basedir}/projects/authoringsupport" target="doc" />
<ant dir="${basedir}/projects/wireframe" target="doc" />
<ant dir="${basedir}/projects/flash-integration" target="doc" />
<!-- removed until sources donated to Apache -->
<!--
<ant dir="${basedir}/projects/automation" target="doc" />
-->
<ant dir="${basedir}/projects/apache" target="doc" />
<ant dir="${basedir}/projects/experimental" target="doc" />
<ant dir="${basedir}/projects/experimental_mobile" target="doc" />
</target>
<!--
Cleanup
-->
<target name="super-clean" depends="thirdparty-clean,clean" description="Cleans everything including thirdparty downloads."/>
<target name="thirdparty-clean" unless="no.thirdparty-clean" description="Removes all thirdparty downloads.">
<ant antfile="${basedir}/downloads.xml" target="clean" dir="${basedir}"/>
</target>
<target name="clean" depends="check-tlf-home,automation-clean,airsdk-clean" description="Cleans all SWCs and their resource bundles">
<delete file="${basedir}/flex-config.xml"/>
<delete file="${basedir}/air-config.xml"/>
<delete file="${basedir}/airmobile-config.xml"/>
<!-- Delete output from SWC projects -->
<ant dir="${basedir}/projects/textLayout" target="clean"/>
<ant dir="${basedir}/projects/framework" target="clean"/>
<ant dir="${basedir}/projects/mx" target="clean"/>
<ant dir="${basedir}/projects/airframework" target="clean"/>
<ant dir="${basedir}/projects/airspark" target="clean"/>
<ant dir="${basedir}/projects/mobilecomponents" target="clean"/>
<ant dir="${basedir}/projects/mobiletheme" target="clean"/>
<ant dir="${basedir}/projects/core" target="clean"/>
<ant dir="${basedir}/projects/spark" target="clean"/>
<ant dir="${basedir}/projects/spark_dmv" target="clean"/>
<ant dir="${basedir}/projects/sparkskins" target="clean"/>
<ant dir="${basedir}/projects/halo" target="clean"/>
<ant dir="${basedir}/projects/wireframe" target="clean"/>
<ant dir="${basedir}/projects/flash-integration" target="clean"/>
<ant dir="${basedir}/projects/rpc" target="clean"/>
<ant dir="${basedir}/projects/authoringsupport" target="clean"/>
<ant dir="${basedir}/projects/charts" target="clean"/>
<ant dir="${basedir}/projects/advancedgrids" target="clean"/>
<ant dir="${basedir}/projects/apache" target="clean"/>
<ant dir="${basedir}/projects/experimental" target="clean"/>
<ant dir="${basedir}/projects/experimental_mobile" target="clean"/>
<ant dir="${basedir}/javascript" target="clean"/>
<ant dir="${basedir}/themes/AeonGraphical" target="clean"/>
<!-- delete the FlashBuilder executable directories -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${basedir}/projects">
<include name="*/bin/**"/>
</fileset>
</delete>
<!-- Delete empty folders -->
<delete dir="${basedir}/libs"/>
<delete dir="${basedir}/locale">
<exclude name="**/metadata.properties"/>
</delete>
<delete dir="${basedir}/libs/generated"/>
<!-- Delete only if it exists and it is empty. air and swfobject put dirs here. -->
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${FLEX_HOME}/templates" excludes="**/*" />
</delete>
<!-- remove these if/when they actually have content -->
<delete file="localFonts.ser"/>
<delete file="macFonts.ser"/>
<delete file="winFonts.ser"/>
</target>
<target name="automation-clean" description="Builds all automation SWCs but not their resource bundles">
<ant dir="${basedir}/projects/automation_agent" target="clean"/>
<ant dir="${basedir}/projects/automation" target="clean"/>
<ant dir="${basedir}/projects/automation_air" target="clean"/>
<ant dir="${basedir}/projects/automation_dmv" target="clean"/>
<ant dir="${basedir}/projects/automation_flashflexkit" target="clean"/>
<ant dir="${basedir}/projects/automation_spark" target="clean"/>
<ant dir="${basedir}/projects/automation_airspark" target="clean"/>
<ant dir="${basedir}/projects/tool" target="clean"/>
<ant dir="${basedir}/projects/tool_air" target="clean"/>
</target>
<target name="airsdk-clean" description="Delete files copied from the AIR SDK">
<!-- Delete AIR files and directories from 'prepare' target -->
<delete file="${FLEX_HOME}/AIR SDK license.pdf"/>
<delete file="${FLEX_HOME}/AIR SDK Readme.txt"/>
<delete file="${FLEX_HOME}/bin/adl"/>
<delete file="${FLEX_HOME}/bin/adl.exe"/>
<delete file="${FLEX_HOME}/bin/adt"/>
<delete file="${FLEX_HOME}/bin/adt.bat"/>
<delete dir="${FLEX_HOME}/include"/>
<delete dir="${FLEX_HOME}/install"/>
<delete dir="${FLEX_HOME}/frameworks/libs/air"/>
<delete dir="${FLEX_HOME}/frameworks/projects/air"/>
<delete file="${FLEX_HOME}/lib/adt.jar"/>
<delete file="${FLEX_HOME}/lib/win/FlashRuntimeExtensions.lib"/>
<delete dir="${FLEX_HOME}/runtimes"/>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${FLEX_HOME}/samples">
<include name="badge/**" />
<include name="descriptor-sample.xml" />
<include name="icons/**" />
</fileset>
</delete>
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${FLEX_HOME}/templates">
<include name="sdk/**" />
<include name="air/**" />
<include name="extensions/**" />
</fileset>
</delete>
</target>
<target name="airframework" description="Clean build of airframework.swc">
<ant dir="${basedir}/projects/airframework"/>
</target>
<target name="airspark" description="Clean build of airspark.swc">
<ant dir="${basedir}/projects/airspark"/>
</target>
<target name="mobilecomponents" description="Clean build of mobilecomponents.swc">
<ant dir="${basedir}/projects/mobilecomponents"/>
</target>
<target name="mobiletheme" description="Clean build of mobile.swc">
<ant dir="${basedir}/projects/mobiletheme"/>
</target>
<target name="charts" description="Clean build of charts.swc">
<ant dir="${basedir}/projects/charts"/>
</target>
<target name="advancedgrids" description="Clean build of advancedgrids.swc">
<ant dir="${basedir}/projects/advancedgrids"/>
</target>
<target name="core" description="Clean build of core.swc">
<ant dir="${basedir}/projects/core"/>
</target>
<target name="framework" description="Clean build of framework.swc and its resource bundles">
<ant dir="${basedir}/projects/framework"/>
</target>
<target name="halo" description="Clean build of halo.swc">
<ant dir="${basedir}/projects/halo"/>
</target>
<target name="mx" description="Clean build of mx.swc and its resource bundles">
<ant dir="${basedir}/projects/mx"/>
</target>
<target name="spark" description="Clean build of spark.swc">
<ant dir="${basedir}/projects/spark"/>
</target>
<target name="sparkskins" description="Clean build of sparkskins.swc">
<ant dir="${basedir}/projects/sparkskins"/>
</target>
<target name="spark_dmv" description="Clean build of sparkskins.swc">
<ant dir="${basedir}/projects/spark_dmv"/>
</target>
<target name="wireframe" description="Clean build of wireframe.swc">
<ant dir="${basedir}/projects/wireframe"/>
</target>
<target name="aeongraphical" description="Clean build of aeongraphical.swf">
<ant dir="${basedir}/themes/AeonGraphical"/>
</target>
<target name="flash_integration" description="Clean build of FlexComponentBase.swc">
<ant dir="${basedir}/projects/flash-integration"/>
</target>
<target name="osmf" description="Clean build of osmf.swc">
<ant dir="${basedir}/projects/osmf"/>
</target>
<target name="rpc" description="Clean build of rpc.swc">
<ant dir="${basedir}/projects/rpc"/>
</target>
<target name="textLayout" description="Clean build of textLayout.swc">
<ant dir="${basedir}/projects/textLayout"/>
</target>
<target name="authoringsupport" description="Clean build of authoringsupport.swc">
<ant dir="${basedir}/projects/authoringsupport"/>
</target>
<target name="javascript" description="Clean build of javascript examples">
<ant dir="${basedir}/javascript"/>
</target>
<target name="automation" description="Clean build of automation swc">
<ant dir="${basedir}/projects/automation"/>
</target>
<target name="automation_air" description="Clean build of automation_air swc">
<ant dir="${basedir}/projects/automation_air"/>
</target>
<target name="automation_dmv" description="Clean build of automation_dmv swc">
<ant dir="${basedir}/projects/automation_dmv"/>
</target>
<target name="automation_flashflexkit" description="Clean build of automation_flashflexkit swc">
<ant dir="${basedir}/projects/automation_flashflexkit"/>
</target>
<target name="automation_spark" description="Clean build of automation_spark swc">
<ant dir="${basedir}/projects/automation_spark"/>
</target>
<target name="automation_airspark" description="Clean build of automation_airspark swc">
<ant dir="${basedir}/projects/automation_airspark"/>
</target>
<target name="automation_agent" description="Clean build of automation_agent swc">
<ant dir="${basedir}/projects/automation_agent"/>
</target>
<target name="tool" description="Clean build of tool swc">
<ant dir="${basedir}/projects/tool"/>
</target>
<target name="tool_air" description="Clean build of tool_air swc">
<ant dir="${basedir}/projects/tool_air"/>
</target>
<target name="apache" description="Clean build of apache.swc">
<ant dir="${basedir}/projects/apache"/>
</target>
<target name="experimental" description="Clean build of experimental.swc">
<ant dir="${basedir}/projects/experimental"/>
</target>
<target name="experimental_mobile" description="Clean build of experimental_mobile.swc">
<ant dir="${basedir}/projects/experimental_mobile"/>
</target>
</project>