My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
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
<?xml version="1.0" encoding="UTF-8"?>
<!-- *************************************************************************************
FDTKit Buildfile v3.2.9

Mar 13, 2008 - jason m horwitz | Sekati LLC | sekati.com

Released under the MIT License: http://www.opensource.org/licenses/mit-license.php

@see http://fdtkit.googlecode.com/
@see http://inde.googlecode.com/
@see http://sekati.googlecode.com/
@see http://sasapi.googlecode.com/

@note Targeted for INDE/FDTKit this Buildfile can be used in standard Eclipse/FDT.

@info You *must* run this Buildfile in the same JRE as the workspace. To configure
this: Run -> External Tools -> JRE -> Run in the same JRE as the workspace

@usage 1. Copy build.xml file to your project root directory.
2. Copy build/build.properties file to your project/build directory.
3. Edit the build.xml project name attribute to reflect your project name.
4. Edit the project/build/build.properties file to reflect your project settings.
5. Edit the build.xml "build" target to point to the appropriate compile antcall.
6. Add the build file to eclipse via the Ant panel view.
7. Run the "create_project_structure" task to create a generic project structure.

@warn If using the "player-preview" task to preview the compiled swf in the debug
player you will need to add your workspace as an allowed location in the flash
security preference panel (which will pop up) and make sure compiler.use-network
is set false.

************************************************************************************* -->

<project name="Sekati API" default="build" basedir=".">


<!-- DEFINITIONS -->
<property file="/Applications/inde/workspace/fdtkit/build/default.properties"/>
<property file="build/build.properties"/>


<!-- RESOURCE -->
<taskdef resource="flexTasks.tasks" classpath="${FLEX_HOME}/ant/lib/flexTasks.jar" />


<!-- ****************************************************************
CUSTOMIZE BEGINS
**************************************************************** -->


<target name="build" description="Default Project Build" depends="verify-properties">
<!-- COMPILE OPTION -->

<antcall target="compile-flash"/>

<!--
- SELECT A COMPILE OPTION FROM THE LIST BELOW -
<antcall target="compile-flash"/>
<antcall target="compile-flash-fla"/>
<antcall target="compile-flex"/>
<antcall target="compile-flex-debug"/>
<antcall target="compile-swc"/>
-->

<!-- PREVIEW OPTION -->



<!--
- SELECT A PREVIEW OPTION FROM THE LIST BELOW -
<antcall target="preview-player"/>
<antcall target="preview-browser"/>
<antcall target="preview-wrapper"/>
-->
</target>


<!-- ****************************************************************
CUSTOMIZE ENDS
**************************************************************** -->


<!-- BUILD AUTOMATION -->

<target name="api-production-prep" description="Put the current build of the API into production (compile swc, asdocs, deploy via rsync and ready for svn commit)">
<echo>SEKATI API :: [ Package + Deploy ] >>></echo>
<antcall target="compile-swc"/>
<antcall target="doc-asdoc"/>
<antcall target="deploy-project"/>
</target>


<target name="automate-doc-rollout" description="A batch target to generate and deploy documentation (customize to your needs)">
<antcall target="doc-clean"/>
<antcall target="doc-asdoc"/>
<antcall target="deploy-documentation"/>
</target>


<target name="automate-compile-rollout" description="A batch target to compile and deploy project (customize to your needs)">
<antcall target="compile-flex"/>
<antcall target="deploy-project"/>
</target>


<!-- *************************************************************************************
INTERNAL TARGETS BELOW
************************************************************************************* -->


<!-- AS3 COMPILATION -->


<target name="compile-flex" description="mxmlc compile">
<echo>FDTKit Flex Compiler [no-debug] -></echo>
<antcall target="compile-mxmlc-advanced">
<param name="compiler.debug" value="false"/>
</antcall>
</target>


<target name="compile-flex-debug" description="mxmlc debug compile">
<echo>FDTKit Flex Compiler [debug] -></echo>
<antcall target="compile-mxmlc-advanced">
<param name="compiler.debug" value="true"/>
</antcall>
</target>


<target name="compile-mxmlc-advanced" description="Compile project.class with the mxmlc compiler using advanced build.properties options">
<echo>FDTKit MXMLC Compiler [advanced] -> ${project.class}: ${project.swf}</echo>
<mxmlc
file="${project.class}"
output="${project.swf}"
compiler.as3="${compiler.as3}"
compiler.optimize="${compiler.optimize}"
compiler.strict="${compiler.strict}"
actionscript-file-encoding="${compiler.encoding}"
keep-generated-actionscript="${compiler.keep-generated-as}"
incremental="${compiler.incremental}"
benchmark="${compiler.benchmark}"
debug="${compiler.debug}"
use-network="${compiler.use-network}"
warnings="${compiler.warnings}"
default-background-color="${project.bgcolor}">
<default-size width="${project.width}" height="${project.height}" />
<metadata title="${project.meta.title}" description="${project.meta.description}" date="${project.meta.date}">
<contributor name="${project.meta.contributor}" />
<creator name="${project.meta.creator}" />
<publisher name="${project.meta.publisher}" />
</metadata>
<compiler.external-library-path dir="${lib.dir}">
<include name="**/*.swc" />
<include name="${project.lib.linked0}" />
<include name="${project.lib.linked1}" />
<include name="${project.lib.linked2}" />
<exclude name="${project.lib.exclude0}" />
<exclude name="${project.lib.exclude1}" />
<exclude name="${project.lib.exclude2}" />
</compiler.external-library-path>
<load-config filename="${compiler.config}"/>
</mxmlc>
</target>


<target name="compile-mxmlc-basic" description="Compile project.class with the mxmlc compiler using the default options">
<echo>FDTKit MXMLC Compiler [basic] -> ${project.class}: ${project.swf}</echo>
<exec executable="${mxmlc.exe}" failonerror="true">
<arg line ="-output ${project.swf}" />
<arg line ="${project.class}" />
</exec>
</target>


<target name="compile-swc" description="Compile project.swc.source in to an SWC library file">
<echo>FDTKit SWC Compiler -> ${project.swc.source}: ${project.swc}</echo>
<compc output="${project.swc}" locale="${flex3sdk.locale}" debug="${project.swc.debug}">
<source-path path-element="${src.dir}" />
<include-sources dir="${project.swc.source}">
<include name="*"/>
<exclude name="**/.svn"/>
<exclude name="${project.swc.exclude0}"/>
<exclude name="${project.swc.exclude1}"/>
<exclude name="${project.swc.exclude2}"/>
</include-sources>
<external-library-path dir="${lib.dir}" append="true">
<include name="tweener.swc" />
</external-library-path>
<external-library-path dir="${flex3sdk.lib.dir}" append="true">
<include name="flex.swc" />
<include name="framework.swc" />
<include name="rpc.swc" />
<include name="utilities.swc" />
</external-library-path>
<metadata title="${project.meta.title}" description="${project.meta.description}" date="${project.meta.date}">
<contributor name="${project.meta.contributor}" />
<creator name="${project.meta.creator}" />
<publisher name="${project.meta.publisher}" />
</metadata>
</compc>
</target>


<!-- IDE FLA COMPILATION -->


<target name="compile-flash" description="Compile the currently opened FLA with the Flash IDE">
<echo>FDTKit Flash IDE Compiler -></echo>
<echo message="|*|*|*| class cache clear | source save | compiler start |*|*|*|"/>
<exec executable="open">
<arg line="${compile.jsfl}"/>
</exec>
</target>


<target name="compile-flash-fla" description="Compile project.fla with the Flash IDE">
<echo>FDTKit Flash IDE Compiler -> ${project.fla}</echo>
<fdt.flashCompile>
<fileset dir="${src.dir}">
<include name="${project.fla}"/>
</fileset>
</fdt.flashCompile>
</target>


<target name="compile-flash-lib" description="Compile all FLA's in lib.dir with the Flash IDE">
<echo>FDTKit Flash IDE Compiler -> ${libs.dir}</echo>
<fdt.flashCompile>
<fileset dir="${lib.dir}">
<include name="*.fla"/>
</fileset>
</fdt.flashCompile>
</target>


<target name="compile-flash-src" description="Compile all FLA's in src.dir with the Flash IDE">
<echo>FDTKit Flash IDE Compiler -> ${src.dir}</echo>
<fdt.flashCompile>
<fileset dir="${src.dir}">
<include name="*.fla"/>
</fileset>
</fdt.flashCompile>
</target>


<target name="compile-flash-tests" description="Compile all FLA's in tests.dir with the Flash IDE">
<echo>FDTKit Flash IDE Compiler -> ${tests.dir}</echo>
<fdt.flashCompile failonerror="false">
<fileset dir="${tests.dir}">
<include name="*.fla"/>
</fileset>
</fdt.flashCompile>
</target>


<!-- PREVIEW -->


<target name="preview-player" description="View the project.swf in the debug Flash Player">
<echo>FDTKit Player Preview -> ${player.args}: ${project.swf}</echo>
<exec executable="${swfviewer.exe}" spawn="false">
<arg line="${flashplayer.exe}"/>
<arg line="${project.swf}"/>
</exec>
<!--
<exec executable="${sys.open}" spawn="false">
<arg line="${flashplayer.exe}"/>
<arg line="${project.swf}"/>
</exec>
-->
</target>


<target name="preview-browser" description="View the project.preview.url in the Browser">
<echo>FDTKit Brower Preview -> ${browser.args}: ${project.preview.url}</echo>
<exec executable="${sys.open}" spawn="true">
<arg line="${browser.args}"/>
<arg line="${project.preview.url}"/>
</exec>
</target>


<target name="preview-wrapper" description="View the generated-wrapper in the Browser">
<echo>FDTKit Wrapper Preview -> ${browser.args}: file://${TEMP_DIR}/${project.swf.prefix}/index.html</echo>
<antcall target="generate-wrapper"/>
<exec executable="${sys.open}" spawn="true">
<arg line="${browser.args}"/>
<arg line="file://${TEMP_DIR}/${project.swf.prefix}/index.html"/>
</exec>
</target>


<!-- DOCUMENTATION -->


<target name="doc-asdoc" description="Generate AS3 Documention from the src.dir using ASDoc">
<echo>FDTKit Generating ASDoc Documentation -> ${src.dir}</echo>
<exec executable="${asdoc.exe}" failonerror="false">
<arg line ="-source-path ${src.dir}" />
<arg line='-source-path ${project.lib.linked0}'/>
<arg line='-source-path ${project.lib.linked1}'/>
<arg line='-source-path ${project.lib.linked2}'/>
<arg line='-external-library-path "${lib.dir}/tweener.swc"' />
<arg line='-doc-sources ${src.dir}/.'/>
<arg line='-warnings=${doc.asdoc.warnings}'/>
<arg line="-templates-path '${flex3sdk}/asdoc/templates'"/>
<arg line="-main-title ${doc.asdoc.maintitle}"/>
<arg line="-window-title ${doc.asdoc.windowtitle}"/>
<arg line="-footer ${doc.asdoc.footer}"/>
<arg line='-output ${docs.dir}'/>
<arg line='-exclude-classes=${doc.asdoc.excludes}'/>
</exec>
<copy todir="${docs.dir}/images">
<fileset dir="${flex3sdk}/asdoc/templates/images" excludes="**/.svn"/>
</copy>
</target>


<target name="doc-asdoc-graph" description="Generate an ASDoc XML file from the src.dir for use with graphviz to create dot diagrams">
<echo>FDTKit Generating ASDoc Graph XML -> ${src.dir}</echo>
<exec executable="${asdoc.exe}" failonerror="false">
<arg line = "-source-path ${src.dir}" />
<arg line='-doc-sources ${src.dir}'/>
<arg line='-output ${docs.dir}/graph'/>
<arg line="-keep-xml"/>
<arg line="-skip-xsl"/>
<arg line="-show-actionscript-warnings=false"/>
<arg line="-templates-path '${flex3sdk}/asdoc/templates'"/>
</exec>
</target>

<target name="doc-clean" description="Remove any existing Documentation from docs.dir">
<echo>FDTKit Cleaning Documentation -> ${docs.dir}</echo>
<defaultexcludes echo="true"/>
<delete includeemptydirs="true">
<fileset dir="${docs.dir}" includes="**/*" excludes="**/.svn"/>
</delete>
</target>


<!-- DEPLOYMENT-->


<target name="deploy-project" description="Deploy the project from deploy.local.dir to the remote project server using rsync+ssh">
<echo>FDTKit Deploying Project -> ${deploy.local.dir}</echo>
<exec executable="${rsync.exe}">
<arg value="-ave ssh"/>
<arg value="--delete"/>
<arg value="--force"/>
<arg value="--progress"/>
<arg value="--exclude=${deploy.local.excludes}"/>
<arg value="${deploy.local.dir}"/>
<arg value="${deploy.remote.user}@${deploy.remote.host}:${deploy.remote.dir}"/>
</exec>
</target>


<target name="deploy-documentation" description="Deploy the documentation from deploy.local.doc.dir to the remote documentation server using rsync+ssh">
<echo>FDTKit Deploying Documentation -> ${deploy.local.doc.dir}</echo>
<exec executable="${rsync.exe}">
<arg value="-ave ssh"/>
<arg value="--delete"/>
<arg value="--force"/>
<arg value="--progress"/>
<arg value="--exclude=${deploy.local.excludes}"/>
<arg value="${deploy.local.doc.dir}"/>
<arg value="${deploy.remote.user}@${deploy.remote.host}:${deploy.remote.doc.dir}"/>
</exec>
</target>


<target name="deploy-backend" description="Deploy the project backend from deploy.local.backend.dir to the remote project server using rsync+ssh">
<echo>FDTKit Deploying Backend -> ${deploy.local.sbackend.dir}</echo>
<exec executable="${rsync.exe}">
<arg value="-ave ssh"/>
<arg value="--delete"/>
<arg value="--force"/>
<arg value="--progress"/>
<arg value="--exclude=${deploy.local.excludes}"/>
<arg value="${deploy.local.backend.dir}"/>
<arg value="${deploy.remote.user}@${deploy.remote.host}:${deploy.remote.backend.dir}"/>
</exec>
</target>


<!-- SANITY CHECK -->


<target name="verify-properties">
<fail unless="FDTKIT_HOME">The "FDTKIT_HOME" property must be set in build/build.properties.</fail>
</target>


<!-- MISCELLANY -->


<target name="generate-wrapper" description="Generate a project.swf HTML wrapper in the TEMP_DIR">
<property name="wrapper.dir" value="${TEMP_DIR}/${project.swf.prefix}"/>
<echo>FDTKit Generating Wrapper -> ${wrapper.dir}</echo>
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${wrapper.dir}" includes="**/*" excludes="**/.svn"/>
</delete>
<mkdir dir="${wrapper.dir}"/>
<html-wrapper
title="${ant.project.name}"
width="${project.wrapper.width}"
height="${project.wrapper.height}"
bgcolor="${project.wrapper.bgcolor}"
application="${project.wrapper.name}"
swf="${deploy.dir}/${project.swf.prefix}"
version-major="${project.version.major}"
version-minor="${project.version.minor}"
version-revision="${project.version.revision}"
history="${project.wrapper.history}"
template="${project.wrapper.template}"
output="${wrapper.dir}"
/>
<!--
<copy todir="${wrapper.dir}">
<fileset file="${project.swf}" excludes="**/.svn"/>
</copy>
-->
</target>


<target name="create-structure" description="Create a generic project directory structure.">
<echo>FDTKit Creating Project Structure -></echo>
<mkdir dir="${build.dir}"/>
<echo message="Creating: ${build.dir}"/>
<mkdir dir="${deploy.dir}"/>
<echo message="Creating: ${deploy.dir}"/>
<mkdir dir="${deploy.admin.dir}"/>
<echo message="Creating: ${deploy.admin.dir}"/>
<mkdir dir="${deploy.assets.dir}"/>
<echo message="Creating: ${deploy.assets.dir}"/>
<mkdir dir="${deploy.css.dir}"/>
<echo message="Creating: ${deploy.css.dir}"/>
<mkdir dir="${deploy.js.dir}"/>
<echo message="Creating: ${deploy.js.dir}"/>
<mkdir dir="${deploy.php.dir}"/>
<echo message="Creating: ${deploy.php.dir}"/>
<mkdir dir="${deploy.xml.dir}"/>
<echo message="Creating: ${deploy.xml.dir}"/>
<mkdir dir="${docs.dir}"/>
<echo message="Creating: ${docs.dir}"/>
<mkdir dir="${lib.dir}"/>
<echo message="Creating: ${lib.dir}"/>
<mkdir dir="${lib.assets.dir}"/>
<echo message="Creating: ${lib.assets.dir}"/>
<mkdir dir="${lib.comps.dir}"/>
<echo message="Creating: ${lib.comps.dir}"/>
<mkdir dir="${lib.fonts.dir}"/>
<echo message="Creating: ${lib.fonts.dir}"/>
<mkdir dir="${lib.ia.dir}"/>
<echo message="Creating: ${lib.ia.dir}"/>
<mkdir dir="${tests.dir}"/>
<echo message="Creating: ${tests.dir}"/>
<mkdir dir="${src.dir}"/>
<echo message="Creating: ${src.dir}"/>
<echo message="Project Structure Created Successfully! Now refresh your project in Eclipse (right click on the project and select 'Refresh')"/>
</target>


<target name="sloc-count" description="Count the source lines of code in src.dir">
<exec executable="${sloccount.sh}" />
</target>


<!--
<target name="input-test">
<input
message="Do you want something?"
validargs="yes,no"
addproperty="do.delete"
/>
<condition property="do.abort">
<equals arg1="no" arg2="${do.delete}"/>
</condition>
<fail if="do.abort">Build aborted by user.</fail>
</target>
-->


</project>

Change log

r293 by sekati on Oct 18, 2008   Diff
coming close to tagged 3.0.3.9 - cleanup
in progress.
Go to: 
Project members, sign in to write a code review

Older revisions

r285 by sekati on Oct 3, 2008   Diff
Buildfile edit
r254 by sekati on Sep 13, 2008   Diff
API UPDATE: 3.0.3.2 - "Mothra"
- moved sekati.swc to lib/
- adjusted buildfile, removed useless
lib/swc directory
- added auto-hotkey for
...
r170 by sekati on May 12, 2008   Diff
Added Profiler sketch
All revisions of this file

File info

Size: 17635 bytes, 484 lines
Powered by Google Project Hosting