Thursday, August 16, 2012

Building and deploying AIR apps in Eclipse using HTML and Javascript

Here is the setup I use for developing, building, and deploying Adobe air apps in Eclipse. I have the following installed on a USB drive:

1) Eclipse portable: Eclipse SDK Version: 3.7.2
2) Adobe AIR SDK

I create my project as a General project. Here is the structure I use:

ProjectName
    image File Folder
    cSS File Folder
    inc File Folder - javascripts
    ProjectName.html (pseudo Index.html)
    ProjectName-app.xml 
    page1.html
    page2.html

The must follow items are in red. The other items can really be named whatever you like. To use my external run configurations the project structure has to have the items in red above. The advantage to following this structure is I do not have to create a new external run config for each new project. Here's a "Hello World" project structure to illustrate the above.


 When I am ready to test the app in AIR I use the following external run configuration:

Before running this configuration, you must select the ProjectName-app.xml file.

When I want to generate a certificate I use the following run configuration:




The certificate file cert.p12 will be in the base workspace directory.

To build the project as an AIR app for windows, I use the following run configuration:



Once again, before running this configuration, you must select the ProjectName-app.xml file.

When using these external run configurations, the most frequent error is caused by not selecting the  ProjectName-app.xml file first.

No comments:

Post a Comment