2021-11-20 01:57:42 -05:00
## Building LibreWolf from source:
2021-11-21 07:19:07 -05:00
2021-12-06 07:38:51 -05:00
First, let's ** [download the latest tarball ](https://gitlab.com/stanzabird/source/-/jobs/artifacts/main/raw/librewolf-95.0.source.tar.gz?job=build-job )**.
2021-11-21 22:36:24 -05:00
To download the latest from a script, use wget/curl like this:
2021-11-21 22:34:04 -05:00
```
2021-12-06 07:38:51 -05:00
export version=95.0 # example
2021-11-21 22:34:04 -05:00
wget -O librewolf-$(version).source.tar.gz https://gitlab.com/stanzabird/source/-/jobs/artifacts/main/raw/librewolf-$(version).source.tar.gz?job=build-job
2021-11-21 22:36:24 -05:00
curl -L -o librewolf-$(version).source.tar.gz https://gitlab.com/stanzabird/source/-/jobs/artifacts/main/raw/librewolf-$(version).source.tar.gz?job=build-job
2021-11-21 22:34:04 -05:00
```
2021-11-21 02:52:50 -05:00
2021-11-21 22:39:01 -05:00
Next, we create ourselves a build folder and extract the tarball.
2021-11-20 01:11:22 -05:00
```
2021-11-20 18:11:04 -05:00
mkdir build
cd build
2021-11-21 02:52:50 -05:00
tar xf ../librewolf-$(version).source.tar.gz
2021-11-20 01:11:22 -05:00
```
Next step, if you have not done so already, you must create the build environment:
2021-11-20 01:04:05 -05:00
```
2021-11-20 18:11:04 -05:00
cp librewolf-$(version)/lw-assets/bootstrap.py .
python3 bootstrap.py --no-interactive --application-choice=browser
2021-11-20 01:04:05 -05:00
```
2021-11-21 03:51:18 -05:00
It takes about an hour for me to complete, but it needs to be done only once. This step might fail and cause problems. Why Mozilla has no separate 'install-buildenv.py' is a bit beyond me. I would have liked to be able to set up the build environment in one step, in a second step checkout the entire mozilla source, or in our case, use our own source.
2021-11-20 01:11:22 -05:00
2021-11-20 01:21:54 -05:00
Now we're ready to actually build LibreWolf:
2021-11-20 01:11:22 -05:00
```
2021-11-20 01:57:42 -05:00
cd librewolf-$(version)
2021-11-20 01:11:22 -05:00
./mach build
```
2021-11-20 01:21:54 -05:00
Also takes me an hour. Then, we can run it:
2021-11-20 01:11:22 -05:00
```
./mach run
```
2021-11-20 01:21:54 -05:00
Or make a package:
2021-11-20 01:11:22 -05:00
```
./mach package
```
2021-11-21 22:39:01 -05:00
2021-11-20 01:57:42 -05:00
## Building LibreWolf source tarball:
2021-11-21 22:39:01 -05:00
2021-11-20 01:57:42 -05:00
You don't need the build environment for this. If you don't have write access, just:
```
git clone https://gitlab.com/stanzabird/source.git
cd source
make all
```
If you **do** have write access, we're first gonna check for a newer version of Firefox:
```
git clone git@gitlab.com:< your_username > /source.git
cd source
make check
```
If there is a new version, it's a good time to git commit and trigger a CI build job.
```
2021-11-20 02:08:59 -05:00
git commit -am v$(cat version) & & git push
2021-11-20 01:57:42 -05:00
```
To build the source archive:
```
make all
```
2021-11-21 07:19:07 -05:00
If you have a working build environment, you can build librewolf with:
2021-11-21 04:23:21 -05:00
```
make librewolf
```
2021-11-21 07:19:07 -05:00
This extracts the source, and then tries to `./mach build && ./mach package` .