# Building the browser extension There're currently 2 ways to build Haketilo. ## 1. Simple stupid way - `build.sh` script You only need a POSIX-compliant environment for this (shell, awk, etc.). It is a viable option if you don't need to run the automated test suite. From project's root directory, using a POSIX shell, you type either: ``` shell ./build.sh mozilla # to build for Firefox-based browsers ``` or: ``` shell ./build.sh chromium # to build for Chromium-based browsers ``` The unpacked extension shall be generated under `./mozilla-unpacked/` or `./chromium-unpacked/`, respectively. You can then load it into your browser as a temporary extension or pack it into an xpi/crx/zip archive manually, e.g.: ``` shell 7z a -tzip haketilo.xpi -w mozilla-unpacked/. ``` ## 2. `configure`-based build This method assumes you have not only a POSIX environment but also a working Make tool and the zip command. From project's root directory, run the shell commands: ``` shell ./configure --host=mozilla # or analogically with --host=chromium make ``` This would generate the unpacked extension under `./mozilla-unpacked/` and its zipped version under `./mozilla_build.zip` (which you can rename to .xpi if you want). You can also perform an out-of-source build, for example: ``` shell mkdir /tmp/haketilo-build && cd /tmp/haketilo-build /path/to/haketilo/sources/configure --host=chromium make all # will generate both ./mozilla-build.zip and ./chromium-build.zip ```