Install.rdf: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(→‎Target applications' GUIDs: Added: netscape browser)
m (→‎Target applications' GUIDs: fix typo + use monospace for GUIDst)
Line 61: Line 61:
==Target applications' GUIDs==
==Target applications' GUIDs==
<table>
<table>
<tr><td>Firefox        </td><td>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</td></tr>
<tr><td>Firefox        </td><td><code>{ec8030f7-c20a-464f-9b0e-13a3a9e97384}</code></td></tr>
<tr><td>Thunderbird    </td><td>{3550f703-e582-4d05-9a08-453d09bdfdc6}</td></tr>
<tr><td>Thunderbird    </td><td><code>{3550f703-e582-4d05-9a08-453d09bdfdc6}</code></td></tr>
<tr><td>Nvu            </td><td>{136c295a-4a5a-41cf-bf24-5cee526720d5}</td></tr>
<tr><td>Nvu            </td><td><code>{136c295a-4a5a-41cf-bf24-5cee526720d5}</code></td></tr>
<tr><td>Mozilla Suite  </td><td>{86c18b42-e466-45a9-ae7a-9b95ba6f5640}</td></tr>
<tr><td>Mozilla Suite  </td><td><code>{86c18b42-e466-45a9-ae7a-9b95ba6f5640}</code></td></tr>
<tr><td>"Seamonkey"    </td><td>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</td></tr>
<tr><td>"Seamonkey"    </td><td><code>{92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}</code></td></tr>
<tr><td>Sunbird        </td><td>{718e30fb-e89b-41dd-9da7-e25a45638b28}</td></tr>
<tr><td>Sunbird        </td><td><code>{718e30fb-e89b-41dd-9da7-e25a45638b28}</code></td></tr>
<tr><td>Netscape Browser</td><td>{3db10fab-e461-4c80-8b97-957ad5f8ea47}</td></tr>
<tr><td>Netscape Browser</td><td><code>{3db10fab-e461-4c80-8b97-957ad5f8ea47}</code></td></tr>
</table>
</table>


===Notes===
===Notes===
* '''Mozilla Suite''' ignores install.rdf, but you ought to include corresponding targetApplication item in install.rdf if you support the Suite and are going to submit your extension to [http://update.mozilla.org/ update.mozilla.org], see [http://forums.mozillazine.org/viewtopic.php?t=99246 this thread]. '''You still must include an [[install.js]] file''' if you support Mozilla Suite.
* '''Mozilla Suite''' ignores install.rdf, but you ought to include corresponding <code>targetApplication</code> item in install.rdf if you support the Suite and are going to submit your extension to [http://update.mozilla.org/ update.mozilla.org], see [http://forums.mozillazine.org/viewtopic.php?t=99246 this thread]. '''You still must include an [[install.js]] file if you support Mozilla Suite.'''
* '''"[http://wiki.mozilla.org/SeaMonkey:Home_Page Seamonkey]"''' is now a codename (the official name is not announced yet as of April 2005) for the community project, that continues working on the Mozilla Suite codebase, after Mozilla Foundation has [http://www.mozilla.org/seamonkey-transition.html announced] it will not actively develop the Mozilla Suite any further. At the moment it doesn't read install.rdf, just as the Mozilla Suite, but it's planned to use implement this in future.
* '''"[http://wiki.mozilla.org/SeaMonkey:Home_Page Seamonkey]"''' is now a codename (the official name is not announced yet as of May 2005) for the community project, that continues working on the Mozilla Suite codebase, after Mozilla Foundation has [http://www.mozilla.org/seamonkey-transition.html announced] it will not actively develop the Mozilla Suite any further. At the moment it doesn't read install.rdf, just as the Mozilla Suite, but it's planned to implement this in future.


==Generating extension's GUID==
==Generating extension's GUID==

Revision as of 17:56, 24 May 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, Nvu 0.? and all subsequent versions of these products use the Extension Manager ("the EM"). 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. This includes providing a valid install.rdf file.

Creating install.rdf using tools

You can use any of these tools:

Template

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>

                <!-- 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>

Target applications' GUIDs

Firefox {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
Thunderbird {3550f703-e582-4d05-9a08-453d09bdfdc6}
Nvu {136c295a-4a5a-41cf-bf24-5cee526720d5}
Mozilla Suite {86c18b42-e466-45a9-ae7a-9b95ba6f5640}
"Seamonkey" {92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
Sunbird {718e30fb-e89b-41dd-9da7-e25a45638b28}
Netscape Browser{3db10fab-e461-4c80-8b97-957ad5f8ea47}

Notes

  • Mozilla Suite ignores install.rdf, but you ought to include corresponding targetApplication item in install.rdf if you support the Suite and are going to submit your extension to update.mozilla.org, see this thread. You still must include an install.js file if you support Mozilla Suite.
  • "Seamonkey" is now a codename (the official name is not announced yet as of May 2005) for the community project, that continues working on the Mozilla Suite codebase, after Mozilla Foundation has announced it will not actively develop the Mozilla Suite any further. At the moment it doesn't read install.rdf, just as the Mozilla Suite, but it's planned to implement this in future.

Generating extension's 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.