Building the browser extension » History » Version 4
0gitnick, 02/19/2022 11:50 PM
1 | 3 | 0gitnick | ## Building |
---|---|---|---|
2 | There're currently 2 ways to build Haketilo. |
||
3 | 1 | jahoti | |
4 | 3 | 0gitnick | ### 1. Simple stupid way - `build.sh` script |
5 | 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: |
||
6 | ``` shell |
||
7 | ./build.sh mozilla # to build for Firefox-based browsers |
||
8 | ``` |
||
9 | or: |
||
10 | ``` shell |
||
11 | ./build.sh chromium # to build for Chromium-based browsers |
||
12 | ``` |
||
13 | 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.: |
||
14 | ``` shell |
||
15 | 7z a -tzip haketilo.xpi -w mozilla-unpacked/. |
||
16 | ``` |
||
17 | |||
18 | ### 2. `configure`-based build |
||
19 | 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: |
||
20 | ``` shell |
||
21 | ./configure --host=mozilla # or analogically with --host=chromium |
||
22 | make |
||
23 | ``` |
||
24 | 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). |
||
25 | |||
26 | You can also perform an out-of-source build, for example: |
||
27 | ``` shell |
||
28 | mkdir /tmp/haketilo-build && cd /tmp/haketilo-build |
||
29 | /path/to/haketilo/sources/configure --host=chromium |
||
30 | make all # will generate both ./mozilla-build.zip and ./chromium-build.zip |
||
31 | ``` |