Building on Debian10+Gnome
This commit is contained in:
parent
faf4ccd219
commit
7fb6f52251
9 changed files with 123 additions and 85 deletions
|
|
@ -1,31 +0,0 @@
|
|||
Building the package means first getting FF itself to build:
|
||||
------------------------------------------------------------
|
||||
|
||||
These instructions are for an _interactive_ build.
|
||||
|
||||
* Follow the guidelines in the [Building Firefox On Windows](https://firefox-source-docs.mozilla.org/setup/windows_build.html) documentation from mozilla.org. And I actually recommend to follow this documentation until you have a working |mach run|. I also recommend using Git, not Mercurial, as we're going to need it later in our build.sh.
|
||||
* Once you have built the entire mozilla-unified with all the mach bootstrap stuff (which will install the needed binaries in $HOME/.mozbuild), don't forget to copy the entire
|
||||
C:\Program Files\Git folder to /c/mozilla-source to get a sed.exe that understands the -z option,
|
||||
and to get sha256sum.exe.
|
||||
* I also had to download/install in my appdata, python 3, a recent version (just search it), I ended up with the following command line:
|
||||
```
|
||||
C:/Users/librewolf/AppData/Local/Programs/Python/Python39/python.exe ./bootstrap.py --vcs=git --application-choice browser --no-interactive --no-system-changes
|
||||
```
|
||||
* You can now delete the mozilla-unified folder, or keep it, if you want to play with FF itself.
|
||||
* Then clone the windows repo:
|
||||
```
|
||||
git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
||||
```
|
||||
* cd into it, and build with:
|
||||
```
|
||||
bash build.sh
|
||||
```
|
||||
* This should produce a zip and installer exe in your top folder.
|
||||
|
||||
build.sh
|
||||
--------
|
||||
|
||||
You can perform all the steps on one go, or perform the build steps individually, to note:
|
||||
```
|
||||
bash build.sh fetch prepare build package installer_win
|
||||
```
|
||||
|
|
@ -1,36 +0,0 @@
|
|||
Known Issues (2021-02-07)
|
||||
-------------------------
|
||||
|
||||
These issues are already reported, and sorted by priority:
|
||||
|
||||
* about:addons search not working (use [https://addons.mozilla.org/](https://addons.mozilla.org/) directly) ([issue #16](https://gitlab.com/librewolf-community/browser/windows/-/issues/16))
|
||||
* Unable to set as default browser ([issue #15](https://gitlab.com/librewolf-community/browser/windows/-/issues/15))
|
||||
* Automation builds. This seems to be a possibility mentioned [here](https://firefox-source-docs.mozilla.org/setup/windows_build.html#building-firefox-on-windows). ([issue #6](https://gitlab.com/librewolf-community/browser/windows/-/issues/6))
|
||||
* Is there any way to update? (no, not soon) ([issue #12](https://gitlab.com/librewolf-community/browser/windows/-/issues/12))
|
||||
* Previous session tabs, doesn't restoring after restart, although option is enabled in settings. ([issue #11](https://gitlab.com/librewolf-community/browser/windows/-/issues/11))
|
||||
* There some issue with rendering. All looks a bit blurred, or if there no smoothing enabled. ([issue #11](https://gitlab.com/librewolf-community/browser/windows/-/issues/11))
|
||||
* Choosing a bookmark inside an empty tab loads the page in the same tab, else, if the tab is not empty, it loads in a new tab. Right-clicking on the bookmark, and selecting "Open" (which is bold) from the context menu correctly opens the link in the same tab. Essentially, unless the tab is empty, left-clicking on a link behaves as if middle-mouse-clicking on a link. ([issue #11](https://gitlab.com/librewolf-community/browser/windows/-/issues/11))
|
||||
* Middle-mouse-button scrolling does not work? Is this intentional, and if yes, is there a setting to re-enable it again? ([issue #11](https://gitlab.com/librewolf-community/browser/windows/-/issues/11))
|
||||
* When I tweaked some settings according to privacytools.io and I tried coveryourtracks it gave 17 bits of data, while a vanilla hardened Firefox gave 14 bits in same Configuration. This is very concerning as librewolf is supposed to perform better than FF. ([issue #11](https://gitlab.com/librewolf-community/browser/windows/-/issues/11))
|
||||
* _Theme Aspenglow_ and the minimize/maximize/close buttons don't work correctly. ([issue #11](https://gitlab.com/librewolf-community/browser/windows/-/issues/11))
|
||||
* GPO (Group Policy Objects) support. ([issue #3](https://gitlab.com/librewolf-community/browser/windows/-/issues/3))
|
||||
|
||||
Other issues
|
||||
------------
|
||||
|
||||
The following issues are not considered windows-specific:
|
||||
|
||||
* [issue #8](https://gitlab.com/librewolf-community/browser/windows/-/issues/8): belongs in [LibreWolf / Settings](https://gitlab.com/librewolf-community/settings).
|
||||
* [issue #9](https://gitlab.com/librewolf-community/browser/windows/-/issues/9): belongs in [LibreWolf / Settings](https://gitlab.com/librewolf-community/settings).
|
||||
|
||||
The following issues are considered closed:
|
||||
|
||||
* [issue #2](https://gitlab.com/librewolf-community/browser/windows/-/issues/2)
|
||||
* [issue #4](https://gitlab.com/librewolf-community/browser/windows/-/issues/4)
|
||||
|
||||
These don't have their own issue yet:
|
||||
|
||||
* IPV6 issues, it's not working properly?
|
||||
* problem with old sed. does not recognize -z. using the one from Git might be a work around.
|
||||
* What IP address does LW show on my sb site, and why does it show anything at all when Bing does show the ip address of my nginx? what header stuff is going on?
|
||||
* why does this anoying thing happen to my 'copy username' menu in lastpass (the local menu shows up)
|
||||
38
artifacts_deb.sh
Normal file
38
artifacts_deb.sh
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
# sanity checks
|
||||
if [ ! -d obj-x86_64-pc-linux-gnu/dist/firefox ]; then
|
||||
echo "installer_win.sh: directory obj-x86_64-pc-linux-gnu/dist/firefox not found."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
rm -rf ../firefox ../librewolf
|
||||
cp -r obj-x86_64-pc-linux-gnu/dist/firefox ..
|
||||
|
||||
|
||||
pushd ..
|
||||
mv firefox librewolf
|
||||
|
||||
# apply the LibreWolf settings
|
||||
cp -rv settings/* librewolf
|
||||
# rename the executable manually
|
||||
cd librewolf ; mv -v firefox librewolf ; cd ..
|
||||
|
||||
# recreate the zip file..
|
||||
|
||||
# clean garbage files
|
||||
cd librewolf ; rm -rf maintenanceservice* pingsender* firefox.*.xml precomplete removed-files ; cd ..
|
||||
|
||||
# copy the files to register LibreWolf as local app.
|
||||
cp -v branding_files/register-librewolf branding_files/start-librewolf* librewolf
|
||||
|
||||
# be sure to remove the previous zip file..
|
||||
rm -f librewolf-$pkgver.en-US.debian.zip*
|
||||
|
||||
zip -r9 librewolf-$pkgver.en-US.debian.zip librewolf
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
sha256sum librewolf-$pkgver.en-US.debian.zip > librewolf-$pkgver.en-US.debian.zip.sha256sum
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
||||
|
||||
popd
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
# sanity checks
|
||||
if [ ! -d obj-x86_64-pc-mingw32/dist/firefox ]; then
|
||||
echo "installer_win.sh: directory obj-x86_64-pc-mingw32/dist/firefox not found."
|
||||
echo "artifacts_win.sh: directory obj-x86_64-pc-mingw32/dist/firefox not found."
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
|
|
@ -35,7 +35,7 @@ if [ $? -ne 0 ]; then exit 1; fi
|
|||
|
||||
function generate_installer() {
|
||||
# generate the .nsi intaller file.
|
||||
cat >installer_win.nsi <<END
|
||||
cat >artifacts_win.nsi <<END
|
||||
#
|
||||
# Change these values to fit your application...
|
||||
#
|
||||
|
|
@ -123,7 +123,7 @@ END
|
|||
# now to try to make the installer.
|
||||
cp -v common/source_files/browser/branding/librewolf/firefox.ico librewolf/librewolf.ico
|
||||
|
||||
sed "s/pkg_version/$pkgver/g" < installer_win.nsi > tmp.nsi
|
||||
sed "s/pkg_version/$pkgver/g" < artifacts_win.nsi > tmp.nsi
|
||||
makensis-3.01.exe tmp.nsi
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
sha256sum.exe librewolf-$pkgver.en-US.win64-setup.exe > librewolf-$pkgver.en-US.win64-setup.exe.sha256sum
|
||||
7
branding_files/register-librewolf
Executable file
7
branding_files/register-librewolf
Executable file
|
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
sed "s,MYDIR,$(pwd),g" < start-librewolf.desktop.in > start-librewolf.desktop
|
||||
|
||||
mkdir -p "$HOME/.local/share/applications/"
|
||||
cp -v ./start-librewolf.desktop "$HOME/.local/share/applications/"
|
||||
update-desktop-database "$HOME/.local/share/applications/"
|
||||
22
branding_files/start-librewolf
Executable file
22
branding_files/start-librewolf
Executable file
|
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
# Do not (try to) connect to the session manager
|
||||
unset SESSION_MANAGER
|
||||
|
||||
# If XAUTHORITY is unset, set it to its default value of $HOME/.Xauthority
|
||||
# before we change HOME below. (See xauth(1) and #1945.) XDM and KDM rely
|
||||
# on applications using this default value.
|
||||
if [ -z "$XAUTHORITY" ]; then
|
||||
XAUTHORITY=~/.Xauthority
|
||||
export XAUTHORITY
|
||||
fi
|
||||
|
||||
# Try to be agnostic to where we're being started from, chdir to where
|
||||
# the script is.
|
||||
mydir="`dirname "$0"`"
|
||||
test -d "$mydir" && cd "$mydir"
|
||||
|
||||
#./librewolf --class "LibreWolf" -profile TorBrowser/Data/Browser/profile.default "${@}" > "$logfile" 2>&1 </dev/null &
|
||||
./librewolf --detach --class "LibreWolf" > /dev/null 2>&1 </dev/null &
|
||||
|
||||
exit $?
|
||||
10
branding_files/start-librewolf.desktop.in
Normal file
10
branding_files/start-librewolf.desktop.in
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=LibreWolf
|
||||
GenericName=Web Browser
|
||||
Comment=LibreWolf Browser
|
||||
Categories=Network;WebBrowser;Security;
|
||||
Exec=MYDIR/./start-librewolf
|
||||
X-TorBrowser-ExecShell=MYDIR/./start-librewolf
|
||||
Icon=MYDIR/./browser/chrome/icons/default/default64.png
|
||||
StartupWMClass=LibreWolf
|
||||
58
build.sh
58
build.sh
|
|
@ -8,17 +8,20 @@ _pkgname=LibreWolf
|
|||
pkgver=86.0.1
|
||||
|
||||
|
||||
deps_apt() {
|
||||
echo "deps_apt: begin."
|
||||
deps_deb() {
|
||||
echo "deps_deb: begin."
|
||||
deps="python3 python3-distutils clang pkg-config libpulse-dev gcc curl wget nodejs libpango1.0-dev nasm yasm zip m4 libgtk-3-dev libgtk2.0-dev libdbus-glib-1-dev libxt-dev"
|
||||
apt -y install $deps
|
||||
echo "deps_deb: done."
|
||||
}
|
||||
|
||||
rustup() {
|
||||
# rust needs special love: https://www.atechtown.com/install-rust-language-on-debian-10/
|
||||
echo "rustup: begin."
|
||||
curl https://sh.rustup.rs -sSf | sh
|
||||
source $HOME/.cargo/env
|
||||
cargo install cbindgen
|
||||
echo "deps_apt: done."
|
||||
echo "rustup: done."
|
||||
}
|
||||
|
||||
deps_rpm() {
|
||||
|
|
@ -202,8 +205,8 @@ build() {
|
|||
|
||||
|
||||
|
||||
artifacts() {
|
||||
echo "artifacts: begin."
|
||||
artifacts_win() {
|
||||
echo "artifacts_win: begin."
|
||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||
cd firefox-$pkgver
|
||||
|
||||
|
|
@ -215,7 +218,22 @@ artifacts() {
|
|||
. ../installer_win.sh
|
||||
|
||||
cd ..
|
||||
echo "artifacts: done."
|
||||
echo "artifacts_win: done."
|
||||
}
|
||||
|
||||
artifacts_deb()
|
||||
{
|
||||
echo "artifacts_deb: begin."
|
||||
if [ ! -d firefox-$pkgver ]; then exit 1; fi
|
||||
cd firefox-$pkgver
|
||||
|
||||
./mach package
|
||||
if [ $? -ne 0 ]; then exit 1; fi
|
||||
|
||||
. ../artifacts_deb.sh
|
||||
|
||||
cd ..
|
||||
echo "artifacts_deb: done."
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -235,8 +253,8 @@ fi
|
|||
|
||||
done_something=0
|
||||
|
||||
if [[ "$*" == *deps_apt* ]]; then
|
||||
deps_apt
|
||||
if [[ "$*" == *deps_deb* ]]; then
|
||||
deps_deb
|
||||
done_something=1
|
||||
fi
|
||||
if [[ "$*" == *deps_rpm* ]]; then
|
||||
|
|
@ -267,8 +285,12 @@ if [[ "$*" == *build* ]]; then
|
|||
build
|
||||
done_something=1
|
||||
fi
|
||||
if [[ "$*" == *artifacts* ]]; then
|
||||
artifacts
|
||||
if [[ "$*" == *artifacts_win* ]]; then
|
||||
artifacts_win
|
||||
done_something=1
|
||||
fi
|
||||
if [[ "$*" == *artifacts_deb* ]]; then
|
||||
artifacts_deb
|
||||
done_something=1
|
||||
fi
|
||||
|
||||
|
|
@ -281,15 +303,21 @@ Use: ./build.sh fetch extract do_patches build package installer_win
|
|||
extract - extract the tarball.
|
||||
do_patches - create a mozconfig, and patch the source.
|
||||
build - the actual build.
|
||||
artifacts - build the .zip and NSIS setup.exe installer.
|
||||
artifacts_win - build the .zip and NSIS setup.exe installer.
|
||||
|
||||
mach_env - * create mach build environment.
|
||||
rustup - * perform a rustup for this user.
|
||||
deps_rpm - * install dependencies with rpm.
|
||||
deps_apt - * install dependencies with apt.
|
||||
Linux related functions:
|
||||
|
||||
mach_env - create mach build environment.
|
||||
rustup - perform a rustup for this user.
|
||||
deps_rpm - install dependencies with rpm.
|
||||
deps_deb - install dependencies with apt.
|
||||
artifacts_deb - create a dist zip file (for debian).
|
||||
|
||||
If no parameters are given, it prints this help message.
|
||||
|
||||
For debian: I used:
|
||||
$ sudo ./build.sh deps_deb
|
||||
$ ./build.sh rustup mach_env fetch extract do_patches build artifacts_deb
|
||||
EOF
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue