User:Jorge.villalobos/AddonPackaging/Manifest
The Manifest File
The manifest file for the new packaging system is defined using a subset of HTML. The file name is manifest.html, and must reside in the root of the package file.
The existence of this file determines whether the new packaging system is applied or not. For backward compatibility, package files can contain both the new and old manifest files.
Layout
The basic layout of a manifest file is like so:
<?xml version="1.0"?>
<!DOCTYPE html>
<html>
<body>
<!-- properties -->
</body>
</html>
Some properties are required, some are optional.
Single value properties are defined using the paragraph tag (<p>), and multi-valued properties are defined using the ordered list tags (<ol>, <li>). The id attribute determines the property each value corresponds to, for single-valued properties. The class attribute is used for properties that can be repeated in the same manifest, like target applications.
Property ordering is irrelevant. Any HTML content that doesn't correspond to properties in the spec will be ignored.
Required properties
Your manifest must specify these properties correctly otherwise your addon may not install.
id
The add-on id, which is a:
- A string formatted like so: extensionname@organization.tld. (Recommended)
- A GUID.
Example:
<p id="id">packaging-example@wiki.mozilla.org</p>
name
The name of the add-on; intended for display in the UI. It can be optionally localized as described below, but a default name should always be defined. The name cannot be empty.
Example:
<p id="name">Add-on Packaging Spec Example</p>
version
A version string identifying the version of the addon being supplied. It must conform to the rules of the Toolkit version format.
Example:
<p id="version">1.0</p>
type
An integer value representing the type of add-on.
- 2 Extensions
- 4 Themes
- 8 Locale
- 32 Multiple Item Package
Example:
<p id="type">2</p>
chrome-domain
The chrome domain determines how chrome and resource URLs are resolved for the add-on.
Example:
<p id="chrome-domain">packagingspec</p>
For the above example, the add-on would be registering itself for URLs starting with chrome://packagingspec and resource://packagingspec.
target-applications
Specifies the applications targeted by this addon.
The add-on will work with the application identified by the application-id property specified, from the minimum version min-version up to and including the maximum version max-version (for a comprehensive list of application IDs and valid min/max versions for them see valid application versions).
These version strings are formatted in the same fashion as the version property and will be compared to the application version; this allows the extension author to specify which versions of the application an add-on has been tested with.
The manifest must specify at least one target application.
Example:
<ol id="target-applications">
<!-- Firefox. -->
<li>
<p class="application-id">{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</p>
<p class="min-version">3.6</p>
<p class="max-version">4.0.*</p>
</li>
<!-- SeaMonkey. -->
<li>
<p class="application-id">{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</p>
<p class="min-version">2.1</p>
<p class="max-version">2.1.*</p>
</li>
</ol>
Since it's possible to have multiple target applications, the properties are specified using class instead of id.
Example minimal manifest
This is an example manifest that includes all required properties:
<?xml version="1.0"?>
<!DOCTYPE html>
<html>
<body>
<p id="id">packaging-example@wiki.mozilla.org</p>
<p id="name">Add-on Packaging Spec Example</p>
<p id="version">1.0</p>
<p id="chrome-domain">packagingspec</p>
<!-- Extension. -->
<p id="type">2</p>
<ol id="target-applications">
<!-- Firefox. -->
<li>
<p class="application-id">{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</p>
<p class="min-version">3.6</p>
<p class="max-version">4.0.*</p>
</li>
</ol>
</body>
</html>
Optional properties
description
A short description of the add-on - intended for display in the user interface. This description should fit on one short line of text.
Example:
<p id="description">An example for the new add-on packaging specification.</p>
creator
The name of the creator/principal developer - intended for display in the user interface. This is a single value.
Example:
<p id="creator">Jorge Villalobos</p>
developers
The name(s) of co-developers. You may specify multiple developers.
Example:
<ol id="developers"> <li>John Doe</li> <li>Jane Doe</li> </ol>
translators
The name(s) of translators. You may specify multiple translators.
Example:
<ol id="translators"> <li>John Doe</li> <li>Jane Doe</li> </ol>
contributors
The name(s) of additional contributors. You may specify more than one contributor.
Example:
<ol id="contributors"> <li>John Doe</li> <li>Jane Doe</li> </ol>