It’s been a while. I swear that second design post will appear someday.
One of the many things I’ve been doing recently while working on Anodyne is to get it able to run on Mac, and Linux. Doing it for Windows and Mac is incredibly easy with Flashdevelop, as they set up all the scripts for you. Problem is that it works with AIR 3.1 by default, which is a no-no for Linux. So, adventure time.
I think it might be helpful for others who have to deal with this crap later, so here’s a quick guide on getting your flash game, or swf or whatever, packaged with Adobe AIR, IF YOU USE FLASHDEVELOP AS YOUR IDE.
“I want to make my game playable on EVERYTHING with an AIR Installer!”
Great. Just make a project template for “AIR AS3 Projector” project. Copy-pasta your source from the folder you usually build.
Now before you do anything else…
Guess what? AIR only works on versions 2.6 and earlier for Linux. This means you get to jump through some hoops. If you have a recent version of Flashdevelop, you probably have the Flex 4.6 SDK + AIR 3.1 SDK. This is no good.
Go download the Flex 4.5 (and only 4.5) SDK, and unzip that shit into flashdevelop’s Tools folder.
Project -> Properties -> SDK -> Manage -> Click on Installed flex sdks -> click on the “…” -> add -> enter the path (should be “Tools\your-folder-here”).
If you did everything right, close and open that properties dialogue box, and you should be able to choose an SDK with Flex 4.5A and AIR 2.6.
Great! One more thing. Make sure you open “application.xml” and change the namespace to 2.6. There’s a thingy at the top of that file that probably says 3.1, change it to 2.6. Now everything will work.
Congrats, you are almost done. Build your project to test it with the Debug AIR thingy, if that works, you’re golden – just run the certificate-gen script, and then run the package script (the one in the same level as the application.xml).
And boom, you have a magic AIR installer you can send off anywhere. Magic cross-platform support, hooray.