Multiple item extension packaging

  • Revision slug: Multiple_Item_Packaging
  • Revision title: Multiple Item Package
  • Revision id: 134716
  • Created:
  • Creator: Kyodev
  • Is current revision? No
  • Comment add link fr

Revision Content

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 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 <tt>xpi</tt>. A Multiple Item Package may contain both extensions (e.g. <tt>xpi</tt> file extension) and themes (e.g. <tt>jar</tt> 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 <tt>install.rdf</tt> 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 <tt>jar</tt> and <tt>xpi</tt> 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 <tt>em:id</tt>, <tt>em:targetApplication</tt>, and <tt>em:type</tt>.

For the Firefox and Thunderbird 1.5 Extension Manager to determine that this package is a Multiple Item Package the <tt>em:type</tt> specified in your install.rdf must be <tt>32</tt> and specified as <tt><em:type NC:parseType="Integer">32</em:type></tt>. The XML namespace <tt>xmlns:NC="http://home.netscape.com/NC-rdf#"</tt> must also be declared in your install.rdf as shown below.

...
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:NC="http://home.netscape.com/NC-rdf#"
     xmlns:em="http://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 <tt><em:type>32</em:type></tt> as shown below.

...
<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://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 <tt>em:targetApplication</tt> the <tt>minVersion</tt> specified should be the highest <tt>minVersion</tt> and the <tt>maxVersion</tt> specified should be the lowest <tt>maxVersion</tt> from all of the Installable Bundles contained by the Multiple Item Package for the <tt>em:targetApplication</tt>. 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

{{wiki.template(':en/Toolkit_API/Official_References')}}

{{ wiki.languages( { "ja": "ja/Multiple_Item_Packaging", "fr": "fr/Paquetage_multi_extensions" } ) }}

Revision Source

<p> 
A Multiple Item Package provides the ability to package multiple <a href="en/Bundles">Installable Bundles</a> 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 <a href="en/Install.rdf">install.rdf</a> file and has the same requirements as an <a href="en/Extension_Packaging">Extension</a> except as noted below.
</p><p>There is currently no facility to prevent or warn the user when installing a previous version of an extension.
</p><p><br>
</p>
<h3 name="Multiple_Item_Package_File_Layout"> Multiple Item Package File Layout </h3>
<p>The Multiple Item Package file layout is a simplified form of an <a href="en/Bundles">Installable Bundle</a> and requires a file extension of <tt>xpi</tt>. A Multiple Item Package may contain both extensions (e.g. <tt>xpi</tt> file extension) and themes (e.g. <tt>jar</tt> file extension). The basic structure is shown below:
</p>
<pre class="eval">/<a href="en/Install.rdf">install.rdf</a>                        <i>Install Manifest</i>
/extension1.xpi                     <i><a href="en/Extension_Packaging">Extension</a></i>
/extension2.xpi                     <i><a href="en/Extension_Packaging">Extension</a></i>
/theme1.jar                         <i><a href="en/Theme_Packaging">Theme</a></i>
/theme2.jar                         <i><a href="en/Theme_Packaging">Theme</a></i>
...
</pre>
<p>The Extension Manager will read the <tt>install.rdf</tt> 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 <a href="en/Install.rdf">install.rdf</a> Install Manifest and the files with a <tt>jar</tt> and <tt>xpi</tt> file extension will be extracted or utilized.
</p>
<h3 name="install.rdf"> <a href="en/Install.rdf">install.rdf</a> </h3>
<p>A Multiple Item Package does not have the same requirements as an <a href="en/Extension_Packaging">Extension</a> for its <a href="en/Install.rdf">install.rdf</a>. The only required items are <tt>em:id</tt>, <tt>em:targetApplication</tt>, and <tt>em:type</tt>.
</p><p>For the Firefox and Thunderbird 1.5 Extension Manager to determine that this package is a Multiple Item Package the <tt>em:type</tt> specified in your <a href="en/Install.rdf">install.rdf</a> must be <tt>32</tt> and specified as <tt>&lt;em:type NC:parseType="Integer"&gt;32&lt;/em:type&gt;</tt>. The XML namespace <tt>xmlns:NC="http://home.netscape.com/NC-rdf#"</tt> must also be declared in your <a href="en/Install.rdf">install.rdf</a> as shown below.
</p>
<pre>...
&lt;RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:NC="http://home.netscape.com/NC-rdf#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#"&gt;

  &lt;Description about="urn:mozilla:install-manifest"&gt;
    &lt;!-- nsIUpdateItem type for a Multiple Item Package --&gt;
    &lt;em:type NC:parseType="Integer"&gt;32&lt;/em:type&gt;
...</pre>
<p>For the Firefox and Thunderbird 2.0 Extension Manager you can use the previous syntax or <tt>&lt;em:type&gt;32&lt;/em:type&gt;</tt> as shown below.
</p>
<pre>...
&lt;RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
     xmlns:em="http://www.mozilla.org/2004/em-rdf#"&gt;

  &lt;Description about="urn:mozilla:install-manifest"&gt;
    &lt;!-- nsIUpdateItem type for a Multiple Item Package --&gt;
    &lt;em:type&gt;32&lt;/em:type&gt;
...</pre>
<p>When specifying <tt>em:targetApplication</tt> the <tt>minVersion</tt> specified should be the highest <tt>minVersion</tt> and the <tt>maxVersion</tt> specified should be the lowest <tt>maxVersion</tt> from all of the <a href="en/Bundles">Installable Bundles</a> contained by the Multiple Item Package for the <tt>em:targetApplication</tt>. 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.
</p>
<h3 name="Installation"> Installation </h3>
<p>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.
</p><p>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.
</p>
<h3 name="Official_References_for_Toolkit_API"> Official References for <a href="en/Toolkit_API">Toolkit API</a> </h3>
<p>{{wiki.template(':en/Toolkit_API/Official_References')}}
</p>{{ wiki.languages( { "ja": "ja/Multiple_Item_Packaging", "fr": "fr/Paquetage_multi_extensions" } ) }}
Revert to this revision