Packaging a desktop native installerAs of AIR 2, you can use ADT to create native application installers for distributing AIR applications. For example, you can build an EXE installer file for distribution of an AIR application on Windows. You can build a DMG installer file for distribution of an AIR application on Mac OS. You can build a DEB or RPM installer file for distribution of an AIR application on Linux. Applications installed with a native application installer are known as extended desktop profile applications. You cannot use ADT to package a native installer for an AIR application if the application descriptor file does not support the desktop extended profile. You can restrict this profile using the supportedProfiles element in the application descriptor file. See Device profiles and supportedProfiles. You can build a native installer version of the AIR application in two basic ways:
You must use ADT on the same operating system as that of the native installer file you want to generate. So, to create an EXE file for Windows, run ADT on Windows. To create a DMG file for Mac OS, run ADT on Mac OS. To create a DEB or RPG file for Linux, run ADT on Linux. When you create a native installer to distribute an AIR application, the application gains these capabilities:
However, when packaged as a native installer, looses some of the benefits of the AIR file format. A single file can no longer be distributed to all desktop computers. The built-in update function (as well as the updater framework) does not work. When the user double-clicks the native installer file, it installs the AIR application. If the required version of Adobe AIR is not already installed on the machine, the installer downloads it from the network and installs it first. If there is no network connection from which to obtain the correct version of Adobe AIR (if necessary), installation fails. Also, the installation fails if the operating system is not supported in Adobe AIR 2. Note: If you want a file to be executable in your installed
application, make sure that it's executable on the filesystem when
you package your application. (On Mac and Linux, you can use chmod
to set the executable flag, if needed.)
Creating a native installer from the application source filesTo build a native installer out of the source files for the application, use the -package command with the following syntax (on a single command line): adt -package AIR_SIGNING_OPTIONS-target native [WINDOWS_INSTALLER_SIGNING_OPTIONS] installer_fileapp_xml [file_or_dir | -C dir file_or_dir | -e file dir ...] ... This syntax is similar to the syntax for packaging an AIR file (without a native installer). However there are a few differences:
For details on ADT options other than the -target option, see Packaging a desktop AIR installation file. The following example creates a DMG file (a native installer file for Mac OS): adt -package -storetype pkcs12 -keystore myCert.pfx -target native myApp.dmg application.xml index.html resources The following example creates an EXE file (a native installer file for Windows): adt -package -storetype pkcs12 -keystore myCert.pfx -target native myApp.exe application.xml index.html resources The following example creates an EXE file and signs it: adt -package -storetype pkcs12 -keystore myCert.pfx -target native -storetype pkcs12 -keystore myCert.pfx myApp.exe application.xml index.html resources Creating a native installer from an AIR file or an AIRI fileYou can use ADT to generate a native installer file based on an AIR file or an AIRI file. To build a native installer based on an AIR file, use the ADT -package command with the following syntax (on a single command line): adt -package -target native [WINDOWS_INSTALLER_SIGNING_OPTIONS] installer_file air_file This syntax is similar to the syntax for creating a native installer based on the source files for the AIR application. However there are a few of differences:
To build a native installer based on an AIRI file, use the ADT -package command with the following syntax (on a single command line): adt AIR_SIGNING_OPTIONS -package -target native [WINDOWS_INSTALLER_SIGNING_OPTIONS] installer_file airi_file This syntax is similar to the syntax for creating a native installer based on an AIR file. However there are a few of differences:
The following example creates a DMG file (a native installer file for Mac OS) based on an AIR file: adt -package -target native myApp.dmg myApp.air The following example creates an EXE file (a native installer file for Windows) based on an AIR file: adt -package -target native myApp.exe myApp.air The following example creates an EXE file (based on an AIR file) and signs it: adt -package -target native -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp.air The following example creates a DMG file (a native installer file for Mac OS) based on an AIRI file: adt -storetype pkcs12 -keystore myCert.pfx -package -target native myApp.dmg myApp.airi The following example creates an EXE file (a native installer file for Windows) based on an AIRI file: adt -storetype pkcs12 -keystore myCert.pfx -package -target native myApp.exe myApp.airi The following example creates an EXE file (based on an AIRI file) and signs it with both an AIR and a native Windows signature: adt -package -storetype pkcs12 -keystore myCert.pfx -target native -storetype pkcs12 -keystore myCert.pfx myApp.exe myApp.airi |
|