Saturday, July 19, 2008

Compile Flex 3 SDK from the Command Line

Here is a guide to setting up a Flex 3 project so that you can compile it from the command line:

  • download and set up the Flex 3 SDK, make sure the bin/ directory is on your path
  • make a directory for your project
  • in your projects directory make src/ and bin/ directories
  • copy the flex-config.xml from the flex SDK's frameworks directory into the root of your project
  • edit the flex-config.xml in your project, prepending ${flexlib}/ to all the libs/ paths and before the path references to manifest.xml and locale/
  • edit the flex-config.xml in your project, uncommenting the source-path element and setting its path-element element to src
  • create a compile file in the root of your project with the following content:

    Make this file executable.
  • Run the compile script to compile the project. The compiled swf will go to the bin/ directory and can be opened with your browser.

Here is a link to a zipped up version of a project where all the previously described steps have already been done for you (other than setting up the Flex 3 SDK of course).

This information primarily came from Simple Blog.

UPDATE: To use the trial data visualization components you need to copy several files over from a user that has installed flex builder. The instructions on which files and where they need to be placed in your sdk directory can be found here.

UPDATE UPDATE: The good people at Adobe have now made the data visualization components available as a separate download. You can find it here. You can download this archive and unzip it into your sdk and you will be good to go with the data visualization components - you won't need to download flex builder.

2 comments:

  1. Thanks, I just made my compile batch file. This was very helpful.

    hough using flashdevelop is great, sometimes you need to automate everything in one batch file, including compiling and then ftp'ing your files.

    ReplyDelete
  2. hey thanks David! you saved my life :)

    ReplyDelete