Adobe Open Source
   Home     Projects     Source     Documentation     Forums    About
Welcome Guest | Sign In
 

How to build and test

Once you have everything configured, building and testing the SDK is easy and fast — it takes only a few minutes. (Fortunately, it's only the first-time setup that requires some effort!)

Selecting what to build

To do a build, first decide whether you want to build the trunk, a branch, or a tag. (Tags are particular releases, such as the 3.0.0.477 release.) Execute

cd flex/sdk/trunk
source setup.sh

in Cygwin (on Windows) or Terminal (on Macintosh). The environment variables JAVA_HOME, ANT_HOME, and PATH are now set properly for working with that particular branch.

Building

When you build, two things happen:

  • First the Java source code for the author-time command-line tools, which is located in the modules directory, is compiled using the J2SDK to create JAR files in the lib directory. This includes the code for the command-line tools mxmlc and compc.
  • Then the ActionScript source code for the runtime framework, which is located in the frameworks/projects directory, is compiled using compc to create SWC files in the frameworks/libs and frameworks/locale directories.

To build everything, execute

ant -q main

The -q option tells the build scripts to produce less output so that you don't get overwhelmed.

You should see output similar to this:

    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
     [echo] Building lib/fdb.jar
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -deprecation for details.
     [echo] Building lib/mxmlc.jar
     [echo] Building lib/mxmlc_ja.jar
     [echo] Building lib/compc.jar
     [echo] Building lib/asdoc.jar
     [echo] Building lib/fcsh.jar
     [echo] Building lib/flex-compiler-oem.jar
     [echo] Building lib/optimizer.jar
     [echo] Building lib/digest.jar
     [echo] Building lib/copylocale.jar

     [java] asDocHelper.abc, 49082 bytes written
     [java] asDocHelper.exe, 647106 bytes written
     [echo] Building lib/flexTasks-internal.jar
     [echo] Building lib/flexTasks.jar
     [echo] Compiling frameworks/libs/framework.swc
     [echo] Compiling frameworks/locale/en_US/framework_rb.swc
     [echo] Compiling frameworks/locale/ja_JP/framework_rb.swc
     [echo] Compiling frameworks/libs/rpc.swc
     [echo] Compiling frameworks/locale/en_US/rpc_rb.swc
     [echo] Compiling frameworks/locale/ja_JP/rpc_rb.swc
     [echo] Compiling frameworks/libs/air/airframework.swc
     [echo] Compiling frameworks/locale/en_US/airframework_rb.swc
     [echo] Compiling frameworks/locale/ja_JP/airframework_rb.swc
     [echo] Compiling frameworks/libs/flex.swc
     [echo] Compiling frameworks/libs/utilities.swc
     [echo] Compiling frameworks/themes/HaloClassic/haloclassic.swc
     [echo] Compiling frameworks/projects/flash_integration/libs/FlexComponentBa
se.swc
     [echo] ant main target completed on 01/31/2008 12:13:33 AM

BUILD SUCCESSFUL
Total time: 2 minutes 19 seconds 

You can ignore the messages about deprecated APIs. As you can see, various JARs and SWCs got built.

Note

The information above allows you to build the Free Adobe Flex SDK and not the individual pieces such as the Open Source Flex SDK or the Adobe Add-ons for Open Source Flex SDK.

As we're optimizing the build scripts for each SDK package, build scripts and instructions will follow maybe even before you see this note!

Testing

To test what you've just built, execute

ant -q checkintests

This will compile two test applications and run them in the standalone Flash Player under our automated testing framework (which we call Mustella).

You'll see a Flash Player window open twice and each application will quickly run as if a very fast user were interacting with it. In the Cygwin or Terminal window, you should see output like

     [echo] launching player and swf
     [echo] compiling checkinapp
     [echo] launching player and swf

BUILD SUCCESSFUL
Total time: 39 seconds

Of course, you can combine building and testing in one Ant command:

ant -q main checkintests

Developing

You should now be able to use the SDK that you just built to compile an application:

cd dev/MyApp
mxmlc MyApp.mxml

Cleaning

To get rid of all the output files created by building and testing, execute

ant -q clean

Switching branches

To work on a different branch, you don't have to open a new shell. Simply cd to the branch and run its setup.sh script:

cd flex/sdk/branches/3.0.x
source setup.sh

If you want to restore JAVA_HOME, ANT_HOME, and PATH to their original settings, start a new shell.

You must be logged in to comment.
Flex SDK Project
Home
About
Versions
Downloads
Source
Bug Database
Submitting a Patch
Developer Documentation
Forums
License
Other Projects
BlazeDS
Cairngorm
Corelib
FlexUnit

More related projects ›
More Adobe projects ›

 
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.6.2 Build:#919 Nov 26, 2007)

Company | Online Privacy Policy | Terms of Use | Contact Us | Accessibility | Report Piracy | Permissions & Trademarks

Copyright @ 2008 Adobe Systems Incorporated.
Use of this website signifies your agreement to the Terms of Use and Online Privacy Policy.
Search powered by Google