Install.rdfFrom MozillaZine Knowledge BaseThis page is part of the extension development documentation project. Ask your questions in MozillaZine Forums. Also try browsing example code. Note: development documentation is in process of being moved to Mozilla Development Center (MDC).
Firefox 0.9, Thunderbird 0.7, Nvu 0.? and all subsequent versions of these products use the Extension Manager ("the EM") for managing extensions and themes. In order to have your extension supported by it you have to package your extensions as described in "Packaging Firefox/Thunderbird Extensions" document at mozilla.org (see also documentation at Devmo). This includes providing a valid install.rdf file.
[edit] Creating install.rdf using toolsYou can use any of these tools:
[edit] TemplateIf you choose to manually create an "install.rdf" file, you can use the template below as a guide. <?xml version="1.0"?> <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"> <em:id>{XXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX}</em:id> <em:name>Sample Extension</em:name> <em:version>1.0</em:version> <em:description>A sample extension with advanced features</em:description> <em:creator>Your Name Here</em:creator> <!-- optional items --> <em:contributor>A person who helped you</em:contributor> <em:contributor>Another one</em:contributor> <em:homepageURL>http://sampleextension.mozdev.org/</em:homepageURL> <em:optionsURL>chrome://sampleext/content/settings.xul</em:optionsURL> <em:aboutURL>chrome://sampleext/content/about.xul</em:aboutURL> <em:iconURL>chrome://sampleext/skin/mainicon.png</em:iconURL> <em:updateURL>http://sampleextension.mozdev.org/update.rdf</em:updateURL> <em:type>2</em:type> <!-- type=extension --> <!-- Firefox --> <em:targetApplication> <Description> <em:id>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</em:id> <em:minVersion>0.9</em:minVersion> <em:maxVersion>1.0</em:maxVersion> </Description> </em:targetApplication> <!-- This is not needed for Firefox 1.1 and later. Only include this if you want to make your extension compatible with older versions --> <em:file> <Description about="urn:mozilla:extension:file:sampleext.jar"> <em:package>content/</em:package> <!-- optional items --> <em:skin>skin/classic/</em:skin> <em:locale>locale/en-US/</em:locale> <em:locale>locale/ru-RU/</em:locale> </Description> </em:file> </Description> </RDF> [edit] Target applications' GUIDs
[edit] Notes
[edit] Items' IDsEach extension must have a unique ID (the value of em:id arc). Initially, it was recommended to use GUIDs for extensions IDs. To generate a GUID, you can use MS guidgen (a GUID generator for Windows NT-based systems), uuidgen (for *nix, also comes with MSVS), a web-based generator such as this and this, or open your IRC client, go to irc://irc.mozilla.org/botbot and say 'botbot uuid'. Extension Manager in Toolkit 1.5-based applications will not install extensions using arbitrary strings as their IDs. Only GUIDs and IDs of extension@domain form are now accepted. For example, the DOM Inspector has inspector@mozilla.org ID. [edit] VersioningSee Toolkit version format document for details about version's format used. [edit] install.rdf for themesTBD. See [2]. The main difference is the additional "em:internalName" arc in theme's manifest. |