At the moment I am working on a top-secret Firefox Extension. The great Firefox Addon Builder was discontinued in January 2014 and I wanted to write shorter blog posts more often, so here is my Firefox add-on development environment (for beginners and Windows, although it should be easily applicable also on other operating systems).
- Install Python 2.5 or 2.6. Python versions 2.6.x, x > 6, are source-only released, so you need to compile them yourselves. Python 2.6.6 was the last version with a Windows installer.
- Download the Firefox SDK and unzip it somewhere.
- Execute addon-sdk-1.x\bin\activate.bat to test whether it works.
Creating your first project
- Create a new empty folder
- Start the SDK CLI from within that folder
- Execute cfx init in the CLI
- Execute cfx run to test the addon in a new, empty Firefox instance
All that could look like this:
make.bat + Notepad++;
- To increase productivity I put the commands for packaging and executing the add-on in development in a “make.bat”.
cd C:\addon-sdk-1.15\bin\ call activate.bat cd C:\git\majascan\ cfx run
- Open the run dialog in Notepad++ with F5 and let it open this file. With “Save” you can create a shortcut for this command.
- Develop great Firefox extensions.