Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create xpi file with 7Zip?

I would like to pack my firefox extension as xpi file. I tried by adding it to archive and name it as filename.xpi

But when i try to install it on firefox am getting "package corrupted" message. Is there any way i can create a valid xpi file ?

I have installed cygwin and tried to execute zip command to create xpi file. But got zip is not a command error.

Can somebody guide me to get it done ?

like image 772
user2301765 Avatar asked Oct 08 '13 06:10

user2301765


People also ask

How do I create an XPI file?

The Firefox browser uses XPI files to provide extensibility in the browser. If you have an XPI file, just drag it to any open Firefox window to install it (select Add when you see the prompt). Mozilla's Add-ons for Firefox page is one place you can go to get official XPI files to use with their browser.

How do I download an XPI file?

... or from any other browser: Open the link to the extension (ex, https://addons.mozilla.org/en-US/firefox/addon/1password-x-password-manager ) Under the button " Download Firefox and get the extension " click " Download File. "


2 Answers

If you are on windows (to install cygwin it looks like you do), you can use the windows built in tool:

  1. Select the contents of the extension (remember, don't select the outside folder).
  2. Right Click
  3. Send to
  4. Compressed (zipped) folder

Then just replace the .zip for .xpi in the filename

Looks like your problem is on completing the point 1. correctly. Select only the contents of the extension. Not the folder that contains it.

So basically your zip file should have following structure:

my_extension.zip   |- install.rdf   |- chrome.manifest   |- <chrome> 

and NOT this structure:

my_extension.zip   |- <my_extension>        |- install.rdf        |- chrome.manifest        |- <chrome> 
like image 188
Filipe Silva Avatar answered Nov 09 '22 04:11

Filipe Silva


I experienced the same problems today and found the error to be that the add-on was obviously not signed by Mozilla, causing Firefox to refuse the installation. Up until recently, it was possible to by-pass this security check by setting xpinstall.signatures.required to false in about:config. However, as of Firefox 46, signing is mandatory and no by-pass is provided any longer, see https://blog.mozilla.org/addons/2016/01/22/add-on-signing-update/ This means that one has to either downgrade to a previous version or use a non release channel version to test one's addons :(

like image 24
Christallkeks Avatar answered Nov 09 '22 03:11

Christallkeks