Getting Started with Adobe AIR
First you’ll need to get the following two things installed:
- Creating your first HTML-based AIR application with the AIR SDK
Setting Up the Adobe AIR SDK on Windows
I had a couple small setup issues with getting the Adobe AIR SDK setup on my Windows development box.
The Adobe AIR SDK download is just a Zip Archive containing the files necessary for the SDK; it contains no setup EXE. To get it setup, you’ll need to follow the below steps:
- Extract the SDK to some folder of your choosing. For Example: *C:\AdobeAIRSDK*
- Add the *“C:\AdobeAIRSDK\bin” *folder to the System Path so you can execute it easily from within the Command Line.
Also, to use the Adobe Developer Tool (adt) you’ll need Java installed, and you’ll need to make sure that the path to where Java is installed is also included within the System Path as described above.
To edit the “System Path” in Windows just follow these steps:
- Open the System Properties dialog box and click the Advanced tab. You can find this in the System settings within the Control Panel.
- Click the Environment Variables button.
- Select the PATH entry and then click the Edit button. Add the desired path to the end of the current variable value, separating it from previous values with a semicolon. For Example *“;C:\AdobeAIRSDK\bin”*
- Click OK to Save.
Tips to Make Building and Testing Easier
Here are some simple tips to make building and testing your applications easier.
Create .BAT files to Build and Test
One thing that you’’ll want to do to make it a little easier to Build (using adt) and Test (using adl) your HTML-based Adobe AIR applications is create some simple “build.bat” and “test.bat” DOS Batch files so you don’t have to type in the command-line parameters every time you want to build or test your application.
adt –package –storetype pkcs12 –keystore certificate MyApp.air application.xml .
This way you can just simply double-click on the specific .BAT file within Windows Explorer to either Build or Test your application.
Also, in the above build.bat example, my Certificate file is simply named “certificate”, and it’s a self-signed certificate.
Place Application Files within a Sub-Folder
If you rename your “.air” file that was built using the above mentioned .BAT file to be a “.ZIP” file and then open it, you’ll notice that the .BAT files and your Certificate were included within the Build. This is because the above mentioned call to “adt” tells it to include all files and folders within the build. To prevent the .BAT files and Certificate from being included, you’ll need to place them within a separate folder.
The easiest way to do this is to place all you Application files within a Sub-Folder within the main folder that your .BAT files and Certificate are located. For example you could name it “App_Files”. Then make the following changes to the .BAT files to point it to the new file/folder locations appropriately:
cd App_Files adt –package –storetype pkcs12 –keystore ../certificate ../MyApp.air application.xml .
cd App_Files adl application.xml
Also, one thing to note about the above modified “build.bat” file is that it will place the Built “.air” file/application within the Main folder where the .BAT files and Certificate are located.
Creating a Self-Signed Certificate
One thing that you’ll notice above is that I’m using a Certificate file names “certificate”. This is a self-signed certificate that I generated using the “adt” tool. To generate a self-signed certificate, you can execute “adt” using the following command-line parameters:
adt –certificate –cn SelfSigned 1024-RSA certificate.pfx samplePassword
- 11 Oct 2023
- 03 Oct 2023
- 28 Sep 2023
- 28 Sep 2023
- 28 Sep 2023
- 25 Sep 2023