0
votes

I create a firefox addon using the addon builder https://builder.addons.mozilla.org/

From there I downloaded the distributable file, but they didnt include an option for setting the addon icon. I heard that by default it uses icon.png, so I unzipped the xpi file, put the icon in the folder. But when I re-zip it, it always denies the addon. How can I re-zip without this issue.

Also how can I develop firefox addons in general. I am interested in a book that explains everything top to bottom, instead of some very poorly written snippet examples that are scattered across the web.

3

3 Answers

2
votes

Jetpack add-ons are signed automatically, simply changing something won't work because the signature becomes invalid. If you need features that the builder doesn't provide you need to download the SDK and create a package yourself. SDK documentation: https://addons.mozilla.org/en-US/developers/docs/sdk/1.0/

Update: The "signing" part is outdated, the Add-on SDK no longer signs the add-ons. Still, creating a new package is the way to go here - one might run into all kinds of obscure issues otherwise.

0
votes

You need to repack it as a zip file with the zip extension. The install.rdf should be at the root directory of the zip file, i,e. it shouldn't contain a root directory that holds these files.

After repacking as a zip, rename it to xpi. Keep in mind that if you are in Windows, you need to configure it to show the file extensions.

Mozilla MDN contains some useful documentation, but not sure whether it's advanced enough to fit your needs.

0
votes

Open the addon with an unzip program (dont extract it), and throw inside the icon.png or that ever you want to add, overwrite.

Edit: you can add icon into the package.json... it is editable just after the input for the name of the add on.