Compare commits

..

No commits in common. "master" and "85.0.1-1" have entirely different histories.

13 changed files with 560 additions and 17 deletions

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
firefox-*
librewolf-*
megabar.patch
remove_addons.patch
unity-menubar.patch
mozconfig
Makefile
librewolf

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,85 @@
# LibreWolf Issue Tracker & Update Tools 🚀 LibreWolf for Win64
-------------------
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. This repository is still a work in progress.
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/). But we have a zip file and an installer available for testing right now..
## Update Tools 🛠️ Download link to this prerelease is:
* Zip file is: [librewolf-85.0.en-US.win64.zip](https://gitlab.com/librewolf-community/browser/windows/uploads/5e9d436515d315d4e8953f88bf02bd99/librewolf-85.0.en-US.win64.zip).
* The installer is: [librewolf-85.0.en-US.win64-setup.exe](https://gitlab.com/librewolf-community/browser/windows/uploads/ec6f7e7dc1096bf7730f503d856d3a9f/librewolf-85.0.en-US.win64-setup.exe).
Stay secure and up-to-date with these LibreWolf update tools: Note: If your version of LibreWolf does _not_ run, an additional install of the [Microsoft Visual C++ 2010 Redistributable Package (x64)](https://www.microsoft.com/en-us/download/details.aspx?id=14632) might be required.
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. Building the package:
---------------------
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. For now, if you want to attempt to build, this build does require you to:
> Please note: The *updater* can _install_ updates automatically, while the *extension* can only _check_ for updates. * First build the mozilla-unified as explained in the mozilla docs, using all the ./mach bootstrap stuff
* You can delete this mozilla-unified thing to save some space (try ./mach run on it just for fun)
* Then clone the windows repo
* cd into it, and build with: **time bash build.sh**
* You can perform each of the build steps individually and the overall script structure follows PKGBULD as used on Archlinux
* This will produce a **librewolf-85.0.en-US.win64.zip** in this windows folder.
## LibreWolf for Windows 🖥️ 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.
- LibreWolf supports multiple UI languages, available in settings. build.sh
- The latest **-portable.zip** release is self-contained and can be run on removable storage. --------
## Issue Tracker 🎫 You can perform all the steps on one go, or perform the build steps individually, to note:
* build.sh fetch prepare build package installer_win
- For issues with Settings or Advanced Settings (`about:config`), submit them to the [settings repository](https://gitlab.com/librewolf-community/settings/-/issues). To do:
- 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). ------
## Building from Source 🏗️ * Listing known issues in this README.md
* Branding issues.
* Improve this README.md to contain better, detailed instructions on how to build.
* problem with old sed. does not recognize -z. using the one from Git might be a work around.
- 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). Branding issue: resource files
------------------------------
* This section is just some notes.
* Build fail on missing stubinstaller (might be a FF bug as it should just take missing
stuff from the nightly branding folder?)
```
$ mkdir stubinstaller
$ cp bgstub.jpg stubinstaller
$ pwd
/c/mozilla-source/firefox-85.0/browser/branding/librewolf
$
* checking all the different files in nightly and librewolf
$ cd nightly
$ find . | sort > /c/mozilla-source/branding-nightly.txt
$ cd ../librewolf/
$ find . | sort > /c/mozilla-source/branding-librewolf.txt
$ diff branding-nightly.txt branding-librewolf.txt
4a5,6
> ./bgstub.jpg
> ./bgstub_2x.jpg
7a10
> ./content/about-background.png
9,10d11
< ./content/about-logo.svg
< ./content/about-logo@2x.png
14,15d14
< ./content/aboutlogins.svg
< ./content/firefox-wordmark.svg
22,24d20
< ./default22.png
< ./default24.png
< ./default256.png
$
```

61
README2.md Normal file
View file

@ -0,0 +1,61 @@
Just some notes
---------------
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.
To build, one should use the following command in the checked out windows repo:
$ time bash build.sh fetch prepare build package
the final .zip is in:
C:\mozilla-source\windows
* problem with old sed. does not recognize -z. using the one from Git might be a work around.
BRANDING: resource files
========================
* build fail on missing stubinstaller (might be a FF bug as it should just take missing
stuff from the nightly branding folder?)
```
$ mkdir stubinstaller
$ cp bgstub.jpg stubinstaller
$ pwd
/c/mozilla-source/firefox-85.0/browser/branding/librewolf
$
* checking all the different files in nightly and librewolf
$ cd nightly
$ find . | sort > /c/mozilla-source/branding-nightly.txt
$ cd ../librewolf/
$ find . | sort > /c/mozilla-source/branding-librewolf.txt
$ diff branding-nightly.txt branding-librewolf.txt
4a5,6
> ./bgstub.jpg
> ./bgstub_2x.jpg
7a10
> ./content/about-background.png
9,10d11
< ./content/about-logo.svg
< ./content/about-logo@2x.png
14,15d14
< ./content/aboutlogins.svg
< ./content/firefox-wordmark.svg
22,24d20
< ./default22.png
< ./default24.png
< ./default256.png
$
```

203
build.sh Normal file
View file

@ -0,0 +1,203 @@
# build.sh - build librewolf on windows
# derived from https://gitlab.com/librewolf-community/browser/linux/-/blob/master/PKGBUILD
pkgname=librewolf
_pkgname=LibreWolf
pkgver=85.0
fetch() {
rm -f firefox-$pkgver.source.tar.xz
wget https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz
# the settings and common submodules should be checked out to allow the build
rm -f megabar.patch remove_addons.patch unity-menubar.patch
wget https://gitlab.com/librewolf-community/browser/linux/-/raw/master/megabar.patch
wget https://gitlab.com/librewolf-community/browser/linux/-/raw/master/remove_addons.patch
wget https://gitlab.com/librewolf-community/browser/linux/-/raw/master/unity-menubar.patch
}
prepare() {
rm -rf firefox-$pkgver
tar xf firefox-$pkgver.source.tar.xz
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
# as suggested by Mental Outlaw in https://www.youtube.com/watch?v=L2otiFy4ADI
ac_add_options --disable-webrtc
# Branding
ac_add_options --enable-update-channel=release
ac_add_options --with-app-name=${pkgname}
ac_add_options --with-app-basename=${_pkgname}
ac_add_options --with-branding=browser/branding/${pkgname}
ac_add_options --with-distribution-id=io.gitlab.${pkgname}-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
END
patch -p1 -i ../remove_addons.patch
patch -p1 -i ../megabar.patch
patch -p1 -i ../unity-menubar.patch
# Disabling Pocket
sed -i "s/'pocket'/#'pocket'/g" browser/components/moz.build
# this one only to remove an annoying error message:
sed -i 's#SaveToPocket.init();#// SaveToPocket.init();#g' browser/components/BrowserGlue.jsm
# 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
# allow SearchEngines option in non-ESR builds
sed -i 's#"enterprise_only": true,#"enterprise_only": false,#g' browser/components/enterprisepolicies/schemas/policies-schema.json
_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
sed "$_settings_services_sed" -i modules/libpref/init/all.js
sed "$_settings_services_sed" -i services/settings/Utils.jsm
sed "$_settings_services_sed" -i toolkit/components/search/SearchUtils.jsm
cp -r ../common/source_files/* ./
# FIXME: this 'mozconfig' file in the 'common' submodule should be removed
# this submodule is purely for the branding.
rm -f mozconfig
# FIXME: on windows: the stubinstaller folder is missing from the librewolf branding folder.
# this might be a bug in FF however as it seems to take missing branding resources from
# the nightly branding. We probably want this stuff merged into the 'common' submodule.
cp -r ../missing_branding_files/stubinstaller browser/branding/librewolf
# just a straight copy for now..
cp ../mozconfig .mozconfig
cd ..
}
build() {
cd firefox-$pkgver
./mach build
cd ..
}
package() {
cd firefox-$pkgver
./mach package
cd ..
}
installer_win() {
cd firefox-$pkgver
# there is just too much garbage in this installer function to
# have it all here..
. ../installer_win.sh
cd ..
}
# 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
# process commandline arguments and do something
done_something=0
if [[ "$*" == *fetch* ]]; then
fetch
done_something=1
fi
if [[ "$*" == *prepare* ]]; then
prepare
done_something=1
fi
if [[ "$*" == *build* ]]; then
build
done_something=1
fi
if [[ "$*" == *package* ]]; then
package
done_something=1
fi
if [[ "$*" == *installer_win* ]]; then
installer_win
done_something=1
fi
# by default, do the whole thing..
if (( done_something == 0 )); then
fetch
prepare
build
package
installer_win
fi

1
common Submodule

@ -0,0 +1 @@
Subproject commit 9995c8b275e2a06db3e0b24974b302a63791fc24

24
installer_win.sh Normal file
View file

@ -0,0 +1,24 @@
# apply the LibreWolf settings
cp -rv ../settings/* obj-x86_64-pc-mingw32/dist/librewolf
# recreate the zip file..
cd obj-x86_64-pc-mingw32/dist
# clean garbage files
rm -vrf librewolf/uninstall librewolf/maintenanceservice* librewolf/pingsender.exe
# be sure to remove the previous zip file..
rm -vf librewolf-$pkgver.en-US.win64.txt librewolf-$pkgver.en-US.win64.zip
zip -r9 librewolf-$pkgver.en-US.win64.zip librewolf
/c/mozilla-source/Git/usr/bin/sha256sum.exe librewolf-$pkgver.en-US.win64.zip > librewolf-$pkgver.en-US.win64.zip.sha256sum
# copy the resulting zip file
rm -vf ../../../librewolf-$pkgver.en-US.win64.zip*
cp -v librewolf-$pkgver.en-US.win64.zip* ../../..
cd ../..
# now to try to make the installer
pushd ..
rm -vrf librewolf
unzip librewolf-$pkgver.en-US.win64.zip
cp -v missing_branding_files/firefox.ico librewolf/librewolf.ico
makensis-3.01.exe librewolf.nsi
/c/mozilla-source/Git/usr/bin/sha256sum.exe librewolf-$pkgver.en-US.win64-setup.exe > librewolf-$pkgver.en-US.win64-setup.exe.sha256sum
popd

81
librewolf.nsi Normal file
View file

@ -0,0 +1,81 @@
#
# 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 "85.0" # the program version, like: 0.3.0
!define ICON_NAME "librewolf.ico" # filename of icon to use for this app, this file should be in src/
!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

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -0,0 +1,61 @@
/* 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/. */
body {
color: white;
}
#label,
#progress_background,
#blurb {
text-align: center;
margin: 20px 30px;
}
#label {
font-size: 40px;
margin-top: 100px;
margin-bottom: 20px;
}
#progress_background {
margin: 0 auto;
width: 60%;
height: 24px;
background-color: white;
}
body.high-contrast #progress_background {
outline: solid;
}
#progress_bar {
margin: 0;
width: 0%;
height: 100%;
background-color: #00AAFF;
}
/* In high contrast mode, fill the entire progress bar with its border. */
body.high-contrast #progress_bar {
/* This border should be the height of progress_background. */
border-top: 24px solid;
box-sizing: border-box;
}
/* This layout doesn't want the header or content text. */
#header, #content {
display: none;
}
#blurb {
font-size: 20px;
}
/* The footer goes in the bottom right corner. */
#footer {
position: fixed;
right: 50px;
bottom: 59px;
}

View file

@ -0,0 +1,42 @@
/* 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/. */
body {
color: white;
}
#header,
#refreshCheckboxContainer,
#refreshButtonContainer {
text-align: center;
margin-left: 40px;
margin-right: 40px;
margin-bottom: 30px;
}
#header {
font-size: 35px;
font-weight: normal;
margin-top: 45px;
}
#refreshCheckbox {
vertical-align: middle;
}
#checkboxLabel {
font-size: 13px;
}
#refreshButton {
padding: 8px 40px;
font-size: 15px;
}
/* The footer goes in the bottom right corner. */
#footer {
position: fixed;
right: 50px;
bottom: 59px;
}

1
settings Submodule

@ -0,0 +1 @@
Subproject commit 640b375dc02c5b089f678ed16b0232d1c0cc0721