Generally in any Adobe AIR desktop application we can create a .air installer which contains all the required files for installing the application in a system.And this .air installer is really enough for installing the desktop application.
But if we want to have a .exe installer package for installing that same Desktop application in our system then it becomes a little bit tricky. In my application I have used Flex Builder 4.0 which by default has Adobe AIR 1.5. With this version of AIR it is not at all possible to create a .exe package out of a .AIR package. For this kind of job we should have Adobe AIR 2.5. But no Flex version has yet been released with AIR version 2.5 in it. So, we have to create our own Flex SDK.
This is quite simple.
The basic requirements are::
1. Flex sdk 4.0.0. 2. Adobe AIR SDK(version 2.5). These SDKs are freely available and can be downloaded from the Adobe site.
|
The required steps are::
1. First we have to make a new folder called 4.0.1 and copy all the contents of the folder 4.0.0, which is a Flex SDK 4.0.0 under the “\Adobe\Flex Builder 3\sdks\” in our system.
2. Then we have to copy the existing AdobeAIRSDK(version 2.5) folder’s contents in the new Flex SDK folder 4.0.1. Doing that will show the option to overwrite the current contents in the folder or not. We will have to just overwrite them.
3. Now, our new Flex SDK is ready to use and we have to go to the Flex Builder IDE and in the current Project, we have to change a few things::
i) In Flex Compiler property of the Project Properties window, we have to select our new Flex SDK 4.0.1 as the SDK of the current project.
ii) In the application.xml file we have to change the runtime version of AdobeAIR like:
<application xmlns=”http://ns.adobe.com/air/application/2.5″> (as opposed to …/application/2.0 or …/application/1.5) Otherwise it will show the error: “Descriptor version does not match runtime version.” iii) In the application.xml file we have to add the following line: <supportedProfiles>extendedDesktop desktop</supportedProfiles> iv) In the application.xml file, we have to add a new tag “<versionNumber>” instead of “<version>” to be in sync with the “descriptor-sample.xml” file in the new “\Adobe\Flex Builder 3\sdks\4.0.1\samples\” folder, which is used to create the
Application Descriptor File in Flex Builder.
4. Now, we have to create a .AIR package of the present AIR application in Flex Builder IDE using “Export Release Build”.
5. So, after exporting, that .air package can be transformed into a .exe package.
6. Now,we have to set the Environment Variables of our system.
For that we have to just go to:
Start/Control Panel/System/Advanced/Environment Variables Then, we have to click on Path, then Edit and add our ADT ‘bin’ install path to the end of the other text. i.e., “\Flex Builder 3\sdks\4.0.1\bin;” The full form of adt is “AIR Developer Tool” which is a Java program that we can run from the command line. Now, our Flex SDK includes the command-line scripts that execute the Java program for us. 7. Now we have to write ADT commands in the Command Line of our system to create the .exe installer from the .air package. The required command for this is: adt -package -target native D:\Projects\myApp.exe D:\Projects\myAirApp.air Where, myAirApp.air is the created .air installer from our current AIR project in Flex Builder and myApp.exe installer package will be created from that .air installer in “D:\Projects\” of our system. We can change the location of the .exe installer to anywhere in the system. Now,we can run the generated .exe file to install via a native Windows installer. |
Very Good Tutorial…