Install Flex SDK under Ubuntu Linux
Today i want to install the Flex SDK, because i need it for compiling OpenLaszlo sourcecode to an AIR application.
The first thing we need is the Flex SDK. Download it here:
and extract it within your home-folder.
cd ~/ unzip flex_sdk_4.zip -d tempflex
While the processing of this, you can begin the next step.
The Flex SDK requires Sun Java for compiling the SWF binaries, so if you haven’t already, install Java. If you aren’t sure if java is already installed, you can also try the following command that install java on your system:
sudo apt-get install java-package sun-java6-jdk
Wait a several minutes while the packages download and install, then agree the Sun’s license.
Now you must decide where do you want to place the installation of Flex SDK. Often optional software installations are placed within the ‘opt’ directory at the root of your system. Because i’m the only user on my system, and also i’ve mount my home directory on a seperatly partition, i prefer to place my optional sotfware within my home directory. Also i create the needed directory within my software directory and move the flex files to the new directory:
mkdir ~/Software/flex -p mv ~/tempflex/* ~/Software/flex/
Finally for making all the required commands available, from each path of your system, you must edit your ‘.bashrc’ in your home folder. It is also necessary, if you haven’t already done it, to add the LPS home directory and the LZX compiler path. Just type the following command to do this direct from the shell:
Now you must add these rows into the .bashrc:
# Make the FLEX compiler available export PATH=/home/thomas/Software/flex_sdk_4.5/bin:$PATH # Export the LPS home directory export LPS_HOME=/home/thomas/Software/OpenLaszlo/lps-root # Make the LZX compiler available export PATH=/home/thomas/Software/OpenLaszlo/lps/bin:$PATH
Save the file and close the text editor. After that you must exit all open terminal windows, then opening a new one. Now should be all commands available that you need..
You can check if your Flex SDK installation was successful, by run the following command:
Is the result something like:
Version 4.5.0 build 20967
..you do all right!