When you are satisfied with how your extension works, package it for deployment and installation.
Zip the contents of your extension's folder (not the extension folder itself), and rename the zip file to have a .xpi extension. In Windows XP, you can do this by selecting all the files and subfolders in your extension folder, right click and choose "Send To -> Compressed (Zipped) Folder". A .zip file will be created for you. Just rename it and you're done!
On Mac OS X, you can right-click on the contents of the extension's folder and choose "Create Archive of..." to make the zip file. However, since Mac OS X adds hidden files to folders in order to track file metadata, you should instead use the Terminal, delete the hidden files (whose names begin with a period), and then use the
zip command on the command line to create the zip file. The files are typically of the name .DS_Store.
On Linux, you would likewise use the command-line Zip tool.
cd ~/extensions/my_extensions zip -r ../sample.xpi *
When placed in the (user's profile)/extension directory, Thunderbird will open the xpi, check the id in the
install.rdf and create that directory for your package. It will then cd to that directory and unzip the files, thereby creating a mirror of your
~/extensions/my_extension directory structure and files.
Note: Thunderbird 7.0 requires you to update extensions.ini file in the user profile directory as well.