Search code examples
actionscript-3flashapache-flex

"Make" system for Actionscript?


In working on larger Actionscript/Flash projects, I've started to really feel the need for some kind of "make" system, but I haven't found it yet. Does anyone know if it exists?

Required features:

  • Ability to associate SWCs with their source code and/or FLAs i.e. "this swc is compiled from this source"
  • Ability to mark my current project as depending on these SWCs (either as compile-time or runtime libraries)
  • A single, big shiny button, that when pressed does the following:
    • Checks to see if any of the source files have changed, and if so, recompiles their associated SWCs
    • Recompiles and relinks the main .swf, if necessary
    • Runs the main .swf

Have yet to find a way to get something like FlashDevelop to do this (but I don't know it well enough to be sure). Support for both code and FLA sources is preferred.


Solution

  • You are looking for http://projectsprouts.org/ which is based on Rake the Ruby version of Make. It can do all of that stuff and much more.

    If you have Ruby and RubiGems installed which I think are installed by default on Macs you can install it by typing this into your command line.

    sudo gem install Sprout

    It will take a while because it installs many things. After this is all set you can create a project like this.

    sprout -n as3 ProjectName

    and then build it with this,

    rake deploy

    It manges things based on the runtime they are created for, this project was created for as3 but all of the other types of projects also. The build scripts are all writen in Ruby and can be modified to involve more complex multi-step compiles pretty simply. It also has a bunch of generators so that classes automaticly have unit test that are associated with them and many other features.