2 Steps to create XPI File for Firefox



If you have created a firefox extension, you should create a “.xpi” file in order to it can be installed, how to create it you may ask, you can do like these steps:

Step 1: Zip all your code and rename it into xpi file

In post Build an extension for firefox, we can get answer of create a xpi file for firefox, what you should do is zip your files and rename it into xpi file, however, you may get a fail result by this way, if you say yes, you can do like step two.

Step 2: Use Java jar.exe to create a xpi file

You also can use java jar.exe to create your xpi file, before you start, you should make sure you have installed a java jdk.

Then you can create a bat file to create, code like below:


set EXTENSION_NAME=content_blocker
set EXTENSION_HOME=C:/myextension/firefox
set EXTENSION_PATH=%EXTENSION_HOME%/%EXTENSION_NAME%
set JAVA_HOME=C:/ARCS/Dev/jre1.5
%JAVA_HOME%/bin/jar.exe cvfM %EXTENSION_PATH%.xpi -C %EXTENSION_PATH% .
pause

Then only thing what you do is run this bat file.

Category: Internet

TAG:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>