{{ Fx_minversion_header(2) }} A Multiple Item Package provides the ability to package multiple Installable Bundles which can then be downloaded and installed by a user, or provided pre-packaged with an application or by an external program. Every Multiple Item Package must provide an install.rdf file (not old-style install.js!) and has the same requirements as an Extension except as noted below.
There is currently no facility to prevent or warn the user when installing a previous version of an extension.
Multiple Item Package File Layout
The Multiple Item Package file layout is a simplified form of an Installable Bundle and requires a file extension of xpi
. A Multiple Item Package may contain both extensions (e.g. xpi
file extension) and themes (e.g. jar
file extension). The basic structure is shown below:
/install.rdf Install Manifest /extension1.xpi Extension /extension2.xpi Extension /theme1.jar Theme /theme2.jar Theme ...
The Extension Manager will read the install.rdf
Install Manifest to determine if this is a Multiple Item Package and then start the installation of the individual packages it contains automatically. No other files besides the install.rdf Install Manifest and the files with a jar
and xpi
file extension will be extracted or utilized.
install.rdf
A Multiple Item Package does not have the same requirements as an Extension for its install.rdf. The only required items are em:id
, em:targetApplication
, and em:type
.
For the Firefox and Thunderbird 1.5 Extension Manager to determine that this package is a Multiple Item Package the em:type
specified in your install.rdf must be 32
and specified as <em:type NC:parseType="Integer">32</em:type>
. The XML namespace xmlns:NC="https://home.netscape.com/NC-rdf#"
must also be declared in your install.rdf as shown below.
... <RDF xmlns="https://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:NC="https://home.netscape.com/NC-rdf#" xmlns:em="https://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- nsIUpdateItem type for a Multiple Item Package --> <em:type NC:parseType="Integer">32</em:type> ...
For the Firefox and Thunderbird 2.0 Extension Manager you can use the previous syntax or <em:type>32</em:type>
as shown below.
... <RDF xmlns="https://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:em="https://www.mozilla.org/2004/em-rdf#"> <Description about="urn:mozilla:install-manifest"> <!-- nsIUpdateItem type for a Multiple Item Package --> <em:type>32</em:type> ...
When specifying em:targetApplication
the minVersion
specified should be the highest minVersion
and the maxVersion
specified should be the lowest maxVersion
from all of the Installable Bundles contained by the Multiple Item Package for the em:targetApplication
. If this is not done then any items that are not compatible will not be installed unless a compatibility check discovers updated compatibility information that makes it compatible.
Installation
Installation can be performed using any of the existing methods used for installing extensions / themes and the same user interface is used for installing a Multiple Item Package (the individual packages contained in the Multiple Item Package will not be listed). This also allows displaying of signing information for the Multiple Item Package.
If a manager (e.g. Extension / Theme Manager) is displayed then after the download of the Multiple Item Package completes the manager will display the individual items contained by the Multiple Item Package in the same manner that it would if the user had chosen to install multiple items simultaneously. The manager will not display the Multiple Item Package in the list of items after the download of the Multiple Item Package has completed.
Official References for Toolkit API
{{ :en/Toolkit_API/Official_References() }}
{{ languages( { "ja": "ja/Multiple_Item_Packaging", "fr": "fr/Paquetage_multi_extensions" } ) }}