views:

78

answers:

4

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.

+2  A: 

Might be a stupid suggestion, but if you want make, why not just use "make"? You can use it for any language by defining the right rules.

Apart from that, I've seen a lot of Flex/Actionscript projects use Apache ant, an XML based build system.

wump
We use both NAnt and msbuild in our environments for Flex (depends on the project.. older ones use NAna, newer ones use msbuild).
Sam
Hmm! Interesting. The only issue for me is getting the system to work with the Flash IDE (Flex has a command-line compiler, but computationally invoking the Flash IDE compiler is a lot harder.) I'd rather not muck around trying to hack the IDE into doing what I want if someone's already made a solution, but I'll be going with this if nothing else gets suggested...
Ender
+1  A: 

As said by wump; why not use Make?

There are some ANT scripts included in the Flex SDK, so you could explore and expand those. I've also spoken to people who use Maven and Cruise Control for automated build process.

Here is some info on Maven Flex: http://code.google.com/p/flex-mojos/

And some info on Cruise Control w/ Flex: http://www.eyefodder.com/blog/2006/05/continuous_integration_with_fl_5.shtml

www.Flextras.com
+1  A: 

Well, there are several options. One I would recommend is the Maven plugin for Flex flex-mojos, now maintained on the Sonotype site. If Maven isn't your cup of tea, they do have an Ant plugin, I don't know if NAnt can call Java Ant tasks directly or not. The third is the most complicated, but Adobe does include an OEM version of the compiler, I believe it comes by default with the SDK download. This is the one I used in the Maven plugin I developed for my company. The reason we didn't use the flex-mojos one basically boils down to a...disagreement about the "Maven way" of one project = one artifact. Their interpretation is that 1 SWF file is one artifact, so is one Maven project. My definition for my project is that all 80+ modules, each a SWF file, are no different than JSPs, all bundled in the same WAR file. So I've got one project with a LOT of modules and 1 maven pom.

mezmo
+2  A: 

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.

Tyler Larson
This is really awesome, but Sprouts doesn't appear to support .FLA compiling yet. :(
Ender