Building a Thunderbird extension 2: extension file layout

Extensions are packaged and distributed in archive files (also known as Bundles), with the XPI (pronounced “zippy”) file extension. At a minimum, they contain an install.rdf, the chrome.manifest and a chrome/ folder. A content/ folder sometimes contains the actual content files. These files contain the code that makes your extension actually do something. When this tutorial is finished, our extension will look like this:

myfirstext.xpi:                                //created in step 8
              /install.rdf                     //created in step 3
              /chrome.manifest                 //created in step 4
              /content/myhelloworld.xul        //created in step 5
              /content/overlay.js              //created in step 6
              /chrome/locale/*                 //Building an Extension# Localization
              /defaults/preferences/           //Building an Extension# Defaults Files

The following tutorial pages will explain how to write each of these files (except locale/ and defaults/) and package them into an XPI (zippy) file. You can find  information about the locale/ and defaults/ folders in the more general "Building an Extension" documentation.

To start with the tutorial, manually create the initial directory structure for the extension as it is depicted above in a folder called myfirstext@jen.zed. This directory could be created anywhere on your filesystem.

Document Tags and Contributors

 Last updated by: sfeu,