Adobe Integrated Runtime (AIR) for JavaScript Developers Pocket Reference

(nextflipdebug5) #1

40 | Chapter 2: Getting Started with AIR Development


Creating an AIR File Using ADT


The ADT command-line tool included in the Adobe AIR
SDK is used to create AIR files. Its usage format is:


adl –packageAIRFILENAME FILESTOINCLUDE

To create an AIR file for our application:


1.Open a terminal (Mac OS X) or Console (Windows)
window.
2.Change to the directory which containsAIRHelloWorld.
htmlandAIRHelloWorld.xml.
3.Run the following command:
adt -package AIRHelloWorld.air AIRHelloWorld.xml
AIRHelloWorld.html

This should create a file namedAIRHelloWorld.airin the
same directory. If the file is not created, or if you receive any
errors:



  • Make sure you have configured the SDK correctly in
    order to ensure that the ADT tool can be found.

  • Make sure that you are running the ADT command from
    the same directory that contains the AIRHelloWorld.xml
    file.

  • Make sure that your application descriptor file contains
    well formed XML.

  • Make sure the information in the application descriptor
    file is correct. Pay particular attention to the application
    attributes, and therootContent value.

  • Make sure that the AIRHelloWorld.html and
    AIRHelloWorld.xml files are in the same directory


Testing the AIR File


Now that we have created the AIR file for our application,
the only step left is to test the AIR file and make sure it
installs correctly.

Free download pdf