|
|
Creating AIR application and installer files
After you’ve completed your application, create the AIR
application and installer files to deploy it. Adobe AIR adds two
new menu items to the Flash Commands menu: AIR - Application And
Installer Settings and AIR - Create AIR File. After you have created
the AIR application and installer settings, you can use the AIR-Create
AIR File item to re-create the AIR (.air) file with the existing
settings.
Create the Adobe AIR application and installer filesIn Flash, open the page or set of pages that make up your
Adobe AIR application.
Save the Adobe AIR FLA file before you open the AIR - Application
And Installer Settings dialog box.
Select Commands > AIR - Application And Installer Settings.
Complete the AIR - Application And Installer Settings dialog
box, and then click Publish AIR File.
When you click the Publish
AIR File button, the following files are packaged: the FLA file,
the SWF file, the application descriptor file, the application icon files,
and the files listed in the Included Files text box. If you have
not already created a digital certificate, Flash displays the Digital
Signature dialog box when you click the Publish AIR File button.
The
AIR - Application And Installer Settings dialog box is divided into
two sections: Application Settings and Installer Settings. For more
information on these settings, see the following sections.
Application settingsThe Application settings section of the AIR - Application
And Installer Settings dialog box has the following options:
- File Name
- The name of the main file of the application. Defaults to
the name of the SWF file.
- Name
- The name used by the installer to generate the application
filename and the application folder. The name must contain only
valid characters for filenames or folder names. Defaults to the
name of the SWF file.
- Version
- Optional. Specifies a version number for your application.
Defaults to blank.
- ID
- Identifies your application with a unique ID. You can change
the default ID if you prefer. Do not use spaces or special characters
in the ID. The only valid characters are 0-9, a-z, A-Z, . (dot),
and - (dash), from 1 to 212 characters in length. Defaults to com.adobe.example.application_name.
- Description
- Optional. Lets you enter a description of the application
to display when the user installs the application. Defaults to blank.
- Copyright
- Optional. Lets you enter a copyright notice to display when
the user installs the application.
- Window Style
- Specifies what window style (or chrome) to use for the user interface
when the user runs the application on their computer. You can specify System
Chrome, which refers to the visual style that the operating system
uses. You can also specify Custom Chrome (opaque) or Custom Chrome
(transparent). To display your application without the system chrome,
select None. System Chrome surrounds the application with the operating-system
standard window control. Custom Chrome (opaque) eliminates the standard
system chrome and lets you create a chrome of your own for the application.
(You build the custom chrome directly in the FLA file.) Custom Chrome
(transparent) is like Custom Chrome (opaque), but it adds transparent
capabilities to the edges of the page. These capabilities allow
for application windows that are not square or rectangular in shape.
- Icon
- Optional. Lets you specify an icon for the application. The
icon is shown after you install the application and run it in Adobe
AIR. You can specify four different sizes for the icon (128, 48,
32, and 16 pixels) to allow for the different views in which the
icon appears. For example, the icon can appear in the file browser
in thumbnail, detail, and tile views. It can also appear as a desktop
icon and in the title of the AIR application window, as well as
in other places.
The icon image defaults to a sample AIR
application icon if no other icon files are specified.
To
specify an icon, click the Select Icon Images button in the AIR
- Application And Installer Settings dialog box. In the Icon images
dialog box that appears, click the folder for each icon size and
select the icon file to use. The files must be in PNG (Portable
Network Graphics) format.
The following illustration shows
the Icon Images dialog box with the default Adobe AIR application
icons.
If
you do specify an image, it must be the exact size (either 128x128,
48x48, 32x32, or 16x16). If you do not supply an image for a particular
icon size, Adobe AIR scales one of the supplied images to create
the missing icon image.
Advanced SettingsThe Settings button in the AIR - Application And Installer
Settings dialog box allows you to specify advanced settings for
the application descriptor file. When you click the Settings button,
the Advanced Settings dialog box appears.
The Advanced Settings dialog box lets you specify any associated
file types that the application should handle. For example, if you
wanted your application to be the principal application for handling
HTML files, you would specify that in the Associated File Types
text box.
You can also specify settings for the following aspects of the
application:
The size and placement of the initial window
The folder in which the application is installed
The Program menu folder in which to place the application.
The dialog box has the following options:
- Associated file types
- Lets you specify associated file types that the AIR application
will handle. Click the Plus (+) button to add a new file type to
the text box. Clicking the Plus button displays the File Type Settings
dialog box. Clicking the Minus (-) button removes an item that is
selected in the text box. Clicking the Pencil button displays the
File Type Settings dialog box and allows you to edit an item that
you’ve selected in the text box. By default, the Minus (-) and Pencil buttons
are dimmed. Selecting an item in the text box enables the Minus
(-) and Pencil buttons, allowing you to remove or edit the item.
The default value in the text box is None.
For more information
on the file type settings for associated file types, see File type settings.
- Initial window settings
- Lets you specify size and placement settings for the initial
application window.
Width: Specifies the initial
width of the window in pixels. The value is blank by default.
Height: Specifies the initial height of the window in pixels.
The value is blank by default.
X: Specifies the initial horizontal position of the window
in pixels. The value is blank by default.
Y: Specifies the initial vertical position of the window
in pixels. The value is blank by default.
Maximum Width and Maximum Height: Specify the maximum size
of the window in pixels. These values are blank by default.
Minimum Width and Minimum Height: Specify the minimum size
of the window in pixels. These values are blank by default.
Maximizable: Lets you specify whether the user can maximize
the window. This option is selected (or true) by default.
Minimizable: Lets you specify whether the user can minimize
the window. This option is selected (or true) by default.
Resizable: Lets you specify whether the user can resize the
window. If this option is not selected, Maximum Width, Maximum Height,
Minimum Width, and Minimum Height are dimmed. This option is selected
(or true) by default.
Visible: Lets you specify whether the application window
is visible initially. The option is selected (or true) by default.
- Other Settings
- Lets you specify the following additional information regarding the
installation:
Install Folder: Specifies the folder
in which the application is installed.
Program Menu Folder: Specifies the name of the program menu
folder for the application.
Custom Update UI: Specifies what happens when a user opens
an AIR file for an application that’s already installed. By default,
AIR displays a dialog box that allows the user to update the installed
version with the version in the AIR file. If you don’t want the
user to make that decision and you want the application to have
complete control over its updates, select this option. Selecting
this option overrides the default behavior and gives the application
control over its own updates.
For information on updating an AIR application programmatically,
see Updating AIR applications.
File type settingsFlash displays the File Type Settings dialog box if you
click the Plus (+) button or the Pencil button in the Advanced Settings
dialog box to add or edit associated file types for the application.
The only two required fields in this dialog box are Name and
Extension. If you click OK and either of those fields is blank,
Flash displays an error dialog box.
You can specify the following settings for an associated file
type:
- Name
- The name of the file type (for example, Hypertext Markup
Language, Text File, or Example).
- Extension
- The filename extension (for example, html, txt, or xmpl),
up to 39 basic alphanumeric characters, (A-Za-z0-9), and without
a leading period.
- Description
- Optional. A description of the file type (for example, Adobe
Video File).
- Content type
- Optional. Specifies the MIME type for the file.
- File Type Icon Settings
- Optional. Lets you specify an icon that’s associated with the
file type. You can specify four different sizes for the icon (128x128,
48x48, 32x32, and 16x16 pixels) to allow for the different views
in which the icon appears. For example, the icon can appear in the
file browser in thumbnail, detail, and tile views.
If you
specify an image, it must be of the size that you specify. If you
do not specify a file for a particular size, AIR uses the image
of the closest size and scales it to fit for the given occurrence.
To
specify an icon, either click the folder for the icon size and select
an icon file to use or enter the path and filename for the icon
file in the text box next to the prompt. The icon file must be in
PNG format.
After a new file type is created, it is shown
in the File Type list box in the Advanced Settings dialog box.
Application descriptor file settingsThe application settings that you specify are saved to
the application_name-app.xml file. You have the option, however,
of indicating to Flash that you want to use a custom application
descriptor file.
- Use Custom Application Descriptor File
- Lets you browse to a custom application descriptor file.
If you select Use Custom Application Descriptor File, the Application
Settings section of the dialog box is dimmed. To specify the location of
the custom application descriptor file, either enter it in the text
field below Use Custom Application Descriptor File or click the
folder icon and browse to the location. For more information on
the application descriptor file, see Creating a custom application descriptor file.
Installer settingsThe second section of the AIR - Application And Installer
Settings dialog box contains settings that pertain to installing
the application.
- Digital Signature
- All Adobe AIR applications must be signed to be installed
on another system. For information about assigning a digital signature
to a Flash Adobe AIR application, see Signing your application.
- Destination
- Specifies where to save the AIR file. The default location
is the directory where you saved the FLA file. Click the folder
icon to select a different location. The default package name is
the application name with the .air file extension.
- Included Files/Folders
- Specifies which additional files and folders to include in your
application. Click the Plus (+) button to add files, and the folder
button to add folders. To delete a file or folder from your list,
select the file or folder and click the Minus (-) button.
By
default, the application descriptor file and the main SWF file are
automatically added to the package list. The package list shows
these files even if you have not yet published the Adobe AIR FLA
file. The package list displays the files and folders in a flat
structure. Files in a folder are not listed, and full path names
to files are shown but are truncated if necessary.
Icon files
are not included in the list. When Flash packages the files, it
copies the icon files to a temporary folder that is relative to
the location of the SWF file. Flash deletes the folder after packaging
is complete.
Failure to create application and installer filesThe application and installer files fail to be created
in the following instances:
The application ID string has an incorrect length or
contains invalid characters. The application ID string can be from
1 to 212 characters and can include the following characters: 0-9,
a-z, A-Z, . (dot), - (hyphen).
Files in the installer list do not exist.
The sizes of custom icon files are incorrect.
The AIR destination folder does not have write access.
You have not signed the application or have not specified
that it is an Adobe AIRI application that will be signed later.
|