incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik de Bruin <e...@ixsoftware.nl>
Subject A newbie's guide to building the SDK (and a question)
Date Sat, 21 Jan 2012 17:05:53 GMT
Hi,

As noted in an earlier mail, I'm a total newbie where it comes to
building and developing with the Open Source SDK. Today I gathered the
courage to check out the 'frameworks' source from the repo and follow
the instructions in README.txt. While this file contains a lot details
(thanks, Alex!), I still had to Google some steps to get it to work
(remember: newbie). I thought I'd try and save my fellow 'starters'
some of this trouble, and write out the entire process as I
experienced it:

(Note: this all takes place on my Mac with OSX 10.7. Your mileage may
(will!) vary on other versions and especially OS-es)

Software to install:
- your Subversion software of choice (I use Cornerstone)
- Java: OSX comes with a 'built-in' Java, which worked for me.
- Ant; I used the 1.7.0 binairies
(http://archive.apache.org/dist/ant/binaries/) as suggested. I
unpackaged the .gz and put that entire folder in 'usr/local'. This
seemed like the right place, don't know if it is, or if there even is
such a thing, as long as you remember the path?
- vanilla Flash Builder 4.6
- Open Source Flex SDK. I downloaded it from
http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4.6 and
unpackaged it to the 'Applications/Adobe Flash Builder 4.6/sdks'
folder. I gave it the new (temporary, I'm sure) name '4.6.5.0001'.
Seems like any name will do, as long as you remember the path for use
later on.
- copy "flexTasks.JAR" from 'Applications/Flash Builder
4.6/sdks/4.6.5.0001/ant/lib' to '/usr/local/apache-ant-1.7.0/libs'

On to the configuration:

- environment variables go into this file: /etc/bashrc
I added this block:
# Flex SDK build variables
# Java
export JAVA_HOME=$(/usr/libexec/java_home)								
# Ant
export ANT_HOME=/usr/local/apache-ant-1.7.0
export ANT_OPTS="-Xmx1024m"
export PATH=${PATH}:${ANT_HOME}/bin

- PATH variables are in this file: /etc/paths
I added this block:
# bin directory of Java
/Library/Java/home/bin
# bin directory of Ant
/usr/local/ant/bin
# bin directory of Flex SDK
/Applications/Adobe Flash Builder/sdks/4.6.5.0001/bin

- empty the  'Applications/Flash Builder 4.6/sdks/4.6.5.0001/frameworks' folder

Get the source:
- grab a working copy of the
'https://svn.apache.org/repos/asf/incubator/flex/trunk/frameworks'
repo and put it in your local (just emptied) 'frameworks' folder.

Now for the fun part:
- open Terminal, ls to the 'Applications/Flash Builder
4.6/sdks/4.6.5.0001/frameworks' folder and enter the following
command: "ant -f build_framework.xml". This will download some third
party code (this takes a couple of minutes) and then builds the SDK.
When done, you see the lovely words "BUILD SUCCESSFUL".

I went into the Flash Builder preferences and added the new SDK,
create a new Web Project, added a Label to Main.mxml ("Hello world"
:-P) and tried to run it. This failed. Turns out that at the date of
writing, some build configuration hasn't been fine tuned, so you need
one last step: rename 'Applications/Flash Builder
4.6/sdks/4.6.5.0001/frameworks/libs/player/11.0' to
'Applications/Flash Builder
4.6/sdks/4.6.5.0001/frameworks/libs/player/11.1' (yes, from 11.0 to
11.1, in short). Tried to run it and voila! Bullseye! We have liftoff!

HTH, and good luck!



Question: is it usual and useful to build the SDK directly into the
Flash Builder application (under 'sdks') directory? It seems to me
like a handy thing to do: when you build, you can use it straight
away...



Erik



-- 
Ix Multimedia Software

Jan Luykenstraat 27
3521 VB Utrecht

T. 06-51952295
I. www.ixsoftware.nl

Mime
View raw message