Extension Manager:Multiple Item Packages
Overview
Provide the ability to install multiple items contained in a single package. This can be accomplished with a trimmed down version of the existing install manifest format and with very minimal changes through the leveraging of the existing code and user interface for item installation.
Work is happening in bug 298498
Notes
- The acronym MPP is used for brevity and refers to a Multiple Package Package. A better name should be created for this.
- For brevity this document uses the term item for all items that would be supported by a MPP (e.g. extensions and themes).
Q: are there others besides extensions and themes that should be able to use this and if so do they have requirements that are not accounted for?
Proposed Install Manifest Format
<?xml version="1.0"?> <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 MPP --> <em:type NC:parseType="Integer">32</em:type> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>1.0+</em:minVersion> <em:maxVersion>1.0+</em:maxVersion> </Description> </em:targetApplication> <!-- Thunderbird --> <em:targetApplication> <Description> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minVersion>1.0+</em:minVersion> <em:maxVersion>1.0+</em:maxVersion> </Description> </em:targetApplication> </Description> </RDF>
For each targetApplication the minVersion should be the highest minVersion and the maxVersion should be the lowest maxVersion from all of the items contained by the MPP. 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.
Q: I am unable to think of a reason why we would want anything but em:targetApplication and em:type for a MPP since the other information will not be used by the current installation process or for managing the items after the installation completes. Is this acceptable?
Q: I am unable to think of a good reason why we should require a list of the items contained within the MPP since we can more easily extract all *.jar and *.xpi files located in the root of the MPP. If it was decided that a new user interface is necessary for this then perhaps it could take advantage of this information but that would require changes to xpinstall unless it was acceptable to prompt the user twice.
Directory Structure
Packages.xpi install.rdf extension1.xpi extension2.xpi theme1.jar ...
Note: Since the existing code requires a package with a xpi or jar file extension from xpinstall for installing an item I believe it is simpler to reuse the existing code and require that all items contained by a MPP are packages with either a xpi or jar file extension.
Installation
By using the following process the need for additional code is greatly reduced while providing a similar user experience when installing items.
- extract all packages contained in the multiple package xpi into the temp directory.
- install each item using the existing methods available.
- remove the items previously extracted.
The existing xpinstall user interface would be used for installing the MPP with the MPP being the only item listed. This will also allow displaying of whether the MPP is signed or not.
If the MPP installation displays a manager (e.g. Extension / Theme Manager) then after the download completes the manager would display the individual items contained by the MPP in the same manner that it would if the user had chosen to install multiple items simultaneously. The manager would not display the MPP after the download of the MPP is completed.