This is a quick guide for setting up the AIR SDK and running your HTML based AIR Desktop Application on windows operating system. This topic might be an old one for seasoned AIR developers but I hope this is useful for AIR beginners like me.
Download and Install Java JRE or JDK: AIR SDK requires either JRE or JDK to be installed on you computer. If you have JRE or JDK installed in your computer move to next step. You can download Java JRE at http://java.sun.com/j2se/1.4.2/download.html and the java JDK at http://java.sun.com/javase/downloads/index.jsp.
Download and Install AIR SDK: Download AIR SDK at http://www.adobe.com/products/air/tools/sdk/ and choose the windows version. Extract the AIR SDK content to another location on your computer. I have extracted the content to "D:\Program Files\Adobe AIR\AIRSDK\". Note: Please do remember the location you've extracted the SDK.
Add the AIR SDK folder’s bin directory to your system path. To do this right click on your systems My Computer > Properties > Advanced > Environment Variable > Systems Variables > Path > and select Edit. At the end of the variable add a semicolon and add your AIR SDK bin folder path. Ex: "D:\Program Files\Adobe AIR\AIRSDK\bin\" and click OK to close them. The AIR SDK contains the AIR Development Tool (ADT) which allows us to Package AIR applications and AIR Debug launcher (ADL) allows us to run and debug AIR application.
Application HTML File: A simple HTML file with hello world text.
Application Descriptor XML File: This file holds all the information about the application.
Both these files need to be saved in the root of the application directory.
Testing Your Application: Open the Command prompt and Navigate to your project directory and type this command.
If you’re able to see the AIR application in a separate window then you have successfully created your first AIR Application. If you have got any messages like "adl not being recognized" or "Java not being recognized" which means that you have not installed JRE or the adl utility in not set in your systems path. Correct the issues as described in the previous steps.
Creating a Self-Signed Certificate: Now we can build and distribute the application to end users. To ensure the security of AIR application every application must be signed. ADT will allow us to generate a self-signed certificate. Use the following command in command prompt to generate the certificate.
mySelfSignedCertificateName: A common name you provide for your certificate. (Ex: your Company’s name.).
mycertName.pfx: The name of the generated certificate file.
mycertpassword: Password for your certificate file that you need to use when packaging the application.
1024-RSA: Key type of the certificate. You can also use 2048-RSA.
Now check the application folder for the newly created certificate. The self-signed certificate is valid for five years period after that you’ll need to release the application using a new certificate.
Packaging Your AIR Application: Use the following command in command prompt for to package the AIR application.
AIRInstallerName.air: Name of the AIR Installer file.
We need to mention all the files, folders, assets that need to package with the application in the command line. Once the command executed it will generate the AIR distributable and installable file for your application in the application directory.
Kewl blog design Akbar.....Good work....
Have you tried aptana for Air development? There is no need to do all that.
I have posted this for to have an handy guide for using Command prompt to create and package Adobe AIR application. I have used both Aptana and Dreamweaver CS3 for AIR development but using command prompt for doing this will give a better understanding such things. :-)
Would you be interested in giving training
CFML/Web/Salesforce/Agile Enthusiast, Husband & Dad, an avid learner & android fan. Creator of GetCFMLJobs.com who works as a Tech Consultant in Toronto, Canada.