SCons tools for Flex SDK projects

SCons tools for building Flex SDK applications and components, and for wrapping swfs in HTML. This is something like Flex Ant Tasks, just different.

Short example

To compile and wrap an application with default options you could write a following SConscript:

env = Environment(
	tools = ['default', 'flex', 'wrapper'],
	toolpath = ['/path/to/the/tools/dir'],
	FLEX = '/path/to/flex/sdk')
 
env.FlexApplication('myapp.mxml')
env.WrapInHtml('myapp.swf')

and then just type "scons" in the folder with the SConscript and the application.

Wrapper uses swfobject on default, so you'll need to unpack it to the same directory to view the generated page in a browser.

Pros & cons

Pros:

  • dependency discovery (rebuild only what's necessary),
  • wrapping using different techniques (swfobject, Adobe's templates or jQuery Flash Plugin),
  • SCons script format is quite concise,
  • SCons scripts are simply Python, what makes extending easy.

Cons:

  • dependency scanning is naive, completely does not take context into account (for example: an import directive in a comment may add a dependency),
  • there are many ways of using the SDK compilers that the tools do not encompass.

How to get it

Tarred and bzipped or zipped along with some samples and documentation.

You can also checkout the current version using Bazaar client:

bzr checkout http://www.wrwrwr.org/bazaar/SCons/trunk