So I am working on a new FireFox4 extension using the new JetPack SDK and had a hard time finding the docs to use the browsers auto update feature. After a number of google search I finally found this link https://jetpack.mozillalabs.com/sdk/1.0b4/docs/dev-guide/addon-development/cfx-tool.html.
Here is what it says hope this helps other find out how to do this faster.
updateURL and updateLink
If you choose to host the XPI yourself you should enable the host application to find new versions of your add-on.
To do this, include a URL in the XPI called the updateURL: the host application will go here to get information about updates. At the updateURL you host a file in the update RDF format: among other things, this includes another URL calledupdateLink which points to the updated XPI itself.
The --update-link and --update-url options simplify this process. Both options take a URL as an argument.
The --update-link option builds an update RDF alongside the XPI, and embeds the supplied URL in the update RDF as the value of updateLink.
The --update-url option embeds the supplied URL in the XPI file, as the value of updateURL.
So if we run the following command:
cfx xpi --update-link http://example.com/addon/latest
--update-url http://example.com/addon/update_rdf
cfx will create two files:
- an XPI file which embeds
http://example.com/addon/update_rdf as the value of updateURL
- an RDF file which embeds
http://example.com/addon/latest as the value of updateLink.