XULRunner application packages are standard toolkit bundles (like a Firefox extension), with one additional manifest file (application.ini) which helps describe the application. XUL app packages are typically ZIPped into an archive with the extension .xulapp or .xpi. They can be installed with a XULRunner command-line flag "-install-app" (see the XULRunner Release Notes).


The application.ini manifest is located at the root of the extension and provides metadata that allows XULRunner to launch the application properly. It is parsed as a Windows-style INI file with [Headings] and Key=Value pairs. Lines beginning with ; or # are treated as comments.

A sample application.ini file can be found in the mozilla source tree.

The [App] section

The App section specifies metadata about the application

Specifies the application name.
Example: Name=TestApplication
Specifies the application version number.
See Toolkit version format for version numbering details
Example: Version=0.1
Specifies a unique build identifier. This is typically a date identifier, and should be different for every released version of an application.
Example: BuildID=20060201
Specifies the unique application ID
The application ID, like extension IDs, can be formatted either like an email ApplicationName@vendor.tld or a UUID {12345678-1234-1234-1234-123456789abc}. The email format is recommended for newly developed applications.
Example: ID=TestApplication@example.tld
Specifies the application vendor
Example: Vendor=Grinch Productions
Specifies the path to use for the application's profile, based within the user's application data directory
Example: Profile=MyAppData

The [Gecko] section

The Gecko section specifies what version of XULRunner is required by the application.

Specifies the minimum XULRunner version needed by this application. If there are binary components, MinVersion must equal the version of the libxul SDK which is used to build the application.
Example: MinVersion=1.8
Specify the maximum XULRunner version needed by this application.
OPTIONAL - default value is any XULRunner less than XULRunner 2
Example: MaxVersion=1.8.0.*

The [XRE] section

The XRE section specifies various features of XULRunner startup that can be enabled

Specifies whether to enable extensions and extension management. Legal values are 1 and 0.
OPTIONAL - default is 0
Note: This option does not add menu items that make the extension/theme manager available in the UI; that is the responsibility of the application author.
Example: EnableExtensionManager=1
Specifies whether, when the application is launched for the first time and there are no profiles, to enable profile migration code through the nsIProfileMigrator interface. Legal values are 1 and 0.
OPTIONAL - default is 0
Note: The application author is responsible for implementing the nsIProfileMigrator interface; if an implementation is not found no migration will be performed.
Example: EnableProfileMigrator=1

The [Crash Reporting] Section


此页面的贡献者： mdnwebdocs-bot, Simontechwriter
最后编辑者: mdnwebdocs-bot,