Dev : Extensions : install.rdf: Difference between revisions

From MozillaZine Knowledge Base
Jump to navigationJump to search
(refactored some info into main extensions page, and made GUID suggestion)
(exts with human-readable GUIDs are not accepted by umo)
Line 1: Line 1:
''Not sure if it should be here, and not at [[Dev : install.rdf]]. Most (maybe all) of information below applies also to themes [[User:Asqueella|Asqueella]] 13:44, 26 Jul 2004 (PDT)''
A new Extension Manager is used in Firefox 0.9 and Thunderbird 0.7 upwards. In order to be supported by the new EM you have to package your extensions as described in [http://www.mozilla.org/projects/firefox/extensions/packaging/extensions.html this mozilla.org document].
A new Extension Manager is used in Firefox 0.9 and Thunderbird 0.7 upwards. In order to be supported by the new EM you have to package your extensions as described in [http://www.mozilla.org/projects/firefox/extensions/packaging/extensions.html this mozilla.org document].


Line 61: Line 58:


==Generating a GUID==
==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 [http://www.microsoft.com/downloads/details.aspx?FamilyId=94551F58-484F-4A8C-BB39-ADB270833AFC&displaylang=en MS guidgen] (a Windows GUID generator), use uuidgen (for *nix), or go to ''irc://irc.mozilla.org/#botbot'' and say 'botbot uuid'. However, it is difficult for users to find your extension in their profile when it is disguised by an ugly GUID, so it is recommended that you replace up to the first 8 characters of the GUID with the name of your extension.
You’ll have to generate a GUID for each extension you create and put it inside the <em:id> tag. You can either download [http://www.microsoft.com/downloads/details.aspx?FamilyId=94551F58-484F-4A8C-BB39-ADB270833AFC&displaylang=en MS guidgen] (a Windows GUID generator), use uuidgen (for *nix), or 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 (f.e. 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 'real' GUID in your extension if you're going to submit it to u.m.o. ([http://forums.mozillazine.org/viewtopic.php?t=157579 discussion thread])


==Extension versioning==
==Extension versioning==
As stated in the [http://www.mozilla.org/projects/firefox/extensions/update.html official documentation] on  mozilla.org, extension versions '''must''' be of form major.minor.release.build[+]. Old-style versions like 0.5pre are now invalid.
As stated in the [http://www.mozilla.org/projects/firefox/extensions/update.html official documentation] on  mozilla.org, extension versions '''must''' be of form major.minor.release.build[+]. Old-style versions like 0.5pre are now invalid.

Revision as of 20:13, 13 November 2004

A new Extension Manager is used in Firefox 0.9 and Thunderbird 0.7 upwards. In order to be supported by the new EM you have to package your extensions as described in this mozilla.org document.

Creating install.rdf for your extension using tools

You can use any of these tools: Ted Mielczarek's webapp for install.rdf creation or Extenzilla - Windows-only install.rdf and XPI generator by Will Ryan (disscussion thread at MZ forums).

Creating from a template

Alternatively you can create it from template below.

<?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: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>

		<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>
	
	</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 Windows GUID generator), use uuidgen (for *nix), or 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 (f.e. 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 'real' GUID in 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.