I compiled open source Adobe Flex SDK 3.5.0.12683 on Windows the other day – and today did the same thing on my MacBook. Since the journey from source to jar file was rather convoluted, I decided to document all the steps. Also my steps differ a bit from the recommended steps.
First download the Open Source Flex SDK 3.5.0.12683. Do not be tempted to download the zipped file from the webpage. A much needed file, setup.sh, is not present in that particular package. Funny that. Instead use svn. To install svn just enter:
sudo port install subversion
Then create the directory you want to use for Flex and cd it. To checkout the SDK source type:
svn co http://opensource.adobe.com/svn/opensource/flex/sdk/tags/3.5.0.12683
After waiting for svn to finish you should now have all the source code. Next you’re ready for the editing of setup.sh. It’s located at the root of your downloaded SDK source. Open the file (I used aquamacs but you can use your favorite editor) and point the script in the right direction of your ANT_HOME folder and your JAVA_HOME folder. I keep the two environment variables in my .profile by the way.
If you don’t have Ant, you’ll need to download and install it as well. Ant on OS X 10.6.2 is easily installed like this. Finally save your changes of setup.sh.
Next tell the Terminal all about the required paths for the coming ant build by issuing this:
source setup.sh
Now you’re almost ready to run the ant build. But before you do, you have to make sure that the Flash tests at the end of the ant build work properly. They also look rather impressive, I might add, so it’s a bad thing to miss. For testing, the Flash Player’s mm.cfg file must have the following entries
ErrorReportingEnable=1
TraceOutputFileEnable=1
and a FlashPlayerTrust file must allow local SWFs to access local files.
To ensure this, copy the files from Adobes to-do. I had to use “/User/myuser/” instead of just “/” to get the tests to work without a security sandbox violation.
That’s it! The Terminal is ready for the ant build. Do a:
ant main checkintests
and watch the build fireworks. You now have a complete mxmlc open source environment. Use it to compile some SWFs.
I needed swfdump.jar on my Windows box today. Per default the file is not in the bin folder of Adobe Flex SDK 3.5.0.12683 – so I discovered that I had to build the file all the way from source. Since the journey from source to jar file was rather convoluted, I decided to document all the steps. Also my steps differ a bit from the recommended steps.
First download the Open Source Flex SDK 3.5.0.12683. Do not be tempted to download the zipped file from the webpage. A much needed file, setup.sh, is not present in that particular package. Funny that. Instead use svn (if you don’t have a command line edition of subversion, I recommend Sliksvn). Create the directory you want to use for Flex and cd it. To checkout the source type:
svn co http://opensource.adobe.com/svn/opensource/flex/sdk/tags/3.5.0.12683
After waiting for svn to finish you should now have all the source code. Next you need to install cygwin. Since you’re on a Windows box, you’ll need cygwin to run the setup.sh script. Can’t be done without it. So get cygwin setup.exe and do a standard installation. I installed nano as an easy editor as well.
Now you’re ready for the editing of setup.sh. It’s located at the root of your downloaded SDK source. Open the file (I used nano but you can use your favorite editor) and point the script in the right direction of your ANT_HOME folder and your JAVA_HOME folder. If you have neither, you’ll need to download and install Ant and Java SDK as well. Finally save your changes of setup.sh.
Next tell cygwin all about the required paths for the coming ant build by issuing this in cygwin:
source setup.sh
At this point I got an error: $’\r’: command not found. Apparently cygwin is getting halted by dos carriage returns in the script. But don’t worry. To remedy this, you issue the line:
dos2unix setup.sh
Now you’re almost ready to run the ant build. But before you do, you have to make sure that the Flash tests at the end of the ant build work properly. They also look rather impressive, I might add, so it’s a bad thing to miss. For testing, the Flash Player’s mm.cfg file must have the following entries
ErrorReportingEnable=1
TraceOutputFileEnable=1
and a FlashPlayerTrust file must allow local SWFs to access local files.
To ensure this, copy the files from Adobes to-do.
That’s it! The cygwin enviroment is ready for the ant build. Do a:
ant main checkintests
and watch the build fireworks. The swfdump.jar file is now to be found in the /lib folder. And as a benefit you also now have a complete mxmlc open source environment. You can use it to compile some SWFs.
Finally got around to compile my current flex project using Flex “Gumbo” 4 SDK (beta 4.0.0.10485) – and was in for quite a shock.
First the Spark theme is a major change. And in my humble opinion not for the better. Frankly it kinda looks like the early Java Swing Metal theme. Ugly. Furthermore it’s supposed to be simple to use. Which sounds pretty good – until you realize that this means that most of your hard-earned styles no longer work at all. They are simply not there anymore. Plus I’ve got a few events that are not happining at all anymore.
Luckily the Halo theme is still a part of the new SDK. And you can still use it. You just have to add these parameters to the compiler:
-compatibility-version=3.3 -theme=${flexlib}/themes/Halo/halo.swc
The compatibility-version parameter is exactly what it sounds like: It guarantees compatibility against older versions.
But wait. With these parameters many of the advantages of using Flex 4 goes away. One of them is Spark. Because Spark is so much more than just a theme. It’s a new component and skinning architecture, that is way better at separating the view from the controller. So I guess, that I have to take a harder look at Gumbo. New namespaces and all. This is a good place to start for the migration: http://www.adobe.com/devnet/flex/articles/flex3and4_differences.html
Or this: http://www.artima.com/articles/flex_4_styling.html
But I definitely have find another way to skin Spark…
After Steve Jobs showcased an iPad without Flash support last week, the flame wars have been blazing. HTML 5 versus Flash is the burning question. It’s Adobe versus Apple with Google as linebacker. The proprietary plugin versus open web standards. Who will win? What will loose? This is the best blog, I’ve read so far on the subject.
However one astonishing question remains. Where is Microsoft in all this? The fact that Silverlight is rarely mentioned anywhere in this debate made me realize just how far Microsoft has gone. And how quickly.
Like it or not, Microsoft used to a big player. One of the few companies that set the standards instead of following the lead. Sure, we can always discuss the negative aspects of Microsoft’s monopoly, but no one can deny that Microsoft has been enormously influential. But apparently no longer. And today Microsoft’s creative destruction written by Dick Brass, a former vice president at Microsoft, offered a possible explanation:
What happened? Unlike other companies, Microsoft never developed a true system for innovation. Some of my former colleagues argue that it actually developed a system to thwart innovation. Despite having one of the largest and best corporate laboratories in the world, and the luxury of not one but three chief technology officers, the company routinely manages to frustrate the efforts of its visionary thinkers.
Wow. Go read it. It’s well written and thoughtful. And it is a statement made by one of Microsoft’s own. Microsoft’s rather weak answer to Brass’ statement is here.
For quite some time now open source blogs have been noting the signs of Microsofts impending doom. To counter this many Microsoft affiliated blogs have been citing Windows 7′s record sales. But combine the above with the current financial crisis and these observations Microsoft is certainly in for some immediate hardships. At the very least.