Sunday, February 13, 2011

How to build the Flex SDK

Gigantt's UI is built with Adobe Flex 4.1. It's a great web development SDK, but Adobe is notoriously slow to respond to bug reports. So sometimes we find ourselves having to go into the Flex SDK's source code in order to debug stuff or work around bugs. In order to fix a bug in mx:DateField today I had to download and build the SDK (which is open source) from Adobe.
It's not hard, but I thought I'd share the how-to with the world:

How to build the Flex SDK on Windows
(based on Windows 7 64-bit)

  • Java - You'll need the JDK, not just the JRE (the runtime which comes with Flash Builder, for example).
    • I used the 64 bit version:
      "c:\Program Files\Java\jdk1.6.0_23" 
  • Ant - You can download the binaries:
    • I used 1.8.2
    • Just unzip it to c:\dev\ant
  • Flex open-source SDK
    • I used
    • Unzip it to c:\dev\sdk (just for simplcity)
  1. Let's create a batch file to set some useful envars: envars.bat
    set JAVA_HOME=c:\Program Files\Java\jdk1.6.0_23
    set PATH=c:\dev\ant\bin;%PATH%
    set ANT_OPTS=-Xmx256m
    1. Open cmd.exe and run it...
  2. Edit c:\dev\sdk\frameworks\build.xml 
    1. Look for:
      <target name="datavisualization" description="Builds datavisualization.swc">
    2. And fix the location of the manifest file from:
      "${datavis.dir}/manifest.xml" to:
  3. Run Ant:c:\dev\sdk\frameworks> ant
    1. It should end with such a message: BUILD SUCCESSFUL
  4. Now let's tell Flash Builder where to find this new SDK: c:\dev\sdk 
    1. Add it to the "Installed SDKs" settings in Flash Builder
    2. Make sure your project is configured to use this SDK (it was probably created with the original one and still refers to it).
  5. Rebuild your project. It should work.

1 comment:

John Barness said...

Thank you for the information.
I find it useful to know how to build flex SDK on Windows.
I faced the problem when tried to implement the special code into my project connected with virtual data room. Now I know how to deal with that when working with data room providers comparison.

Post a Comment