Page 4 of 6
Trying it out
All that remains is to try it all out. When you have finished your extension you distribute it for installation as an XPI file. To create this you zip all of the directories that were created by the Wizard into a single HelloWorld.zip file - like the one you downloaded - and then change the file's extension to .xpi. This can then be loaded by Firefox either locally or from a web page and it automatically installs the extension using all of information in the XPI file.
This works well but it's a bit time consuming when you are testing an extension to have to keep on creating a zip file and renaming it each time you make any changes. To allow for development work Firefox will load an un-zipped extension directly from the development folders. All you have to do is place a text file containing the path to the development directory, the Firefox extensions directory. The first problem is finding the extensions directory. It is generally in:
C:\Documents and Settings\
some unique letters.default\
The file that you store in the extensions directory has to be named using the unique name that you supplied to identify the extension, i.e. email@example.com in this case. Of course if you supplied a different unique name for your extension then use it. Simply open NotePad type in the path to the helloworld directory, i.e. the directory that contains the files chrome.manifest and install.rdf among others and save it as firstname.lastname@example.org. (Tip: to save a file that doesn't end in .txt using NotePad surround the entire name in double quotes.)
The Hello World extension has been loaded!
As long as the extension has been loaded you can try it out. If you click on the Tools menu you should see the new "helloworld" menu item. Clicking on it should produce the Alert dialog box with the familiar message displayed.
The extension in action