Install.rdf: Difference between revisions
No edit summary |
m (tidying) |
||
Line 1: | Line 1: | ||
{{extdev}} | {{extdev}} | ||
Firefox 0.9, Thunderbird 0.7 and all subsequent versions of these products use the Extension Manager. In order to be supported by it you have to package your extensions as described in [http://www.mozilla.org/projects/firefox/extensions/packaging/extensions.html this mozilla.org document]. | Firefox 0.9, Thunderbird 0.7 and all subsequent versions of these products use the Extension Manager. In order to be supported by it you have to package your extensions as described in [http://www.mozilla.org/projects/firefox/extensions/packaging/extensions.html this mozilla.org document]. This includes providing a valid "install.rdf" file. | ||
==Creating install.rdf for your extension using tools== | Note that the Mozilla Suite currently makes no use of (and ignores) the "install.rdf" file. If you wish to support the Mozilla Suite, you must instead (or in addition) include an [[install.js]] file. Moreover, if you wish to submit your extension to [http://update.mozilla.org/ update.mozilla.org] then you should include the correct targetApplication item for the Mozilla Suite in a valid "install.rdf" file anyway (see [http://forums.mozillazine.org/viewtopic.php?t=99246 this thread]). | ||
==Creating "install.rdf" for your extension using tools== | |||
You can use any of these tools: | You can use any of these tools: | ||
*[http://ted.mielczarek.org/code/mozilla/extensiondev/ Extension developer's extension] has Extension Builder functionality. | *[http://ted.mielczarek.org/code/mozilla/extensiondev/ Extension developer's extension] has Extension Builder functionality. | ||
Line 10: | Line 12: | ||
*[http://physnet.uni-oldenburg.de/~schlenk/tcl/firefox/extensionmaker.kit Extensionmaker] - A Tcl Starkit for windows, that generates an install.rdf. You need a tclkit runtime for windows to start it (see [http://www.equi4.com/tclkit.html]). Its currently beta. | *[http://physnet.uni-oldenburg.de/~schlenk/tcl/firefox/extensionmaker.kit Extensionmaker] - A Tcl Starkit for windows, that generates an install.rdf. You need a tclkit runtime for windows to start it (see [http://www.equi4.com/tclkit.html]). Its currently beta. | ||
== | ==A template "install.rdf" file== | ||
If you choose to manually create an "install.rdf" file, you can use the template below as a guide. | |||
<pre> | <pre> | ||
Line 71: | Line 73: | ||
</RDF> | </RDF> | ||
</pre> | </pre> | ||
==Generating a GUID== | ==Generating a GUID== |
Revision as of 13:38, 17 April 2005
This 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 and all subsequent versions of these products use the Extension Manager. In order to be supported by it you have to package your extensions as described in this mozilla.org document. This includes providing a valid "install.rdf" file.
Note that the Mozilla Suite currently makes no use of (and ignores) the "install.rdf" file. If you wish to support the Mozilla Suite, you must instead (or in addition) include an install.js file. Moreover, if you wish to submit your extension to update.mozilla.org then you should include the correct targetApplication item for the Mozilla Suite in a valid "install.rdf" file anyway (see this thread).
Creating "install.rdf" for your extension using tools
You can use any of these tools:
- Extension developer's extension has Extension Builder functionality.
- Ted Mielczarek's webapp for install.rdf creation.
- Extenzilla - Windows-only install.rdf and XPI generator by Will Ryan (disscussion thread at MZ forums).
- Extensionmaker - A Tcl Starkit for windows, that generates an install.rdf. You need a tclkit runtime for windows to start it (see [1]). Its currently beta.
A template "install.rdf" file
If 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:targetApplication> <!-- Firefox --> <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> <em:targetApplication> <!-- Thunderbird --> <Description> <em:id>{3550f703-e582-4d05-9a08-453d09bdfdc6}</em:id> <em:minVersion>0.7</em:minVersion> <em:maxVersion>1.0</em:maxVersion> </Description> </em:targetApplication> <em:targetApplication> <!-- Mozilla Suite --> <Description> <em:id>{86c18b42-e466-45a9-ae7a-9b95ba6f5640}</em:id> <em:minVersion>1.7</em:minVersion> <em:maxVersion>1.8</em:maxVersion> </Description> </em:targetApplication> <!-- This is not needed for Firefox 1.1 and later. Only include this if you want to be 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>
Generating a GUID
You’ll have to generate a GUID for each extension you create and put it inside the <em:id> tag. You can either download MS guidgen (a GUID generator for Windows NT-based systems), use uuidgen (for *nix), use 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'.
As Firefox/Thunderbird install each extension in a folder with name taken from <em:id> in install.rdf, some people (e.g. clav) are using human-readable strings as ID for their extensions. However, extensions with such IDs are reported to be rejected by update.mozilla.org, so you need to use a 'real' GUID for your extension if you're going to submit it to u.m.o. (discussion thread)
Extension versioning
As stated in the official documentation on mozilla.org, extension versions must be of form major.minor.release.build[+]. Old-style versions like 0.5pre are now invalid.