Friday, December 04, 2009

Linux: Installing the Flex SDK

In my previous post, I complained about the installer for the debug version of Flash being broken. It turns out that the Flex SDK is broken too. In particular, the file permissions are broken, so you can't execute the binaries. Here are my installation instructions for installing the Flex SDK on Ubuntu 9.10:
  cd /usr/local
mkdir flex_sdk_3.4
cd flex_sdk_3.4
unzip ~jj/Downloads/flex_sdk_3.4.0.9271_mpl.zip
find . -type f -exec chmod 644 '{}' \;
find . -type d -exec chmod 755 '{}' \;
chmod 755 bin/*
apt-get install tofrodos
find bin \( \! -name '*.exe' -a -type f \) -exec dos2unix '{}' \;
Now, as your normal user, add /usr/local/flex_sdk_3.4/bin to your PATH.

Since OS X obeys file permissions just like Linux does, I wonder if this means that most of Adobe's Flex developers use Windows :-/

Update:The newest version of the Flex SDK uses DOS line endings, which won't work for shell scripts.

4 comments:

Shannon -jj Behrens said...

By the way, if you run ant, that won't work either:

$ /usr/local/apache-ant-1.7.1/bin/ant
Buildfile: build.xml

create-description:

templates-clean:

prepare-html-templates:

BUILD FAILED
/usr/local/flex_sdk_3.4/build.xml:1128: Warning: Could not find file /usr/local/flex_sdk_3.4/templates/html-templates/metadata/AC_OETags.js to copy.

Total time: 0 seconds

Rajesh said...

thanks,

the last line did the trick for me:

find bin \( \! -name '*.exe' -a -type f \) -exec dos2unix '{}' \;

before that i was getting some strange "bad interpreter" message when trying to run mxmlc.

rajesh

Shannon -jj Behrens said...

I upgraded to version 3.5, and the same hacks were necessary. I've sent a couple notes to Adobe, but they just ignored me.

Shannon -jj Behrens said...

In newer versions of tofrodos, use fromdos instead of dos2unix.