Blog Archives

3 Steps to create XPI file for FireFox by ZIP


To create a XPI file for firefox is very simple, you can read article 2 Steps to create XPI File for Firefox to get more detail informaiton.

However, if you want to know more detail, you can read this article, here i will give you a example.

Step 1: You should have a firefox extension source code

Before you plan to create a xpi file, you should have to have some source code for firefox extension, these source may like this:

create a xpi file for firefox

Step 2: Use zip application  you have installed on computer to zip these file

As above, you can zip .js, .json, .rdf file to a zip file.

Step 3: Rename zip file to xpi file

You can rename your created zip file into a xpi file, like showed above, it is called a Short URL Submit.xpi,then you can install and use it in firefox.

Category: Internet

TAG

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