pythonfirefox-addonzipfirefox-addon-sdkxpi

Is it possible to package a Firefox SDK add-on without using cfx?


I'm currently using cfx xpi to package my add-on to a .xpi file, as instructed here in the Add-on SDK Development Guide.

I would now like to build my code on a machine where the Add-on SDK is not present, which means no Python, and no cfx. Is it possible to do this, preferably from the command line?

I've tried simply zipping up the MyAddon folder to MyAddon.zip, and then renaming it to MyAddon.xpi, but when I try to install it on Firefox, I get the error message "This add-on could not be installed because it appears to be corrupt."

Any and all help appreciated.


Solution

  • Currently, you need the cfx tool to build add-ons if you want to use the Addon SDK. The build process includes mapping dependencies, adding in the bootstrap.js file for restartless addons, and a few files to make it loadable via Firefox. Just zipping it and calling it a xpi won't do the trick.

    The Addon-SDK team is looking at options to make the same directory structure that you use for development able to be loaded directly into Firefox, removing the build step: Proposal

    I worked on a JS-only builder addon during the SDK work week a few weeks ago that involves an addon essentially building and installing another addon. You can probably pull out components of that and node-ify them if you can run node on your build server. What -is- available on that other machine? What are you trying to accomplish that this set up is necessary, with a machine that doesn't even have python installed?