Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ant - replace fb.exportReleaseBuild with mxmlc and compc

I have a complex Flash Builder workspace with 18 Flex Library projects and 1 AS3 application project, where there are many dependencies between them.

I've created an ANT build.xml file for automatic builds, however I use ANT task from Flash Builder itself:

<fb.exportReleaseBuild project="..." destdir="..." failonerror="true" />

It works, but it brings some disadvantages:

  • no debug build
  • Flash Builder needs to be installed (not available on Linux server)

So my question: Is there an easy way how to rewrite this fb.exportReleaseBuild ANT task to little tasks by project with mxmlc and compc?

Each swc project has like 4 other swc dependencies and other external assets that needs to be linked for embedding.

like image 933
mizi_sk Avatar asked Jan 10 '12 18:01

mizi_sk


1 Answers

I don't know how does fb.exportReleaseBuild task work, but I guess this might help you to achieve some similar task in unix platform, if you are using flexbuild 4 or later.

see help link in adobe online doc

You can use '-dump-config' option to dump the settigns taht mxmlc or compc compiler used into a file, and then use '-load-config' option to load it from unix platform. Detail steps are just copied from the link before:

  1. In Flash Builder, select Project > Properties > Flex Compiler
  2. In Additional Compiler Arguments, specify the following argument: -dump-config pathname, where pathname specifies the absolute path to a file on your system.
  3. Apply the changes in the Project window. The compiler settings are written to the specified file. Remove the -dump-config argument after you have verified that the file has been written.
  4. Modify the configuration settings as necessary. In your build script, run the compiler so it includes the saved compiler settings:
  5. mxmlc -load-config pathname
like image 105
Villa Avatar answered Sep 25 '22 13:09

Villa