Compare commits

..

No commits in common. "master" and "v87.0" have entirely different histories.

15 changed files with 864 additions and 17 deletions

11
.gitignore vendored Normal file
View file

@ -0,0 +1,11 @@
firefox-*
librewolf-*
megabar.patch
remove_addons.patch
unity-menubar.patch
context-menu.patch
mozilla-vpn-ad.patch
mozconfig
Makefile
librewolf
tmp.nsi

6
.gitmodules vendored Normal file
View file

@ -0,0 +1,6 @@
[submodule "settings"]
path = settings
url = https://gitlab.com/librewolf-community/settings.git
[submodule "common"]
path = common
url = https://gitlab.com/librewolf-community/browser/common.git

View file

@ -1,30 +1,44 @@
# LibreWolf Issue Tracker & Update Tools 🚀
# LibreWolf for windows
Welcome to the **LibreWolf for Windows** repository! This repository is now dedicated to the **Issue Tracker**. Submit your issues and get the latest updates on LibreWolf for Windows.
* [download latest release](https://gitlab.com/librewolf-community/browser/windows/-/releases).
* [issue tracker](https://gitlab.com/librewolf-community/browser/windows/-/issues).
To download the latest release, visit the [official LibreWolf release page](https://gitlab.com/librewolf-community/browser/bsys6/-/releases). For installation options, check out the [FAQ](https://librewolf.net/docs/faq/).
# download locations
## Update Tools 🛠️
* [[arch releases](https://gitlab.com/librewolf-community/browser/arch/-/releases)] - [AUR(en)](https://aur.archlinux.org/packages/librewolf/)
* [[linux releases](https://gitlab.com/librewolf-community/browser/linux/-/releases)] - Flatpak, AppImage, Arch and other Linux builds of the LibreWolf browser.
* [[windows releases](https://gitlab.com/librewolf-community/browser/windows/-/releases)] - (this repository)
Stay secure and up-to-date with these LibreWolf update tools:
# settings repository
1. **LibreWolf WinUpdater**: Kudos to @ltguillaume for this [automatic updater](https://codeberg.org/ltguillaume/librewolf-winupdater) that can be set up to update LibreWolf automatically or run manually.
* [[settings repository](https://gitlab.com/librewolf-community/settings)] - all _librewolf.cfg_ stuff.. _([issues](https://gitlab.com/librewolf-community/settings/-/issues))_
2. **LibreWolf Update Checker Extension**: Created by Defkev, this [extension](https://addons.mozilla.org/en-US/firefox/addon/librewolf-updater/) will notify you when an update is available and guide you to the download link.
# librewolf repositories
> Please note: The *updater* can _install_ updates automatically, while the *extension* can only _check_ for updates.
* [[common](https://gitlab.com/librewolf-community/browser/common)] -> _([issues](https://gitlab.com/librewolf-community/browser/common/-/issues))_
* [[linux](https://gitlab.com/librewolf-community/browser/linux)] -> _([issues](https://gitlab.com/librewolf-community/browser/linux/-/issues))_
* [[website](https://gitlab.com/librewolf-community/librewolf-community.gitlab.io)] - _([issues](https://gitlab.com/librewolf-community/librewolf-community.gitlab.io/-/issues))_
## LibreWolf for Windows 🖥️
# distro repositories
- LibreWolf supports multiple UI languages, available in settings.
- The latest **-portable.zip** release is self-contained and can be run on removable storage.
* [[arch](https://gitlab.com/librewolf-community/browser/arch)] -> _([issues](https://gitlab.com/librewolf-community/browser/arch/-/issues))_
* [[debian](https://gitlab.com/librewolf-community/browser/debian)] -> _([issues](https://gitlab.com/librewolf-community/browser/debian/-/issues))_
* [[flatpack](https://gitlab.com/librewolf-community/browser/flatpak)] -> _([issues](https://gitlab.com/librewolf-community/browser/flatpak/-/issues))_
* [[gentoo](https://gitlab.com/librewolf-community/browser/gentoo)] -> _([issues](https://gitlab.com/librewolf-community/browser/gentoo/-/issues))_
* [[macos](https://gitlab.com/librewolf-community/browser/macos)] -> _([issues](https://gitlab.com/librewolf-community/browser/macos/-/issues))_
* [[windows](https://gitlab.com/librewolf-community/browser/windows)] -> _([issues](https://gitlab.com/librewolf-community/browser/windows/-/issues))_
## Issue Tracker 🎫
# community links
- For issues with Settings or Advanced Settings (`about:config`), submit them to the [settings repository](https://gitlab.com/librewolf-community/settings/-/issues).
- For other issues, such as crashes/theme/graphics/speed problems, submit them to [issues for windows repository](https://gitlab.com/librewolf-community/browser/windows/-/issues).
* If at all possible, pleasse go to the relevant 'issues' link and start discussing thing there.
* [[reddit](https://www.reddit.com/r/LibreWolf/)] - [r/LibreWolf](https://www.reddit.com/r/LibreWolf/) 😺
* [[gitter](https://gitter.im/librewolf-community/librewolf)]
## Building from Source 🏗️
# hardening firefox
- Our `bsys` build system supports cross-compiling from Linux to Windows. Building the Windows version from within Windows is not tested yet.
- The build system can be found here: [bsys6](https://gitlab.com/librewolf-community/browser/bsys6).
* **tools**: [[deviceinfo.me](https://www.deviceinfo.me/)], [[coveryourtracks](https://coveryourtracks.eff.org/learn)], [[privacytools.io](https://privacytools.io/)],
* eff.org: [surveillance self-defense](https://ssd.eff.org/en).
* mozilla: [Firefox](https://www.mozilla.org/en-US/firefox/new/), [Thunderbird](https://www.thunderbird.net/en-US/); ...
* news: [ghacks](https://www.ghacks.net/)
* wikipedia: [Browser fingerprinting](https://en.wikipedia.org/wiki/Device_fingerprint).
* wikipedia: [Browser security](https://en.wikipedia.org/wiki/Browser_security), [browser exploit](https://en.wikipedia.org/wiki/Browser_exploit).

38
artifacts_deb.sh Normal file
View file

@ -0,0 +1,38 @@
#!/usr/bin/bash
# sanity checks
if [ ! -d obj-x86_64-pc-linux-gnu/dist/firefox ]; then
echo "installer_deb.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.deb.zip*
zip -r9 librewolf-$pkgver.en-US.deb.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
sha256sum librewolf-$pkgver.en-US.deb.zip > librewolf-$pkgver.en-US.deb.zip.sha256sum
if [ $? -ne 0 ]; then exit 1; fi
popd

38
artifacts_rpm.sh Normal file
View file

@ -0,0 +1,38 @@
#!/usr/bin/bash
# sanity checks
if [ ! -d obj-x86_64-pc-linux-gnu/dist/firefox ]; then
echo "installer_rpm.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.rpm.zip*
zip -r9 librewolf-$pkgver.en-US.rpm.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
sha256sum librewolf-$pkgver.en-US.rpm.zip > librewolf-$pkgver.en-US.rpm.zip.sha256sum
if [ $? -ne 0 ]; then exit 1; fi
popd

122
artifacts_win.nsi Normal file
View file

@ -0,0 +1,122 @@
#
# Change these values to fit your application...
#
!define APPNAME "LibreWolf" # Full app name, like: "Gtk+ 2.0 Hello World"
!define PROGNAME "librewolf" # executable name, like: gtk2hello
!define PROG_VERSION "pkg_version" # the program version, like: 0.3.0
!define ICON_NAME "librewolf.ico" # filename of icon to use for this app
!define COMPANYNAME "LibreWolf" # Your name, or company (or just the program name)
!define ESTIMATED_SIZE 190000 # Estimated size (in KB) of installed program for use in "add or remove programs" / 190 MB
#
# The actual installer/uninstaller, you should not need to change much here below
#
Name "${PROGNAME}"
OutFile "${PROGNAME}-${PROG_VERSION}.en-US.win64-setup.exe"
InstallDir $PROGRAMFILES64\${APPNAME}
RequestExecutionLevel admin
Page directory
Page instfiles
function .onInit
setShellVarContext all
functionEnd
Section "${PROGNAME}"
# Copy files
SetOutPath $INSTDIR
File /r librewolf\*.*
# Start Menu
createDirectory "$SMPROGRAMS\${COMPANYNAME}"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\${PROGNAME}.exe" "" "$INSTDIR\${ICON_NAME}"
createShortCut "$SMPROGRAMS\${COMPANYNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" ""
# Uninstaller
writeUninstaller "$INSTDIR\uninstall.exe"
# Registry information for add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "QuietUninstallString" "$\"$INSTDIR\uninstall.exe$\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "InstallLocation" "$\"$INSTDIR$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayIcon" "$\"$INSTDIR\${ICON_NAME}$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "Publisher" "${COMPANYNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "DisplayVersion" "${PROG_VERSION}"
# There is no option for modifying or repairing the install
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "NoRepair" 1
# Set the INSTALLSIZE constant (!defined at the top of this script) so Add/Remove Programs can accurately report the size
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "EstimatedSize" ${ESTIMATED_SIZE}
#
# Registry information to let Windows pick us up in the list of available browsers
#
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf" "" "LibreWolf"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" "ApplicationDescription" "LibreWolf"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" "ApplicationIcon" "$INSTDIR\librewolf.exe,0"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities" "ApplicationName" "LibreWolf"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\FileAssociations" ".htm" "LibreWolfHTM"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\FileAssociations" ".html" "LibreWolfHTM"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\Startmenu" "StartMenuInternet" "LibreWolf"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\URLAssociations" "http" "LibreWolfHTM"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\Capabilities\URLAssociations" "https" "LibreWolfHTM"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\DefaultIcon" "" "$INSTDIR\librewolf.exe,0"
WriteRegStr HKLM "Software\Clients\StartMenuInternet\LibreWolf\shell\open\command" "" "$INSTDIR\librewolf.exe"
WriteRegStr HKLM "Software\RegisteredApplications" "LibreWolf" "Software\Clients\StartMenuInternet\LibreWolf\Capabilities"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM" "" "LibreWolf Handler"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM" "AppUserModelId" "LibreWolf"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "AppUserModelId" "LibreWolf"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationIcon" "$INSTDIR\librewolf.exe,0"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationName" "LibreWolf"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationDescription" "Howling to Freedom"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationCompany" "LibreWolf"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\DefaultIcon" "" "$INSTDIR\librewolf.exe,0"
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\shell\open\command" "" "$INSTDIR\librewolf.exe %1"
SectionEnd
# Before uninstall, ask for confirmation
function un.onInit
SetShellVarContext all
#Verify the uninstaller - last chance to back out
MessageBox MB_OKCANCEL "Permanantly remove ${APPNAME}?" IDOK next
Abort
next:
functionEnd
# Uninstaller
section "uninstall"
# Remove Start Menu launcher
delete "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk"
delete "$SMPROGRAMS\${COMPANYNAME}\Uninstall.lnk"
# Try to remove the Start Menu folder - this will only happen if it is empty
rmDir "$SMPROGRAMS\${COMPANYNAME}"
# Remove files
rmDir /r $INSTDIR
# Remove uninstaller information from the registry
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}"
#
# Windows default browser integration
#
DeleteRegKey HKLM "Software\Clients\StartMenuInternet\LibreWolf"
DeleteRegKey HKLM "Software\RegisteredApplications"
DeleteRegKey HKLM "Software\Classes\LibreWolfHTM"
sectionEnd

132
artifacts_win.sh Normal file
View file

@ -0,0 +1,132 @@
# sanity checks
if [ ! -d obj-x86_64-pc-mingw32/dist/firefox ]; then
echo "artifacts_win.sh: directory obj-x86_64-pc-mingw32/dist/firefox not found."
exit 1;
fi
rm -rf ../firefox ../librewolf
cp -r obj-x86_64-pc-mingw32/dist/firefox ..
pushd ..
mv firefox librewolf
# apply the LibreWolf settings
cp -rv settings/* librewolf
# rename the executable manually
cd librewolf ; mv -v firefox.exe librewolf.exe ; cd ..
# recreate the zip file..
# clean garbage files
cd librewolf ; rm -rf maintenanceservice* pingsender.exe firefox.*.xml precomplete removed-files ; cd ..
# be sure to remove the previous zip file..
rm -f librewolf-$pkgver.en-US.win64.zip*
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
if [ $? -ne 0 ]; then exit 1; fi
sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
if [ $? -ne 0 ]; then exit 1; fi
function generate_installer() {
# generate the .nsi intaller file.
cat >artifacts_win.nsi <<END
#
# Change these values to fit your application...
#
!define APPNAME "LibreWolf" # Full app name, like: "Gtk+ 2.0 Hello World"
!define PROGNAME "librewolf" # executable name, like: gtk2hello
!define PROG_VERSION "${pkgver}" # the program version, like: 0.3.0
!define ICON_NAME "librewolf.ico" # filename of icon to use for this app
!define COMPANYNAME "LibreWolf" # Your name, or company (or just the program name)
!define ESTIMATED_SIZE 190000 # Estimated size (in KB) of installed program for use in "add or remove programs" / 190 MB
#
# The actual installer/uninstaller, you should not need to change much here below
#
Name "\${PROGNAME}"
OutFile "\${PROGNAME}-\${PROG_VERSION}.en-US.win64-setup.exe"
InstallDir \$PROGRAMFILES64\\\${APPNAME}
RequestExecutionLevel admin
Page directory
Page instfiles
function .onInit
setShellVarContext all
functionEnd
Section "\${PROGNAME}"
# Copy files
SetOutPath \$INSTDIR
File /r librewolf\*.*
# Start Menu
createDirectory "\$SMPROGRAMS\\\${COMPANYNAME}"
createShortCut "\$SMPROGRAMS\\\${COMPANYNAME}\\\${APPNAME}.lnk" "\$INSTDIR\\\${PROGNAME}.exe" "" "\$INSTDIR\\\${ICON_NAME}"
# Uninstaller
writeUninstaller "\$INSTDIR\uninstall.exe"
# Registry information for add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "DisplayName" "\${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "UninstallString" "\$\\"\$INSTDIR\uninstall.exe\$\\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "QuietUninstallString" "\$\\"\$INSTDIR\uninstall.exe\$\\" /S"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "InstallLocation" "\$\\"\$INSTDIR\$\\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "DisplayIcon" "\$\\"\$INSTDIR\\\${ICON_NAME}$\\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "Publisher" "\${COMPANYNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "DisplayVersion" "\${PROG_VERSION}"
# There is no option for modifying or repairing the install
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "NoRepair" 1
# Set the INSTALLSIZE constant (!defined at the top of this script) so Add/Remove Programs can accurately report the size
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}" "EstimatedSize" \${ESTIMATED_SIZE}
SectionEnd
# Before uninstall, ask for confirmation
function un.onInit
SetShellVarContext all
#Verify the uninstaller - last chance to back out
MessageBox MB_OKCANCEL "Permanantly remove \${APPNAME}?" IDOK next
Abort
next:
functionEnd
# Uninstaller
section "uninstall"
# Remove Start Menu launcher
delete "\$SMPROGRAMS\\\${COMPANYNAME}\\\${APPNAME}.lnk"
# Try to remove the Start Menu folder - this will only happen if it is empty
rmDir "\$SMPROGRAMS\\\${COMPANYNAME}"
# Remove files
rmDir /r \$INSTDIR
# Remove uninstaller information from the registry
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\\\${COMPANYNAME} \${APPNAME}"
sectionEnd
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" < 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
if [ $? -ne 0 ]; then exit 1; fi
popd

View file

@ -0,0 +1,16 @@
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_NAME=librewolf
MOZ_APP_BASENAME=LibreWolf
MOZ_APP_PROFILE=LibreWolf
MOZ_APP_VENDOR="LibreWolf Community"
MOZ_APP_DISPLAYNAME=LibreWolf
MOZ_APP_REMOTINGNAME=librewolf
MOZ_DEV_EDITION=1
MOZ_TELEMETRY_REPORTING=
MOZ_SERVICES_HEALTHREPORT=
MOZ_NORMANDY=
MOZ_REQUIRE_SIGNING=
MOZ_DEFAULT_BROWSER_AGENT=0

View file

@ -0,0 +1,46 @@
#! /bin/sh
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
MOZ_APP_BASENAME=LibreWolf
MOZ_APP_VENDOR="LibreWolf Community"
MOZ_UPDATER=0
if test "$OS_ARCH" = "WINNT"; then
if ! test "$HAVE_64BIT_BUILD"; then
if test "$MOZ_UPDATE_CHANNEL" = "nightly" -o \
"$MOZ_UPDATE_CHANNEL" = "nightly-try" -o \
"$MOZ_UPDATE_CHANNEL" = "aurora" -o \
"$MOZ_UPDATE_CHANNEL" = "beta" -o \
"$MOZ_UPDATE_CHANNEL" = "release"; then
if ! test "$MOZ_DEBUG"; then
if ! test "$USE_STUB_INSTALLER"; then
# Expect USE_STUB_INSTALLER from taskcluster for downstream task consistency
echo "ERROR: STUB installer expected to be enabled but"
echo "ERROR: USE_STUB_INSTALLER is not specified in the environment"
exit 1
fi
MOZ_STUB_INSTALLER=1
fi
fi
fi
fi
BROWSER_CHROME_URL=chrome://browser/content/browser.xhtml
# MOZ_APP_DISPLAYNAME will be set by branding/configure.sh
# MOZ_BRANDING_DIRECTORY is the default branding directory used when none is
# specified. It should never point to the "official" branding directory.
# For mozilla-beta, mozilla-release, or mozilla-central repositories, use
# "unofficial" branding.
# For the mozilla-aurora repository, use "aurora".
MOZ_BRANDING_DIRECTORY=browser/branding/librewolf
MOZ_OFFICIAL_BRANDING_DIRECTORY=browser/branding/librewolf
MOZ_APP_ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
MOZ_PROFILE_MIGRATOR=1
# Include the DevTools client, not just the server (which is the default)
MOZ_DEVTOOLS=all

View 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
View 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 $?

View 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

383
build.sh Executable file
View file

@ -0,0 +1,383 @@
#!/usr/bin/bash
# build.sh - build librewolf on windows
# derived from https://gitlab.com/librewolf-community/browser/linux/-/blob/master/PKGBUILD
set -e
pkgver=87.0
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."
}
deps_rpm() {
echo "deps_rpm: begin."
deps="python3 python3-distutils-extra clang pkg-config gcc curl wget nodejs nasm yasm zip m4 python3-zstandard python-zstandard python-devel python3-devel gtk3-devel llvm gtk2-devel dbus-glib-devel libXt-devel pulseaudio-libs-devel"
dnf -y install $deps
echo "deps_rpm: 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 "rustup: done."
}
mach_env() {
echo "mach_env: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
./mach create-mach-environment
if [ $? -ne 0 ]; then exit 1; fi
cd ..
echo "mach_env: done."
}
git_subs() {
git submodule update --recursive
git submodule foreach git merge origin master
}
fetch() {
echo "fetch: begin."
# fetch the firefox source.
rm -f firefox-$pkgver.source.tar.xz
wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -f firefox-$pkgver.source.tar.xz ]; then exit 1; fi
echo "fetch: done."
}
extract() {
echo "extract: begin."
echo "Deleting previous firefox-${pkgver} ..."
rm -rf firefox-$pkgver
echo "Extracting firefox-$pkgver.source.tar.xz ..."
tar xf firefox-$pkgver.source.tar.xz
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -d firefox-$pkgver ]; then exit 1; fi
echo "extract: done."
}
do_patches() {
echo "do_patches: begin."
# get the patches
echo 'Getting patches..'
rm -f context-menu.patch megabar.patch mozilla-vpn-ad.patch remove_addons.patch unity-menubar.patch
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/context-menu.patch
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -f context-menu.patch ]; then exit 1; fi
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -f megabar.patch ]; then exit 1; fi
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/mozilla-vpn-ad.patch
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -f mozilla-vpn-ad.patch ]; then exit 1; fi
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -f remove_addons.patch ]; then exit 1; fi
wget -q https://gitlab.com/librewolf-community/browser/linux/-/raw/master/unity-menubar.patch
if [ $? -ne 0 ]; then exit 1; fi
if [ ! -f unity-menubar.patch ]; then exit 1; fi
# create mozconfig..
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
cat >../mozconfig <<END
ac_add_options --enable-application=browser
# This supposedly speeds up compilation (We test through dogfooding anyway)
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --enable-release
ac_add_options --enable-hardening
ac_add_options --enable-rust-simd
ac_add_options --enable-optimize
# Branding
ac_add_options --enable-update-channel=release
# theming bugs: ac_add_options --with-app-name=librewolf
# theming bugs: ac_add_options --with-app-basename=LibreWolf
ac_add_options --with-branding=browser/branding/librewolf
ac_add_options --with-distribution-id=io.gitlab.librewolf-community
ac_add_options --with-unsigned-addon-scopes=app,system
ac_add_options --allow-addon-sideload
export MOZ_REQUIRE_SIGNING=0
# Features
ac_add_options --disable-crashreporter
ac_add_options --disable-updater
# Disables crash reporting, telemetry and other data gathering tools
mk_add_options MOZ_CRASHREPORTER=0
mk_add_options MOZ_DATA_REPORTING=0
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
mk_add_options MOZ_TELEMETRY_REPORTING=0
# first attempt to fix the win32 vcredist issue results in build errors..
#WIN32_REDIST_DIR=$VCINSTALLDIR\redist\x86\Microsoft.VC141.CRT
END
echo 'Applying patches...'
# Apply patches..
# context-menu.patch megabar.patch mozilla-vpn-ad.patch remove_addons.patch unity-menubar.patch
echo 'context-menu.patch:'
patch -p1 -i ../context-menu.patch
if [ $? -ne 0 ]; then exit 1; fi
echo 'megabar.patch:'
patch -p1 -i ../megabar.patch
if [ $? -ne 0 ]; then exit 1; fi
echo 'mozilla-vpn-ad.patch:'
patch -p1 -i ../mozilla-vpn-ad.patch
if [ $? -ne 0 ]; then exit 1; fi
echo 'remove_addons.patch:'
patch -p1 -i ../remove_addons.patch
if [ $? -ne 0 ]; then exit 1; fi
echo 'unity-menubar.patch: (skipped)'
#patch -p1 -i ../unity-menubar.patch
#if [ $? -ne 0 ]; then exit 1; fi
# Disabling Pocket
sed -i "s/'pocket'/#'pocket'/g" browser/components/moz.build
if [ $? -ne 0 ]; then exit 1; fi
# this one only to remove an annoying error message:
sed -i 's#SaveToPocket.init();#// SaveToPocket.init();#g' browser/components/BrowserGlue.jsm
if [ $? -ne 0 ]; then exit 1; fi
# Remove Internal Plugin Certificates
_cert_sed='s#if (aCert.organizationalUnit == "Mozilla [[:alpha:]]\+") {\n'
_cert_sed+='[[:blank:]]\+return AddonManager\.SIGNEDSTATE_[[:upper:]]\+;\n'
_cert_sed+='[[:blank:]]\+}#'
_cert_sed+='// NOTE: removed#g'
# on windows: the sed.exe in MozBuild is too old, no -z, using the one from Git instead.
if [ -f '/c/mozilla-build/start-shell.bat' ]; then
mysed='/c/mozilla-source/Git/usr/bin/sed.exe'
if [ ! -f $mysed ]; then
echo 'build.sh: For the build to work, copy "c:\program files\Git" folder into "c:\mozilla-source".'
exit
fi
else
mysed='sed'
fi
$mysed -z "$_cert_sed" -i toolkit/mozapps/extensions/internal/XPIInstall.jsm
if [ $? -ne 0 ]; then exit 1; fi
# allow SearchEngines option in non-ESR builds
sed -i 's#"enterprise_only": true,#"enterprise_only": false,#g' browser/components/enterprisepolicies/schemas/policies-schema.json
if [ $? -ne 0 ]; then exit 1; fi
_settings_services_sed='s#firefox.settings.services.mozilla.com#f.s.s.m.c.qjz9zk#g'
# stop some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10)
sed "$_settings_services_sed" -i browser/components/newtab/data/content/activity-stream.bundle.js
if [ $? -ne 0 ]; then exit 1; fi
sed "$_settings_services_sed" -i modules/libpref/init/all.js
if [ $? -ne 0 ]; then exit 1; fi
sed "$_settings_services_sed" -i services/settings/Utils.jsm
if [ $? -ne 0 ]; then exit 1; fi
sed "$_settings_services_sed" -i toolkit/components/search/SearchUtils.jsm
if [ $? -ne 0 ]; then exit 1; fi
# copy branding resources
cp -vr ../common/source_files/* ./
# new branding stuff
cp -v ../branding_files/configure.sh browser/branding/librewolf
cp -v ../branding_files/confvars.sh browser/confvars.sh
# just a straight copy for now..
cp -v ../mozconfig .
cd ..
echo "do_patches: done."
}
build() {
echo "build: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
./mach build
if [ $? -ne 0 ]; then exit 1; fi
cd ..
echo "build: done."
}
artifacts_win() {
echo "artifacts_win: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
./mach package
if [ $? -ne 0 ]; then exit 1; fi
# there is just too much garbage in this installer function to
# have it all here..
. ../artifacts_win.sh
cd ..
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."
}
artifacts_rpm()
{
echo "artifacts_rpm: begin."
if [ ! -d firefox-$pkgver ]; then exit 1; fi
cd firefox-$pkgver
./mach package
if [ $? -ne 0 ]; then exit 1; fi
. ../artifacts_rpm.sh
cd ..
echo "artifacts_rpm: done."
}
# windows: change $PATH to find all the build tools in .mozbuild
# this might do the trick on macos aswell?
if [ -f '/c/mozilla-build/start-shell.bat' ]; then
export TPATH=$HOME/.mozbuild/clang/bin:$HOME/.mozbuild/cbindgen:$HOME/.mozbuild/node:$HOME/.mozbuild/nasm
export PATH=$TPATH:$PATH
fi
if [ -f $HOME/.cargo/env ]; then
source $HOME/.cargo/env
fi
# process commandline arguments and do something
done_something=0
if [[ "$*" == *git_subs* ]]; then
git_subs
done_something=1
fi
if [[ "$*" == *deps_deb* ]]; then
deps_deb
done_something=1
fi
if [[ "$*" == *deps_rpm* ]]; then
deps_rpm
done_something=1
fi
if [[ "$*" == *rustup* ]]; then
rustup
done_something=1
fi
if [[ "$*" == *fetch* ]]; then
fetch
done_something=1
fi
if [[ "$*" == *extract* ]]; then
extract
done_something=1
fi
if [[ "$*" == *do_patches* ]]; then
do_patches
done_something=1
fi
if [[ "$*" == *mach_env* ]]; then
mach_env
done_something=1
fi
if [[ "$*" == *build* ]]; then
build
done_something=1
fi
if [[ "$*" == *artifacts_win* ]]; then
artifacts_win
done_something=1
fi
if [[ "$*" == *artifacts_deb* ]]; then
artifacts_deb
done_something=1
fi
if [[ "$*" == *artifacts_rpm* ]]; then
artifacts_rpm
done_something=1
fi
# by default, give help..
if (( done_something == 0 )); then
cat <<EOF
Use: ./build.sh fetch extract do_patches build package artifacts_win
git_subs - update git submodules
fetch - fetch the tarball.
extract - extract the tarball.
do_patches - create a mozconfig, and patch the source.
build - the actual build.
artifacts_win - build the .zip and NSIS setup.exe installer.
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 debian10).
artifacts_rpm - create a dist zip file (for fedora33).
If no parameters are given, it prints this help message.
For debian, use:
$ sudo ./build.sh deps_deb
$ ./build.sh rustup mach_env fetch extract do_patches build artifacts_deb
EOF
exit 1
fi

1
common Submodule

@ -0,0 +1 @@
Subproject commit 9120ca6c6709673b0188a081ec6383c4db75d169

1
settings Submodule

@ -0,0 +1 @@
Subproject commit 9ba36a97a914a9ec96860c836d420baacbb3bd66