GithubHelp home page GithubHelp logo

rlugojr / makexpi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from piroor/makexpi

0.0 2.0 0.0 128 KB

Build scripts for XPI: creating, publishing and prividing auto-update.

Shell 48.57% JavaScript 50.61% Makefile 0.81%

makexpi's Introduction

Utilities for Firefox/Thunderbird Add-on Developers

Building XPI packages

Requirements

  • bash
  • sed
  • zip
  • GNU cp
  • GNU sha1sum

For Windows, you must setup Cygwin for these required commands and add the path to the Cygwin's bin directory via the envrionemnt variable PATH, like:

set PATH=C:\cygwin\bin;C:\Program Files\TortoiseGit\bin;...

How to install scripts to build XPI packages?

First, put these tools under a directory named makexpi, at the root of your project. If it is a Git repository, you should add this as a submodule, like:

$ git clone [email protected]/piroor/new-addon
$ cd new-addon
$ git submodule add https://github.com/piroor/makexpi.git

Next, run the script prepare_build_scripts.sh as:

$ makexpi/prepare_build_scripts.sh -n "package-name-of-new-addon"

Even if you forget to specify the -n option, the script will ask it to you with a prompt. Then you'll get three new files:

  • Makefile
  • make.bat, a batchfile for Windows with Cygwin.
  • make.sh, a bash script for Windows with Cygwin.

How to build XPIs with GNU make?

You'll just have to type make to build XPI package, like:

$ make
...
...
...
$ ls *.xpi
package-name-of-new-addon.xpi package-name-of-new-addon_noupdate.xpi

The file with a suffix _noupdate is a sanitized version for the Mozilla Add-ons. Even if you specify your custom updateURL and updateKEY in your install.rdf, they are automatically sanitized.

For Windows, launch the batch file make.bat by double click.

How to sign to XPIs? / How to upload built XPI to Mozilla Add-ons website?

First, you must generate an API key. See the entry: https://blog.mozilla.org/addons/2015/11/20/signing-api-now-available/

For example, if you get the result:

  • JWT issuer: user:xxxxxx:xxx
  • JWT secret: yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy

then set them to environment variables JWT_KEY and JWT_SECRET and run make signed.

$ export JWT_KEY=user:xxxxxx:xxx
$ export JWT_SECRET=yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy
$ make signed

If your XPI package is automatically signed, it will be downloaded to the current directory. However, if it requires manual review by AMO editors, you'll have to download it by hand after preliminary or full review.

You can use this command to upload new version for your public (listed) addon also. Note that a new version uploaded by this command will have no version description. After you upload a new version, you'll have to log in to the developer hub and complete the version manually.

makexpi's People

Contributors

piroor avatar smellman avatar cosmo0920 avatar rindeal avatar tsu-root avatar

Watchers

Ray Lugo, Jr. avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.