2

I have made a simple FireFox extension and would like to upload it to AMO.

With Chrome this is DEAD EASY....zip the directory, upload to the developer dashboard, done.

For FireFox, I apparently have to make my extension into an xpi file? How the heck do I do this with FireFox?

I made an account at https://addons.mozilla.org/en-US/developers/addon/submit/2

And have read https://developer.mozilla.org/en-US/Add-ons/Distribution but I still can't figure out how to make the xpi file I need to upload.

Wesley Smith
  • 19,401
  • 22
  • 85
  • 133

2 Answers2

2

XPI is simply a ZIP file. Use any ZIP application, make a ZIP of your addon and then change its extension to XPI.

erosman
  • 7,094
  • 7
  • 27
  • 46
  • 2
    Yep, I just finally saw that [here](http://stackoverflow.com/questions/19240653/how-to-create-xpi-file-with-7zip) . I hate FireFox, it is utterly ridiculous that they do not explain this in their Docs and even more ridiculous that they dont just except the .zip file then – Wesley Smith Nov 04 '15 at 06:10
-1

I use a windows batch file (.bat) to build the extension. It looks like this:

set dest=(your extension name)
set ZIP="C:\Program Files (x86)\7-Zip\7z.exe"
del %dest%.*
%ZIP% a -tzip -mx=9 %dest%.xpi chrome\*
%ZIP% a -tzip -mx=9 %dest%.xpi modules\*
%ZIP% a -tzip -mx=9 %dest%.xpi install.rdf
%ZIP% a -tzip -mx=9 %dest%.xpi chrome.manifest
%ZIP% a -tzip -mx=9 %dest%.xpi defaults\preferences\*
copy %dest%.xpi %dest%.zip"
Chuck Baker
  • 402
  • 1
  • 5
  • 15