forked from apache/flex-tlf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.xml
380 lines (322 loc) · 19.1 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
<!--
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.
-->
<project name="tlf" default="main" basedir=".">
<property file="${basedir}/env.properties"/>
<property environment="env"/>
<property file="${basedir}/build.properties"/>
<!-- Specify a FLEX_HOME in local.properties or
Override on cmd line with -D=FLEX_HOME=path. -->
<property file="${basedir}/local.properties"/>
<!-- Default Flex SDK is the trunk. Override on cmd line with -D=FLEX_HOME=path. -->
<property name="FLEX_HOME" value="${basedir}/../flex-sdk"/>
<echo>FLEX_HOME is ${FLEX_HOME}</echo>
<property name="flex.sdk.frameworks" value="${FLEX_HOME}/frameworks"/>
<property name="flex.locale" value="en_US"/>
<property name="output.dir" value="bin"/>
<property name="output.docs" value="${FLEX_HOME}/tempDoc"/>
<property name="project.uri" value="library://ns.adobe.com/flashx/textLayout"/>
<property name="compc.jvm.args" value="-Xmx384m" />
<property name="textLayout.namespace" value="flashx.textLayout"/>
<property name="asTestApps.dir" value="${basedir}/asTestApps"/>
<property name="textLayout.dir" value="${basedir}/textLayout"/>
<property name="textLayout_editBar.dir" value="${basedir}/sdk/samples/flex/textLayout_editBar"/>
<property name="textLayout_ui.dir" value="${basedir}/sdk/samples/flex/textLayout_ui"/>
<property name="testApps.dir" value="${basedir}/testApps"/>
<property name="automation_core.dir" value="${basedir}/automation_core"/>
<property name="automation_tests.dir" value="${basedir}/automation_tests"/>
<property name="automation_apps.dir" value="${basedir}/automation_apps"/>
<property name="test.dir" value="${basedir}/test"/>
<property name="dbg" value="false"/>
<property name="rel" value="true"/>
<condition property="digest" value="false" else="true">
<istrue value="${debug}"/>
</condition>
<!-- for Flex tags suchs as mxmlc and compc -->
<path id="flexTasks.path">
<fileset dir="${FLEX_HOME}">
<include name="lib/flexTasks.jar" />
<include name="ant/lib/flexTasks.jar" />
</fileset>
</path>
<taskdef resource="flexTasks.tasks" classpathref="flexTasks.path"/>
<target name="all" depends="clean,textLayout, asTestApps,textLayout_editBar, textLayout_ui, testApps, automation_core, automation_tests, automation_apps" description="Clean build of TLF component and associated applications"/>
<target name="main" depends="clean,textLayout" description="Clean build of textLayout.swc"/>
<target name="clean" description="Cleans all SWCs and SWFs">
<delete failonerror="false">
<fileset dir="${output.dir}">
</fileset>
</delete>
<delete dir="${basedir}/bin"/>
<delete file="${basedir}/bundles.properties"/>
</target>
<target name="textLayout" description="Compiles textLayout.swc">
<compc fork="true"
output="${output.dir}/textLayout.swc"
compute-digest="true"
include-classes="flashx.textLayout.CoreClasses flashx.textLayout.EditClasses flashx.textLayout.ConversionClasses">
<jvmarg line="${compc.jvm.args}"/>
<keep-as3-metadata>IMXMLObject</keep-as3-metadata>
<include-namespaces uri="${project.uri}"/>
<namespace uri="${project.uri}" manifest="${textLayout.dir}/manifest.xml"/>
<source-path path-element="${textLayout.dir}/src"/>
<library-path/>
<include-file name="manifest.xml" path="${textLayout.dir}/manifest.xml"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</compc>
</target>
<target name="textLayout_flex" description="Compiles textLayout.swc for Flex SDK">
<compc fork="true"
output="${output.dir}/textLayout.swc">
<jvmarg line="${compc.jvm.args}"/>
<load-config filename="compile-config.xml" />
<arg value="+playerglobal.version=${playerglobal.version}" />
<arg value="+env.PLAYERGLOBAL_HOME=${env.PLAYERGLOBAL_HOME}" />
<arg value="+source.dir=textLayout" />
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</compc>
</target>
<target name="documentation" depends="textLayout" description="Updates textLayout.swc with ASDoc XML">
<condition property="asdoc.jvm.args" value="-Xmx384m">
<os family="windows"/>
</condition>
<condition property="asdoc.jvm.args" value="-Xmx512m">
<os family="mac"/>
</condition>
<condition property="asdoc.jvm.args" value="-Xmx512m">
<os family="unix"/>
</condition>
<delete failonerror="false">
<fileset dir="${output.docs}">
<include name="validation_errors.log"/>
</fileset>
</delete>
<!-- builds ASDoc XML -->
<delete dir="${output.docs}\tempdita" failonerror="false" includeEmptyDirs="true"/>
<asdoc output="${output.docs}" lenient="false" failonerror="true" keep-xml="true" skip-xsl="true" fork="true">
<doc-classes class="flashx.textLayout.CoreClasses"/>
<doc-classes class="flashx.textLayout.EditClasses"/>
<doc-classes class="flashx.textLayout.ConversionClasses"/>
<compiler.source-path path-element="src"/>
<external-library-path dir="${output.dir}/textLayout.swc"/>
<doc-namespaces uri="${project.uri}"/>
<namespace uri="${project.uri}" manifest="manifest.xml"/>
<jvmarg line="${asdoc.jvm.args}"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</asdoc>
<available file="${output.docs}/validation_errors.log" property="asdoc.errors"/>
<fail if="asdoc.errors" message="ASDoc Errors"/>
</target>
<target name="textLayout_editBar" description="Builds textLayout_editBar.swc">
<compc fork="${forkValue}" output="${output.dir}/apps/testApps/bin/textLayout_editBar.swc"
include-classes="EditBarClasses" compute-digest="${digest}">
<source-path path-element="${textLayout_editBar.dir}/src"/>
<jvmarg line="${jvm.args}"/>
<library-path/>
<external-library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<!-- <external-library-path dir="${flex.sdk.frameworks}/libs/" includes="flex.swc" append="true"/> --><!-- for Flex SDK 4.0 -->
<external-library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</compc>
</target>
<target name="textLayout_ui" description="Builds textLayout_ui.swc">
<compc fork="${forkValue}" output="${output.dir}/apps/testApps/bin/textLayout_ui.swc"
include-classes="${textLayout.namespace}.UiClasses,bxf.BxfClasses" compute-digest="${digest}">
<source-path path-element="${textLayout_ui.dir}/src"/>
<jvmarg line="${jvm.args}"/>
<library-path/>
<external-library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<external-library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</compc>
</target>
<target name="testApps" description="Builds TLF test application">
<mxmlc fork="${forkValue}" file="${testApps.dir}/src/flowCss.css"
keep-generated-actionscript="false"
output="${output.dir}/apps/testApps/bin/Flow.swf">
<jvmarg line="${jvm.args}"/>
<library-path/>
<library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<library-path dir="${output.dir}/apps/testApps/bin" includes="textLayout_ui.swc" append="true"/>
<library-path dir="${output.dir}/apps/testApps/bin" includes="textLayout_editBar.swc" append="true"/>
<!-- <library-path dir="${flex.sdk.frameworks}/libs/" includes="flex.swc" append="true"/> --><!-- for Flex SDK 4.0 -->
<library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<library-path dir="${flex.sdk.frameworks}/libs/" includes="flex4.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="spark.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="sparkskins.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="spark_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="flex4_rb.swc" append="true"/>
<static-link-runtime-shared-libraries/>
</mxmlc>
<mxmlc fork="${forkValue}" file="${testApps.dir}/src/Flow.mxml"
keep-generated-actionscript="false"
output="${output.dir}/apps/testApps/bin/Flow.swf">
<default-size width="1100" height="550" />
<jvmarg line="${jvm.args}"/>
<library-path/>
<library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<library-path dir="${output.dir}/apps/testApps/bin" includes="textLayout_ui.swc" append="true"/>
<library-path dir="${output.dir}/apps/testApps/bin" includes="textLayout_editBar.swc" append="true"/>
<!-- <library-path dir="${flex.sdk.frameworks}/libs/" includes="flex.swc" append="true"/> --><!-- for Flex SDK 4.0 -->
<library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="mx_rb.swc" append="true"/> <!-- for Flex SDK 4.5 -->
<library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="spark.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="sparkskins.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="utilities.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="spark_rb.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</mxmlc>
</target>
<target name="asTestApp" description="build a single application in asTestApp" if="output">
<mxmlc fork="${forkValue}"
file="${asTestApps.dir}/src/${output}.as"
output="${output.dir}/apps/asTestApps/bin/${output}.swf">
<source-path path-element="${asTestApps.dir}/src"/>
<jvmarg line="${jvm.args}"/>
<default-size width="1100" height="550" />
<library-path/>
<library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="flex.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="flex4.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="flex4_rb.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</mxmlc>
</target>
<target name="asTestApps" description="builds some applications in asTestApps">
<antcall target="asTestApp">
<param name="output" value="ExplicitFormField"/>
</antcall>
<antcall target="asTestApp">
<param name="output" value="TCMTestFocus2"/>
</antcall>
<antcall target="asTestApp">
<param name="output" value="AliceScroll"/>
</antcall>
<antcall target="asTestApp">
<param name="output" value="KeyLogger"/>
</antcall>
<antcall target="asTestApp">
<param name="output" value="OpHammer"/>
</antcall>
</target>
<target name="automation_core" description="Builds the automation_core.swc">
<compc fork="${forkValue}" output="${output.dir}/apps/automation_apps/bin/automation_core.swc"
include-classes="AutomationCoreClasses">
<source-path path-element="${automation_core.dir}/src"/>
<jvmarg line="${jvm.args}"/>
<library-path/>
<external-library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<!-- External swcs -->
<external-library-path dir="${automation_core.dir}/libs/" includes="flexunit.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</compc>
</target>
<target name="automation_tests" description="Builds the automation_tests.swc">
<compc fork="${forkValue}" output="${output.dir}/apps/automation_apps/bin/automation_tests.swc"
include-classes="AutomationTestClasses">
<source-path path-element="${automation_tests.dir}/src"/>
<jvmarg line="${jvm.args}"/>
<library-path/>
<external-library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<external-library-path dir="${output.dir}/apps/automation_apps/bin" includes="automation_core.swc" append="true"/>
<external-library-path dir="${automation_core.dir}/libs" includes="flexunit.swc" append="true"/>
<!-- External swcs -->
<external-library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="spark.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="sparkskins.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/libs/" includes="utilities.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<external-library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="spark_rb.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</compc>
</target>
<target name="automation_apps" description="Builds the automation test application">
<mxmlc fork="${forkValue}" file="${automation_apps.dir}/src/VellumUnit.mxml"
output="${output.dir}/apps/automation_apps/bin/VellumUnit.swf">
<jvmarg line="${jvm.args}"/>
<library-path/>
<library-path dir="${output.dir}" includes="textLayout.swc" append="true"/>
<library-path dir="${output.dir}/apps/automation_apps/bin" includes="automation_core.swc" append="true"/>
<library-path dir="${output.dir}/apps/automation_apps/bin" includes="automation_tests.swc" append="true"/>
<library-path dir="${automation_core.dir}/libs" includes="flexunit.swc" append="true"/>
<!-- External swcs -->
<library-path dir="${flex.sdk.frameworks}/libs/mx/" includes="mx.swc" append="true"/><!-- for Flex SDK 4.5 -->
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="mx_rb.swc" append="true"/> <!-- for Flex SDK 4.5 -->
<library-path dir="${flex.sdk.frameworks}/libs/" includes="framework.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="rpc.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="spark.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="sparkskins.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/libs/" includes="utilities.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="framework_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="rpc_rb.swc" append="true"/>
<library-path dir="${flex.sdk.frameworks}/locale/${flex.locale}/" includes="spark_rb.swc" append="true"/>
<static-link-runtime-shared-libraries/>
<define name="CONFIG::debug" value="${dbg}"/>
<define name="CONFIG::release" value="${rel}"/>
</mxmlc>
<html-wrapper title="VellumUnit" file="VellumUnit.html"
application="VellumUnit"
swf="VellumUnit"
width="1100"
height="800"
output="${output.dir}/apps/automation_apps/bin" />
<copy todir="${output.dir}/apps/test">
<fileset dir="${test.dir}">
<include name="**/*.*"/>
</fileset>
</copy>
</target>
</project>