0
Fork 0
mirror of https://codeberg.org/librewolf/source.git synced 2025-01-03 03:10:07 -05:00

Documentation fixes

This commit is contained in:
Bert van der Weerd 2021-12-22 21:47:33 +01:00
parent a9ee1bf016
commit 8c4e079efc
No known key found for this signature in database
GPG key ID: 4CFABB96ADE0F5B1
2 changed files with 60 additions and 57 deletions

56
CONTRIBUTING.md Normal file
View file

@ -0,0 +1,56 @@
## Note: this part of the build is mostly done, but still requires a patch.
Next, we create ourselves a build folder and extract the tarball.
```
mkdir build
cd build
tar xf ../librewolf-$(version).source.tar.gz
```
Next step, if you have not done so already, you must create the build environment:
```
cp librewolf-$(version)/lw-assets/bootstrap.py .
python3 --no-interactive bootstrap.py --application-choice=browser
```
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.
Now we're ready to actually build LibreWolf:
```
cd librewolf-$(version)
./mach build
```
Also takes me an hour. Then, we can run it:
```
./mach run
```
Or make a package:
```
./mach package
```
## Building LibreWolf source tarball:
You don't need the build environment for this. If you don't have write access, just:
```
git clone https://gitlab.com/librewolf-community/browser/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:librewolf-community/browser/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.
```
git commit -am v$(cat version) && git push
```
To build the source archive:
```
make all
```
If you have a working build environment, you can build librewolf with:
```
make librewolf
```
This extracts the source, and then tries to `./mach build && ./mach package`.

View file

@ -1,65 +1,12 @@
## Building LibreWolf from source:
First, let's **[download the latest tarball](https://gitlab.com/stanzabird/source/-/jobs/artifacts/main/raw/librewolf-95.0.2.source.tar.gz?job=build-job)**.
First, let's **[download the latest tarball](https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-95.0.2.source.tar.gz?job=build-job)**.
To download the latest from a script, use wget/curl like this:
```
export version=95.0.2 # example
wget -O librewolf-$(version).source.tar.gz https://gitlab.com/stanzabird/source/-/jobs/artifacts/main/raw/librewolf-$(version).source.tar.gz?job=build-job
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
wget -O librewolf-$(version).source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(version).source.tar.gz?job=build-job
curl -L -o librewolf-$(version).source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(version).source.tar.gz?job=build-job
```
Next, we create ourselves a build folder and extract the tarball.
```
mkdir build
cd build
tar xf ../librewolf-$(version).source.tar.gz
```
Next step, if you have not done so already, you must create the build environment:
```
cp librewolf-$(version)/lw-assets/bootstrap.py .
python3 --no-interactive bootstrap.py --application-choice=browser
```
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.
Now we're ready to actually build LibreWolf:
```
cd librewolf-$(version)
./mach build
```
Also takes me an hour. Then, we can run it:
```
./mach run
```
Or make a package:
```
./mach package
```
## Building LibreWolf source tarball:
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:stanzabird/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.
```
git commit -am v$(cat version) && git push
```
To build the source archive:
```
make all
```
If you have a working build environment, you can build librewolf with:
```
make librewolf
```
This extracts the source, and then tries to `./mach build && ./mach package`.
This should be enough for builders to create librewolfies, a more detailed description is in the works with documentation in: CONTRIBUTING.md