In this article I show how to package an AIR application (.exe) with the AIR runtime redistributable in a setup file. Your end-users can then run a single setup.exe file to install both your app and the AIR runtime. Nice one!
This is a follow-up from an article I wrote on packaging and AIR application as an EXE.
What you’ll need:
- The myApp.exe file you created from your myApp.air file (detailed in article mentioned above)
- The Adobe Air 2.0 beta (or 2.0 beta 2) runtime exe file you’re currently using (can be downloaded here).
- The free InstallJammer program (im using version 1.2.14)
1. You have to create a zip file containing the myApp.exe file and the Adobe Air Runtime Redistributable exe file.
Note: I firstly renamed the Air runtime file to air2runtime.exe (just for handiness), and called the zip file installFiles.zip
2. Install and open InstallJammer.
3. Choose File/New/Project Wizard. Enter a project name and destination folder for your InstallJammer project, I named mine Air Install Project, click next.
4. Enter some details for you apps’ name and version, next.
5. Step 4 asks for your Application Directory, where your air files are. I just leave this blank, and add my files later.
6. The next three steps are simple. Install wizard theme, os to install on (Windows for me), additional features (the default will do).
7. Next we want to add our zip file to the project.
- Click on ‘Groups and Files’
- Right click Program Files, and browse to your zip file (see pic below)
8. Next we need to tell the installer how, when and where to unzip the files we created onto our end-users system.
- Under Install User Interface on the left pane, click Install Panes and Actions.
- Expand Action Groups in the right pane and expand Install Actions. Right click Install Actions and choose Insert Action/File Action/Unzip File. (see pic below)
- Move the Unzip File box to position it just below Install Selected Files (see pic below Unzip Files – Advanced Properties)
9. Click on Unzip File and in the Advanced Properties panel on the lower right, change the Destination and Zip File dropdown box properties. I chose <%InstallDir%>/installFiles.zip, but you could choose <%Temp%>. See above pic.
This is something to play around with yourself (let me know if you hit any snags though, would be helpful to know)
10. Next we have to execute the Air Runtime file on our clients machine. Right click Install Actions and choose Insert Action/Execute Action/Execute External Program. Move ExecuteExternalProgram to just under Unzip Files (see next pic).
- You will need to change the Execute External Program advanced properties, in this case the Program Command Line, set to air2runtime.exe, and the Working Directory (in my case changed to <%InstallDir%>/installFiles (its installFiles for me, but just use the name of you zip file without the .zip part). Again, Temp instead of InstallDir would also do. See pic below for settings.
11. Next step is to instruct the installer to execute the myApp.exe on the client machine.
- For this repeat step 10, and place the ‘Execute External Program’ action just below the previous Air Runtime one. Change the Program Command Line to myApp.exe (or whatever you exe file is called).
Almost done!
Build the Install Project: All thats left to do is build the InstallJammer project by clicking Build (on top menu bar)/Build the Install.
You will find the ready to go Setup.exe file in the projects output folder, in my case: C:\Users\Brian\Documents\InstallJammer Projects\Air Install Project\output\Air Application-1.0-Setup.exe
This is the file your client/mate gets. Run you setup file……and hopefully nice one!
Problems/Comments
Install location: Your app shortcut will probable be in Start/Programs, with an uninstall in the install directory.
Notice how the original 2 exe files are also in the install directory (this is why you may want to choose the Temp folder for unzipping).
Silent Install: Found details on doing a silent install of the Air runtime redistributable here. You use something like air2runtime.exe -silent -silent -eulaAccepted -desktopShortcut -programMenu, but I havent tried it.
Air Already Installed: If AIR Runtime is already installed, the runtime setup will tell you this.
Options: There are loads of options to choose from to customise you install, just browse through them in the Left Pane of InstallJammer.
Legal: Check out the Adobe website for any legal stuff (you probably ticked an ‘I Agree’ to certain terms to download the runtime anyhow). Adobe don’t want people to redistribute the runtime without a licence, but you can get a licence from here if you need.
Tags: Air, AIR Application, Deploying, Exe, Redistributable, Runtime, Setup.exe





March 10, 2010 at 10:33 pm |
[...] Deploying AIR Application with AIR Runtime/Redistributable in Single Exe « Bishop On Developme… Says: March 10, 2010 at 10:29 pm | Reply [...]
July 7, 2010 at 10:34 am |
Good Morning,
I have got some issue about creation of .exe file. First of all, when I have to install myApp.exe I’ve got an error which says to me that It’s impossible to install application because same application exists in that particular path. Where I set a different path of my .exe?
If I change path manually during installation process , at the end I get a link that doesn’t launch directly my application. In fact every time I get a window which asks to me if i want launch that application. I would like visualize directly my application by clicking link …Does it exist a solution to this problem?
Thanks
Ennio
November 6, 2010 at 8:19 am |
Hi, posts you put in your blog are really usefull, thanks a million. I have a question: how can I construct a single exe file from my Visual Studio Windows form application(c#) which can be executed on every windows computer? I read your post titled “Deploying C# Setup.exe with .Net 3.5 Redistributable”, I can copy “release” folder (Not debug folder) to another computer running winxpsp3 (my code is written in a win7 computer with VS2008), install it and it works great. but how can I use installjammer to have just 1 .exe file not a folder with so many components? is that similar to way you described above? by just adding files and folders that exist in “release” folder??
BTW, is there a way to construct a .exe file of type win32 from a vs2008 windows application project wothout using wisard setup, installjammer, etc? (or converting the .exe file which VS constructs automatically in bin folder and is NOT of type win32 exe ). thank you.
January 7, 2011 at 7:45 pm |
I did this without the zip file… I just used two execute external program commands. All is fine, but the end result is not good I think, because the 3 installations all have different user interface: the installjammer looks like standard MSFT, the AIR looks like Adobe UI, the myapp.exe looks like Java UI.
Is it a way to unify them, for example, use installjammer to install AIR and myapp, as versus current installjammer ‘calls’ to AIR and myapp’s installation.
March 10, 2011 at 2:41 am |
Any Ideas for creating a single MSI file. I have already done all the above with an NSIS script but I haven’t the least clue how to do it with MSI. A client needs it and I have not the time to deal with the learning curve. I am actually willing to pay someone to help with this.
Thanks,
Josh
March 10, 2011 at 7:11 am |
[...] setup.exe http://bishoponvsto.wordpress.com/2010/03/10/deploying-air-application-with-air-runtimeredistributab… This entry was posted on Thursday, March 10th, 2011 at 3:12 pmand is filed under AS3, 編程. [...]
October 20, 2011 at 10:28 am |
Hi,
How can we create air native installer bundled with AIR Runtime for windows,MAC OS and Linux operating system?
November 20, 2011 at 10:42 pm |
website links website seo helper website links small directory…
[...]Deploying AIR Application and AIR Runtime (Redistributable) in Single Exe « Bishop On Development[...]…
December 29, 2011 at 7:20 pm |
Adobe For Mac…
[...]Deploying AIR Application and AIR Runtime (Redistributable) in Single Exe « Bishop On Development[...]…