XUL extensions are constructed very simply. Documentation on how they are constructed is excellent.
At Mozdev.org we have been focused recently on helping users find projects more easily as well as preparing for the upcoming Firefox 3 release by creating tools for our projects to perform secure installs and updates more easily. In order to do this we needed information about the extensions hosted at Mozdev.org. Getting information about an extension is fairly straightforward. I created several classes for opening XPI files and parsing the install manifest. I also created classes to interface with extensions, extension types, applications, and application versions. These all get used when someone adds a new download file to their project (backend sql and data). The process for adding a new file goes like this: 1. Our CVS download file update script will call MD_ProjectDownloadFile::add() 2. This function determines if the file is an extension. If it is, it:</p>
1. Parses the install manifest to get guid, name, description, and
supported application information
2. adds the extension if its new
3. associates the extension with the project
4. saves supported applications and versions for that specific file
(supported applications can change over time)
</p>
<p>
- The project owner can then login and publically release the file (this allows the project owner to have test releases as well as give the mirrors time to propagate the file) as well as verify the hash of the file (for secure installs and updates)
- A project owner also has the option of using Mozdev's update.rdf file to provide secure updates; these are generated/updated when the extension is updated with a new release.