XUL Application Packaging

  • Revision slug: XUL_Application_Packaging
  • Revision title: XUL Application Packaging
  • Revision id: 128653
  • Created:
  • Creator: Benjamin Smedberg
  • Is current revision? No
  • Comment Link up the [Crash Reporting] section

Revision Content

XULRunner application packages are standard toolkit bundles (like a Firefox extension), with one additional manifest file (<tt>application.ini</tt>) 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 1.8.0.4 Release Notes).

application.ini

The <tt>application.ini</tt> 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 <tt>{{mediawiki.external('Headings')}}</tt> and <tt>Key=Value</tt> pairs. Lines beginning with <tt>;</tt> or <tt>#</tt> are treated as comments.

A sample application.ini file can be found in {{template.Source("xulrunner/examples/simple/application.ini", "the mozilla source tree")}}.

The [App] section

The <tt>App</tt> section specifies metadata about the application

Name
Specifies the application name.
REQUIRED
Example: <tt>Name=TestApplication</tt>

Version
Specifies the application version number.
REQUIRED
See Toolkit version format for version numbering details
Example: <tt>Version=0.1</tt>

BuildID
Specifies a unique build identifier. This is typically a date identifier, and should be different for every released version of an application.
REQUIRED
Example: <tt>BuildID=20060201</tt>

ID
Specifies the unique application ID
REQUIRED
The application ID, like extension IDs, can be formatted either like an email <tt>ApplicationName@vendor.tld</tt> or a UUID <tt>{12345678-1234-1234-1234-123456789abc}</tt>. The email format is recommended for newly developed applications.
Example: <tt>ID=TestApplication@example.tld</tt>

Vendor
Specifies the application vendor
OPTIONAL
Example: <tt>Vendor=Grinch Productions</tt>

The [Gecko] section

The <tt>Gecko</tt> section specifies what version of XULRunner is required by the application.

MinVersion
Specifies the minimum XULRunner version needed by this application.
REQUIRED
Example: <tt>MinVersion=1.8</tt>

MaxVersion
Specify the maximum XULRunner version needed by this application.
OPTIONAL - default value is any XULRunner less than XULRunner 2
Example: <tt>MaxVersion=1.8.0.*</tt>

The [XRE] section

The <tt>XRE</tt> section specifies various features of XULRunner startup that can be enabled

EnableExtensionManager
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: <tt>EnableExtensionManager=1</tt>

EnableProfileMigrator</dt>
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 {{template.Source("toolkit/profile/public/nsIProfileMigrator.idl", "nsIProfileMigrator interface")}}; if an implementation is not found no migration will be performed.
Example: <tt>EnableProfileMigrator=1</tt>

The [Crash Reporting] Section

Interwiki Language Links

{{ wiki.languages( { "fr": "fr/Empaqueter_une_application_XUL", "ja": "ja/XUL_Application_Packaging" } ) }}

Revision Source

<p>
</p><p><a href="en/XULRunner">XULRunner</a> application packages are standard <a href="en/Bundles">toolkit bundles</a> (like a Firefox extension), with one additional manifest file (<tt>application.ini</tt>) 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 <a href="en/XULRunner_1.8.0.4_Release_Notes">XULRunner 1.8.0.4 Release Notes</a>).
</p>
<h3 name="application.ini"> application.ini </h3>
<p>The <tt>application.ini</tt> 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 <tt>{{mediawiki.external('Headings')}}</tt> and <tt>Key=Value</tt> pairs. Lines beginning with <tt>;</tt> or <tt>#</tt> are treated as comments.
</p><p>A sample application.ini file can be found in {{template.Source("xulrunner/examples/simple/application.ini", "the mozilla source tree")}}.
</p>
<h4 name="The_.5BApp.5D_section"> The [App] section </h4>
<p>The <tt>App</tt> section specifies metadata about the application
</p><p></p><dl>
<dt>Name
</dt><dd>
Specifies the application name.<br>
REQUIRED<br>
Example: <tt>Name=TestApplication</tt>
<p></p></dd><dt>Version
</dt><dd>
Specifies the application version number.<br>
REQUIRED<br>
See  <a href="en/Toolkit_version_format">Toolkit version format</a> for version numbering details<br>
Example: <tt>Version=0.1</tt>
<p></p></dd><dt>BuildID
</dt><dd>
Specifies a unique build identifier. This is typically a date identifier, and should be different for every released version of an application.<br>
REQUIRED<br>
Example: <tt>BuildID=20060201</tt>
<p></p></dd><dt>ID
</dt><dd>
Specifies the unique application ID<br>
REQUIRED<br>
The application ID, like <a href="en/Install_Manifests#id">extension IDs</a>, can be formatted either like an email <tt>ApplicationName@vendor.tld</tt> or a UUID <tt>{12345678-1234-1234-1234-123456789abc}</tt>. The email format is recommended for newly developed applications.<br>
Example: <tt>ID=TestApplication@example.tld</tt>
<p></p></dd><dt>Vendor
</dt><dd>
Specifies the application vendor<br>
OPTIONAL<br>
Example: <tt>Vendor=Grinch Productions</tt>
<p></p></dd></dl>

<h4 name="The_.5BGecko.5D_section"> The [Gecko] section </h4>
<p>The <tt>Gecko</tt> section specifies what version of XULRunner is required by the application.
</p><p></p><dl>
<p></p><dt>MinVersion
</dt><dd>
Specifies the minimum XULRunner version needed by this application.<br>
REQUIRED<br>
Example: <tt>MinVersion=1.8</tt>
<p></p></dd><dt>MaxVersion
</dt><dd>
Specify the maximum XULRunner version needed by this application.<br>
OPTIONAL - default value is any XULRunner less than XULRunner 2<br>
Example: <tt>MaxVersion=1.8.0.*</tt>
<p></p></dd></dl>

<h4 name="The_.5BXRE.5D_section"> The [XRE] section </h4>
<p>The <tt>XRE</tt> section specifies various features of XULRunner startup that can be enabled
</p><p></p><dl>
<p></p><dt id="em">EnableExtensionManager
</dt><dd>
Specifies whether to enable extensions and extension management. Legal values are 1 and 0.<br>
OPTIONAL - default is 0<br>
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.<br>
Example: <tt>EnableExtensionManager=1</tt>
<p></p></dd><dt>EnableProfileMigrator&lt;/dt&gt;
</dt><dd>
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.<br>
OPTIONAL - default is 0<br>
Note: The application author is responsible for implementing the {{template.Source("toolkit/profile/public/nsIProfileMigrator.idl", "nsIProfileMigrator interface")}}; if an implementation is not found no migration will be performed.<br>
Example: <tt>EnableProfileMigrator=1</tt>
<p></p></dd></dl>

<h4 name="The_.5BCrash_Reporting.5D_Section"> The [Crash Reporting] Section </h4>
<ul><li> <a href="en/Using_Crash_Reporting_in_a_XULRunner_Application">Using Crash Reporting in a XULRunner Application</a>
</li></ul>
<p><span class="comment">Interwiki Language Links</span>
</p>{{ wiki.languages( { "fr": "fr/Empaqueter_une_application_XUL", "ja": "ja/XUL_Application_Packaging" } ) }}
Revert to this revision