Skip to content

Instantly share code, notes, and snippets.

@mildsunrise
Created May 25, 2014 08:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mildsunrise/c3886b7e61c4dba08b6a to your computer and use it in GitHub Desktop.
Save mildsunrise/c3886b7e61c4dba08b6a to your computer and use it in GitHub Desktop.
Building Flash utilities from Flex Falcon under Linux

Building Flash utilities from Flex Falcon, under Linux

Falcon is the next compiler for the Flex framework. The Flash part has interesting utilities that allow for deep parsing of SWFs. We're going to (partially) build Falcon in order to get the JARs containing the utilities.
It's a tricky process, and involves a 180MB download.

We'll need Git, the JDK, Ant and JFlex, so get them:

sudo apt-get install git openjdk-7-jdk ant jflex

Get a snapshot of the Flex SDK (we don't need the whole repo):

wget https://github.com/apache/flex-sdk/archive/develop.tar.gz
tar xzf develop.tar.gz
mv flex-sdk{-develop,}
# we have the 'develop' branch of the SDK under flex-sdk/

Now, enter the directory and [semi]build it:

cd flex-sdk
ant # it won't finish building; don't worry
cd ..

Now, let's clone Falcon and build the Flash part:

git clone git://git.apache.org/flex-falcon.git
cd flex-falcon/compiler
export JFLEX_JAR=/usr/share/java/JFlex.jar
ant # that one should finish correctly

If everything went well, you'll have the compiled JARs at dist.
Pack them:

cd dist
tar cf falcon.tar *

And clear everything:

cd ../../..
mv flex-falcon/compiler/dist/falcon.tar .
rm -rf develop.tar.gz flex-sdk flex-falcon

That's it! You have all the JARs containing the utilities, packed in falcon.tar. Enjoy!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment