How to create your own installer for an Adobe AIR Application and distribute it using offline channels (CD/DVD/LAN)
I suggest you use Aptana for development as it has a good set of examples that can you help you kick-start development. Once your application is ready, you are encountered with the problem of distribution. Adobe does not allow distribution of the AIR runtime (via CD/DVD/LAN) without license. Don’t sweat, all you need to do is apply for a distribution license. It takes a few minutes to acquire one- all you have to do is enter your company details and the number of people you will be distributing the application to. Although they claim that they will get back to you in 3 working days, we got a response from them almost immediately with a link pointing to the runtime distribution files for Windows as well as Mac.
1. Make sure you download the Adobe AIR Runtime installer files for Windows (.zip) and for Mac (.dmg)
2. Extract them and add a file called .airinstall.cfg containing the path to your .air file
3. Run the installer and watch the Adobe AIR Runtime as well as your AIR Application install seamlessly.
To brand the installer even further, Adobe AIR Runtime Installer supports silent installation. We can use a variety of tools to create our own installer. For a free open-source installer I suggest using an open-source installer like InstallJammer. It works great for Windows. Here are a couple of guidelines to get your AIR Application install seamlessly
1. Compress your files (Adobe AIR Runtime Installer + .air Application) as a zip file (AIR Application.zip in this example)
2. Follow the File > New Project Wizard and create your project.
3. Delete the Program Files folder from Groups and Files and add the following:
Make sure you set the Working Directory to <%Temp%>
Once that is done, you can build and test your new installer which packs everything in a single .exe file and silently installs your Adobe AIR Application!
Debugging & Notes
If everything is working fine except for the fact that its not installing the application then remove the -silent option and try to install the AIR app. You will be able to see the errors during installation.
Make sure that the Adobe AIR application installation directory is different from the InstallJammer installation directory. Best to use something like:
installer -silent -eulaAccepted -desktopShortcut -programMenu -location <%InstallDir%>/resources yourapp.air
Sample InstallJammer Project
For those who are having trouble getting InstallJammer up and running, here is a sample project to begin with:
Sample InstallJammer Air Project
Create a file called myapp.zip in C:\myapp\ folder. The contents of myapp.zip should look like the following: