This post is regarding how we can create executable from AIR file targeting a specific OS platform. Flex or Flash builder doesn’t give us the functionality to create executable, we have to use command line Air compiler to create executable. As of now we can create executable targeting 3 major platform i.e. Windows, MAC and Linux. Until now i.e. before version 2 of AIR it wasn’t possible in AIR. We simply create a single AIR output file and can install/deploy it on any platform using AIR framework. But then we couldn’t call up native processes in the host operative system in AIR and it turned out to be a very less effective desktop application. So because of huge demand from community Adobe has come out with AIR 2, which has native process class in AIR among few other enhancements. But this additional feature has downside as well and that is we have to create separate executable for each 3 major supported OS i.e. Windows, MAC and Linux. 2nd if it’s a executable we can’t update it directly from Server like we use to do for AIR apps.
How can be create executable from AIR app:
Goto command line
AIR SDK installed folder>bin
command to create executable is:
adt -package -target native <output executable file path with output file name>
<input air file path with input air file name>
adt -package -target native C:\AIRSamples\AIRSample.exe C:\AIRSamples\AIRSample.air
adt -package -target native C:\AIRSamples\AIRSample.dmg C:\AIRSamples\AIRSample.air
adt -package -target native C:\AIRSamples\AIRSample.rpm C:\AIRSamples\AIRSample.air
In order to use the new NativeProcess class in your application you need to add one line to your application descriptor file:
<supportedProfiles>extendedDesktop</supportedProfiles>tag and you must add “desktop” for desktop version as well to it i.e.