big cleanup
|
|
@ -1,4 +1,4 @@
|
||||||
# [Download latest release](https://gitlab.com/librewolf-community/browser/windows/-/releases)
|
# [Download latest release](https://gitlab.com/librewolf-community/browser/bsys6/-/releases)
|
||||||
|
|
||||||
* Visit [the FAQ](https://librewolf.net/docs/faq/).
|
* Visit [the FAQ](https://librewolf.net/docs/faq/).
|
||||||
* Install via _[chocolatey](https://community.chocolatey.org/packages/librewolf)_: `choco install librewolf`
|
* Install via _[chocolatey](https://community.chocolatey.org/packages/librewolf)_: `choco install librewolf`
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
|
@ -1,101 +0,0 @@
|
||||||
.PHONY : help fetch all clean build artifacts dir bootstrap winsdk setup-debian setup-fedora veryclean
|
|
||||||
|
|
||||||
version:=$(shell cat version)
|
|
||||||
release:=$(shell cat release)
|
|
||||||
source_release:=$(shell cat source_release)
|
|
||||||
full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)")
|
|
||||||
mozbuild=~/.mozbuild
|
|
||||||
|
|
||||||
help :
|
|
||||||
|
|
||||||
@echo "use: make [help] [all] [clean] [build] [package] [artifacts]"
|
|
||||||
@echo ""
|
|
||||||
@echo " fetch - get the latest tarball. must be done first, at least once."
|
|
||||||
@echo ""
|
|
||||||
@echo " all - Build librewolf and it's windows artifacts."
|
|
||||||
@echo " build - Perform './mach build' on the extracted tarball."
|
|
||||||
@echo " package - Make the multilocale package."
|
|
||||||
@echo " artifacts - Create the setup.exe and the portable.zip."
|
|
||||||
@echo ""
|
|
||||||
@echo " clean - Remove output files and temporary files."
|
|
||||||
@echo " veryclean - Remove even more stuff."
|
|
||||||
@echo " dir - just extract and patch the LW tarball."
|
|
||||||
@echo " bootstrap - try to set up the build environment."
|
|
||||||
@echo " setup-debian, setup-fedora - needed packages."
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
all : build package artifacts
|
|
||||||
|
|
||||||
fetch :
|
|
||||||
wget -q -O version "https://gitlab.com/librewolf-community/browser/source/-/raw/main/version"
|
|
||||||
wget -q -O source_release "https://gitlab.com/librewolf-community/browser/source/-/raw/main/release"
|
|
||||||
wget -q -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" "https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum?job=Build"
|
|
||||||
wget --progress=bar:force -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz" "https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz?job=Build"
|
|
||||||
cat "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
sha256sum -c "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
|
|
||||||
clean :
|
|
||||||
rm -rf librewolf-$(full_version) work
|
|
||||||
|
|
||||||
veryclean : clean
|
|
||||||
rm -rf firefox-$(full_version).en-US.win64.zip librewolf-$(full_version).en-US.win64-setup.exe librewolf-$(full_version).en-US.win64-portable.zip
|
|
||||||
rm -f "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz" "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
rm -f version source_release
|
|
||||||
|
|
||||||
build : dir
|
|
||||||
(cd librewolf-$(full_version) && ./mach build)
|
|
||||||
|
|
||||||
package : dir
|
|
||||||
( cd librewolf-$(full_version) && echo 'Packaging... (output hidden)' && \
|
|
||||||
cat browser/locales/shipped-locales | xargs ./mach package-multi-locale --locales >/dev/null )
|
|
||||||
|
|
||||||
dir : librewolf-$(full_version)
|
|
||||||
librewolf-$(full_version) : librewolf-$(full_version).source.tar.gz
|
|
||||||
rm -rf $@
|
|
||||||
tar xf $<
|
|
||||||
cp -v assets/mozconfig librewolf-$(full_version)
|
|
||||||
(cd librewolf-$(full_version) && patch -p1 -i ../assets/tryfix-reslink-fail.patch)
|
|
||||||
(cd librewolf-$(full_version) && patch -p1 -i ../assets/fix-l10n-package-cmd.patch)
|
|
||||||
|
|
||||||
winsdk : $(mozbuild)/vs.tar.zst
|
|
||||||
(mkdir -p $(mozbuild)/win-cross && cd $(mozbuild)/win-cross && rm -rf vs && tar xf ../vs.tar.zst)
|
|
||||||
$(mozbuild)/vs.tar.zst : # cache this file
|
|
||||||
(cd librewolf-$(full_version) && ./mach --no-interactive python --virtualenv build build/vs/pack_vs.py build/vs/vs2019.yaml -o $(mozbuild)/vs.tar.zst)
|
|
||||||
|
|
||||||
bootstrap : dir winsdk
|
|
||||||
(cd librewolf-$(full_version) && ./mach --no-interactive bootstrap --application-choice=browser)
|
|
||||||
~/.cargo/bin/rustup target add x86_64-pc-windows-msvc
|
|
||||||
( export t=$$(pwd)/librewolf-$(full_version) && \
|
|
||||||
cd $(mozbuild) && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-binutils && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-cbindgen && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-clang && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-dump_syms && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-liblowercase && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-nasm && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-node && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-rust-cross && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-winchecksec && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-wine && \
|
|
||||||
$$t/mach artifact toolchain --from-build nsis && \
|
|
||||||
$$t/mach artifact toolchain --from-build sysroot-x86_64-linux-gnu && \
|
|
||||||
true )
|
|
||||||
|
|
||||||
setup-debian :
|
|
||||||
apt-get -y install mercurial python3 python3-dev python3-pip curl wget dpkg-sig msitools p7zip-full upx-ucl libssl-dev zstd wine
|
|
||||||
|
|
||||||
setup-fedora :
|
|
||||||
dnf -y install python3 curl wget zstd python3-devel python3-pip mercurial msitools p7zip upx openssl-devel wine
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build the artifacts in a seperate Makefile
|
|
||||||
#
|
|
||||||
|
|
||||||
librewolf-$(full_version).en-US.win64.installer.exe :
|
|
||||||
cp librewolf-$(full_version)/obj-x86_64-pc-mingw32/dist/install/sea/librewolf-$(full_version).en-US.win64.installer.exe .
|
|
||||||
|
|
||||||
artifacts : librewolf-$(full_version).en-US.win64.installer.exe
|
|
||||||
${MAKE} -f assets/artifacts.mk artifacts
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
.PHONY: artifacts
|
|
||||||
|
|
||||||
version:=$(shell cat version)
|
|
||||||
release:=$(shell cat release)
|
|
||||||
source_release:=$(shell cat source_release)
|
|
||||||
full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)")
|
|
||||||
mozbuild=~/.mozbuild
|
|
||||||
|
|
||||||
incoming_artifact=librewolf-$(full_version).en-US.win64.installer.exe
|
|
||||||
|
|
||||||
artifacts :
|
|
||||||
du -hs $(incoming_artifact)
|
|
||||||
|
Before Width: | Height: | Size: 151 KiB |
|
|
@ -1,20 +0,0 @@
|
||||||
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
index 10d7a8f..610a4fa 100644
|
|
||||||
--- a/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
+++ b/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
@@ -2457,6 +2457,7 @@ def package_l10n(command_context, verbose=False, locales=[]):
|
|
||||||
)
|
|
||||||
command_context.run_process(
|
|
||||||
[
|
|
||||||
+ "python3",
|
|
||||||
mozpath.join(command_context.topsrcdir, "mach"),
|
|
||||||
"build",
|
|
||||||
"chrome-{}".format(locale),
|
|
||||||
@@ -2476,6 +2477,7 @@ def package_l10n(command_context, verbose=False, locales=[]):
|
|
||||||
)
|
|
||||||
command_context.run_process(
|
|
||||||
[
|
|
||||||
+ "python3",
|
|
||||||
mozpath.join(command_context.topsrcdir, "mach"),
|
|
||||||
"android",
|
|
||||||
"assemble-app",
|
|
||||||
|
Before Width: | Height: | Size: 31 KiB |
|
|
@ -1,72 +0,0 @@
|
||||||
# mozconfig - crosscompile from Linux to Windows
|
|
||||||
|
|
||||||
export MOZBUILD=$HOME/.mozbuild
|
|
||||||
export WINDOWSSDKDIR="$MOZBUILD/win-cross/vs/windows kits/10"
|
|
||||||
ac_add_options --target=x86_64-pc-mingw32
|
|
||||||
mk_add_options "export LD_PRELOAD=$MOZBUILD/liblowercase/liblowercase.so"
|
|
||||||
mk_add_options "export LOWERCASE_DIRS=$MOZBUILD/win-cross"
|
|
||||||
|
|
||||||
EXTRA_PATH="$MOZBUILD/win-cross/vs/vc/tools/msvc/14.29.30133/bin/hostx64/x64:"
|
|
||||||
mk_add_options "export PATH=$EXTRA_PATH$PATH"
|
|
||||||
|
|
||||||
export CC="$MOZBUILD/clang/bin/clang-cl"
|
|
||||||
export CXX="$MOZBUILD/clang/bin/clang-cl"
|
|
||||||
export HOST_CC="$MOZBUILD/clang/bin/clang"
|
|
||||||
export HOST_CXX="$MOZBUILD/clang/bin/clang++"
|
|
||||||
|
|
||||||
export WINE="$MOZBUILD/wine/bin/wine64"
|
|
||||||
|
|
||||||
###
|
|
||||||
# TODO : fixme
|
|
||||||
#
|
|
||||||
|
|
||||||
ac_add_options --without-wasm-sandboxed-libraries
|
|
||||||
|
|
||||||
###
|
|
||||||
# old config settings
|
|
||||||
#
|
|
||||||
|
|
||||||
ac_add_options --enable-application=browser
|
|
||||||
|
|
||||||
ac_add_options --allow-addon-sideload
|
|
||||||
ac_add_options --disable-crashreporter
|
|
||||||
ac_add_options --disable-debug
|
|
||||||
ac_add_options --disable-default-browser-agent
|
|
||||||
ac_add_options --disable-tests
|
|
||||||
# updater disabled in Settings repo (app.update.auto).
|
|
||||||
# ac_add_options --disable-updater
|
|
||||||
ac_add_options --enable-hardening
|
|
||||||
ac_add_options --enable-optimize
|
|
||||||
ac_add_options --enable-release
|
|
||||||
ac_add_options --enable-rust-simd
|
|
||||||
|
|
||||||
ac_add_options --with-app-name=librewolf
|
|
||||||
ac_add_options --with-branding=browser/branding/nightly
|
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
|
||||||
|
|
||||||
# see issue # https://gitlab.com/librewolf-community/browser/arch/-/issues/49
|
|
||||||
export MOZ_REQUIRE_SIGNING=
|
|
||||||
|
|
||||||
mk_add_options MOZ_CRASHREPORTER=0
|
|
||||||
mk_add_options MOZ_DATA_REPORTING=0
|
|
||||||
mk_add_options MOZ_NORMANTY=0
|
|
||||||
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
|
||||||
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
|
||||||
|
|
||||||
#
|
|
||||||
# windows specific.
|
|
||||||
#
|
|
||||||
# - no need to specify wasi sdk folder
|
|
||||||
#
|
|
||||||
|
|
||||||
ac_add_options --disable-maintenance-service
|
|
||||||
ac_add_options --enable-strip
|
|
||||||
|
|
||||||
# needed for windows/mac auto update ONLY. it's a security risk so other OSses don't need it
|
|
||||||
# https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html
|
|
||||||
# this one below now fails since a few versions. what's up?
|
|
||||||
#ac_add_options --disable-verify-mar
|
|
||||||
|
|
||||||
# Internationalization
|
|
||||||
ac_add_options --with-l10n-base=$(pwd)/browser/locales/l10n
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/browser/app/splash.rc b/browser/app/splash.rc
|
|
||||||
index 259a806..78cd58e 100644
|
|
||||||
--- a/browser/app/splash.rc
|
|
||||||
+++ b/browser/app/splash.rc
|
|
||||||
@@ -12,7 +12,7 @@ IDI_APPLICATION ICON FIREFOX_ICO
|
|
||||||
IDI_NEWWINDOW ICON NEWWINDOW_ICO
|
|
||||||
IDI_NEWTAB ICON NEWTAB_ICO
|
|
||||||
IDI_PBMODE ICON PBMODE_ICO
|
|
||||||
-IDI_DOCUMENT_PDF ICON DOCUMENT_PDF_ICO
|
|
||||||
+IDI_DOCUMENT_PDF ICON DOCUMENT_ICO
|
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
244
linux/Makefile
|
|
@ -1,244 +0,0 @@
|
||||||
.PHONY : help fetch all clean build artifacts dir bootstrap winsdk setup-debian setup-fedora veryclean docker-build docker-run docker-clean docker-prune docker-shell buildsymbols upstream-update setup-arch bootstrap-arch bootstrap-arch-do-bootstrap old-style-bootstrap-arch old-style-bootstrap-arch-do-bootstrap build-arch build-arch-do-build extract-arch clean-arch buildsymbols-arch build-symbols-arch-do-buildsymbols package-arch package-arch-do-package patch-folder-arch winsdk-arch grab-build-artifact-arch artifacts-arch
|
|
||||||
|
|
||||||
version:=$(shell cat version)
|
|
||||||
release:=$(shell cat release)
|
|
||||||
source_release:=$(shell cat source_release)
|
|
||||||
full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)")
|
|
||||||
mozbuild=~/.mozbuild
|
|
||||||
|
|
||||||
docker_image_name=lw-win-x64
|
|
||||||
|
|
||||||
help :
|
|
||||||
|
|
||||||
@echo "use: make [help] [all] [clean] [build] [package] [artifacts]"
|
|
||||||
@echo ""
|
|
||||||
@echo " fetch - get the latest tarball. must be done first, at least once."
|
|
||||||
@echo ""
|
|
||||||
@echo " all - Build librewolf and it's windows artifacts."
|
|
||||||
@echo " build - Perform './mach build' on the extracted tarball."
|
|
||||||
@echo " package - multilocale package."
|
|
||||||
@echo " artifacts - Create the setup.exe and the portable.zip."
|
|
||||||
@echo ""
|
|
||||||
@echo " clean - Remove output files and temporary files."
|
|
||||||
@echo " veryclean - Remove even more stuff."
|
|
||||||
@echo " dir - just extract and patch the LW tarball."
|
|
||||||
@echo " bootstrap - try to set up the build environment."
|
|
||||||
@echo " setup-debian, setup-fedora - needed packages."
|
|
||||||
@echo ""
|
|
||||||
@echo " docker-build - Run 'docker build' for" $(docker_image_name) "image."
|
|
||||||
@echo " docker-run - Run LW build using 'docker run' on" $(docker_image_name) "image."
|
|
||||||
@echo " docker-shell - Run shell in" $(docker_image_name) "image, to debug why docker-run fails."
|
|
||||||
@echo " docker-clean - Remove" $(docker_image_name) "docker image."
|
|
||||||
@echo " docker-prune - Delete ALL docker data: images, containers, networks, etc."
|
|
||||||
@echo ""
|
|
||||||
@echo "Building natively on arch:"
|
|
||||||
@echo " upstream-update - Update and fetch 'version' and 'source_release'."
|
|
||||||
@echo " fetch-archive - Fetch the archive from the internet and verify it."
|
|
||||||
@echo " setup-arch - Install build dependencies."
|
|
||||||
@echo " extract-arch, clean-arch - Extract/remove the source tree."
|
|
||||||
@echo " patch-folder-arch - Patching it into a windows cross-build."
|
|
||||||
@echo " winsdk-arch - Extract the winsdk folder for cross-build."
|
|
||||||
@echo ""
|
|
||||||
@echo " bootstrap-arch - Bootstrap the mozilla build environment."
|
|
||||||
@echo " old-style-bootstrap-arch - Use old style bootstrapping."
|
|
||||||
@echo " build-arch - Build it."
|
|
||||||
@echo " buildsymbols-arch - Build symbols."
|
|
||||||
@echo " package-arch - Package the target zip file."
|
|
||||||
@echo " grab-build-artifact-arch - Grab the packaged zip file into this folder"
|
|
||||||
@echo " artifacts-arch - build the target setup.exe and portable.zip"
|
|
||||||
|
|
||||||
|
|
||||||
all :
|
|
||||||
@echo "[debug] Please don't run old-style 'all' when debugging."
|
|
||||||
${MAKE} build buildsymbols package artifacts
|
|
||||||
@echo "[debug] Please don't run old-style 'all' when debugging."
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# Redo from scratch. ---
|
|
||||||
#
|
|
||||||
|
|
||||||
upstream-update :
|
|
||||||
rm -f version source_release
|
|
||||||
wget -q -O version "https://gitlab.com/librewolf-community/browser/source/-/raw/main/version"
|
|
||||||
wget -q -O source_release "https://gitlab.com/librewolf-community/browser/source/-/raw/main/release"
|
|
||||||
@echo "[notice] version =" "$$(cat version)"
|
|
||||||
@echo "[notice] source_release =" "$$(cat source_release)"
|
|
||||||
@echo "[notice] release =" "$$(cat release)"
|
|
||||||
|
|
||||||
fetch-archive :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ]
|
|
||||||
${MAKE} fetch
|
|
||||||
|
|
||||||
arch-packages=git make gnupg python python-pip cabextract
|
|
||||||
setup-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ]
|
|
||||||
pacman -S $(arch-packages)
|
|
||||||
|
|
||||||
extract-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -f "librewolf-$(full_version).source.tar.gz" ]
|
|
||||||
${MAKE} clean-arch
|
|
||||||
tar xf "librewolf-$(full_version).source.tar.gz"
|
|
||||||
|
|
||||||
# windows-specific modifications:
|
|
||||||
patch-folder-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -d "librewolf-$(full_version)" ]
|
|
||||||
cp -v assets/mozconfig librewolf-$(full_version)/mozconfig
|
|
||||||
(cd librewolf-$(full_version) && patch -p1 -i ../assets/tryfix-reslink-fail.patch)
|
|
||||||
(cd librewolf-$(full_version) && patch -p1 -i ../assets/fix-l10n-package-cmd.patch)
|
|
||||||
|
|
||||||
patch-folder-arch-mozconfig-new-style :
|
|
||||||
# this target is just a reminder how I would want it to work once WINE works
|
|
||||||
# mv librewolf-$(full_version)/mozconfig librewolf-$(full_version)/mozconfig.std
|
|
||||||
# cp -v assets/mozconfig.arch librewolf-$(full_version)/mozconfig
|
|
||||||
|
|
||||||
winsdk-arch :
|
|
||||||
${MAKE} winsdk
|
|
||||||
|
|
||||||
clean-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ]
|
|
||||||
rm -rf "librewolf-$(full_version)"
|
|
||||||
|
|
||||||
bootstrap-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -d "librewolf-$(full_version)" ]
|
|
||||||
${MAKE} -C librewolf-$(full_version) -f ../Makefile bootstrap-arch-do-bootstrap
|
|
||||||
|
|
||||||
bootstrap-arch-do-bootstrap :
|
|
||||||
./mach --no-interactive bootstrap --application-choice=browser
|
|
||||||
|
|
||||||
# try old style bootstrapping...
|
|
||||||
old-style-bootstrap-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -d "librewolf-$(full_version)" ]
|
|
||||||
cp -v assets/mozconfig librewolf-$(full_version)/mozconfig
|
|
||||||
${MAKE} -C librewolf-$(full_version) -f ../Makefile old-style-bootstrap-arch-do-bootstrap
|
|
||||||
|
|
||||||
old-style-bootstrap-arch-do-bootstrap :
|
|
||||||
./mach --no-interactive bootstrap --application-choice=browser
|
|
||||||
~/.cargo/bin/rustup target add x86_64-pc-windows-msvc
|
|
||||||
( export t=$$(pwd) && \
|
|
||||||
cd $(mozbuild) && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-binutils && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-cbindgen && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-clang && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-dump_syms && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-nasm && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-node && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-rust-cross && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-winchecksec && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-wine && \
|
|
||||||
$$t/mach artifact toolchain --from-build nsis && \
|
|
||||||
$$t/mach artifact toolchain --from-build sysroot-x86_64-linux-gnu && \
|
|
||||||
true )
|
|
||||||
|
|
||||||
build-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -d "librewolf-$(full_version)" ]
|
|
||||||
${MAKE} -C librewolf-$(full_version) -f ../Makefile build-arch-do-build
|
|
||||||
build-arch-do-build :
|
|
||||||
./mach build
|
|
||||||
buildsymbols-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -d "librewolf-$(full_version)" ]
|
|
||||||
${MAKE} -C librewolf-$(full_version) -f ../Makefile buildsymbols-arch-do-buildsymbols
|
|
||||||
buildsymbols-arch-do-buildsymbols :
|
|
||||||
./mach buildsymbols
|
|
||||||
package-arch :
|
|
||||||
[ -f "version" ] && [ -f "source_release" ] && [ -d "librewolf-$(full_version)" ]
|
|
||||||
${MAKE} -C librewolf-$(full_version) -f ../Makefile package-arch-do-package
|
|
||||||
package-arch-do-package :
|
|
||||||
@(echo 'Packaging... (output hidden)' && cat browser/locales/shipped-locales | xargs ./mach package-multi-locale --locales >/dev/null)
|
|
||||||
grab-build-artifact-arch :
|
|
||||||
cp -v librewolf-$(full_version)/obj-x86_64-pc-mingw32/dist/firefox-$(version)-$(source_release).en-US.win64.zip .
|
|
||||||
|
|
||||||
artifacts-arch :
|
|
||||||
${MAKE} grab-build-artifact-arch
|
|
||||||
${MAKE} -f assets/artifacts.mk artifacts
|
|
||||||
#
|
|
||||||
# End redo ---
|
|
||||||
#
|
|
||||||
|
|
||||||
fetch : upstream-update
|
|
||||||
rm -f "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
-wget -q -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" "https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/$$(cat version)-$$(cat source_release)/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
[ -f "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum" ]
|
|
||||||
wget --progress=bar:force -O "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz" "https://gitlab.com/api/v4/projects/32320088/packages/generic/librewolf-source/$$(cat version)-$$(cat source_release)/librewolf-$$(cat version)-$$(cat source_release).source.tar.gz"
|
|
||||||
cat "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
sha256sum -c "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
|
|
||||||
clean :
|
|
||||||
rm -rf librewolf-$(full_version) work
|
|
||||||
|
|
||||||
veryclean : clean
|
|
||||||
rm -rf firefox-$(full_version).en-US.win64.zip librewolf-$(full_version).en-US.win64-setup.exe librewolf-$(full_version).en-US.win64-portable.zip
|
|
||||||
rm -f "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz" "librewolf-$$(cat version)-$$(cat source_release).source.tar.gz.sha256sum"
|
|
||||||
rm -f version source_release
|
|
||||||
|
|
||||||
build : dir
|
|
||||||
(cd librewolf-$(full_version) && ./mach build)
|
|
||||||
|
|
||||||
buildsymbols : dir
|
|
||||||
(cd librewolf-$(full_version) && ./mach buildsymbols)
|
|
||||||
|
|
||||||
package : dir
|
|
||||||
# (cd librewolf-$(full_version) && ./mach package)
|
|
||||||
( cd librewolf-$(full_version) && echo 'Packaging... (output hidden)' && \
|
|
||||||
cat browser/locales/shipped-locales | xargs ./mach package-multi-locale --locales >/dev/null )
|
|
||||||
|
|
||||||
dir : librewolf-$(full_version)
|
|
||||||
librewolf-$(full_version) : librewolf-$(full_version).source.tar.gz
|
|
||||||
rm -rf $@
|
|
||||||
tar xf $<
|
|
||||||
cp -v assets/mozconfig librewolf-$(full_version)
|
|
||||||
(cd librewolf-$(full_version) && patch -p1 -i ../assets/tryfix-reslink-fail.patch)
|
|
||||||
(cd librewolf-$(full_version) && patch -p1 -i ../assets/fix-l10n-package-cmd.patch)
|
|
||||||
|
|
||||||
winsdk : $(mozbuild)/vs.tar.zst
|
|
||||||
(mkdir -p $(mozbuild)/win-cross && cd $(mozbuild)/win-cross && rm -rf vs && tar xf ../vs.tar.zst)
|
|
||||||
$(mozbuild)/vs.tar.zst : # cache this file
|
|
||||||
(cd librewolf-$(full_version) && ./mach --no-interactive python --virtualenv build build/vs/pack_vs.py build/vs/vs2019.yaml -o $(mozbuild)/vs.tar.zst)
|
|
||||||
|
|
||||||
bootstrap : dir winsdk
|
|
||||||
(cd librewolf-$(full_version) && ./mach --no-interactive bootstrap --application-choice=browser)
|
|
||||||
# Rust supports aarch64-linux-android, arm-linux-androideabi, i686-linux-android, thumbv7neon-linux-androideabi, x86_64-linux-android, x86_64-pc-windows-msvc, x86_64-unknown-linux-gnu targets.
|
|
||||||
~/.cargo/bin/rustup target add x86_64-pc-windows-msvc
|
|
||||||
( export t=$$(pwd)/librewolf-$(full_version) && \
|
|
||||||
cd $(mozbuild) && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-binutils && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-cbindgen && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-clang && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-dump_syms && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-liblowercase && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-nasm && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-node && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-rust-cross && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-winchecksec && \
|
|
||||||
$$t/mach artifact toolchain --from-build linux64-wine && \
|
|
||||||
$$t/mach artifact toolchain --from-build nsis && \
|
|
||||||
$$t/mach artifact toolchain --from-build sysroot-x86_64-linux-gnu && \
|
|
||||||
true )
|
|
||||||
|
|
||||||
setup-debian :
|
|
||||||
apt-get -y install mercurial python3 python3-dev python3-pip curl wget dpkg-sig msitools p7zip-full upx-ucl libssl-dev zstd wine64-tools
|
|
||||||
|
|
||||||
setup-fedora :
|
|
||||||
dnf -y install python3 curl wget zstd python3-devel python3-pip mercurial msitools p7zip upx openssl-devel wine wine-devel
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build the artifacts in a seperate Makefile
|
|
||||||
#
|
|
||||||
|
|
||||||
firefox-$(full_version).en-US.win64.zip : # build stage output artifact
|
|
||||||
cp -v librewolf-$(full_version)/obj-x86_64-pc-mingw32/dist/firefox-$(version)-$(source_release).en-US.win64.zip .
|
|
||||||
artifacts : firefox-$(full_version).en-US.win64.zip
|
|
||||||
${MAKE} -f assets/artifacts.mk artifacts
|
|
||||||
|
|
||||||
|
|
||||||
docker-build :
|
|
||||||
docker build -t $(docker_image_name) - < assets/Dockerfile
|
|
||||||
docker-run :
|
|
||||||
docker run --rm $(docker_image_name) sh -c "git pull && make fetch && make build"
|
|
||||||
docker-shell :
|
|
||||||
docker run -it --rm $(docker_image_name) /bin/bash -i
|
|
||||||
docker-clean :
|
|
||||||
docker rmi $(docker_image_name)
|
|
||||||
docker-prune :
|
|
||||||
docker system prune --all --force
|
|
||||||
|
|
||||||
|
|
@ -1,71 +0,0 @@
|
||||||
FROM ubuntu:jammy
|
|
||||||
|
|
||||||
#
|
|
||||||
# It's probably totally unnecesary to include all of these dependencies.
|
|
||||||
#
|
|
||||||
|
|
||||||
RUN apt-get -y update && \
|
|
||||||
apt-get -y upgrade && \
|
|
||||||
apt-get -y install make wget git patch build-essential && \
|
|
||||||
dpkg --add-architecture i386 && apt-get -y update && apt-get -y install wine32
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
# RUN apt-get update && apt-get -y dist-upgrade && apt-get -y install \
|
|
||||||
# apt-utils \
|
|
||||||
# aptitude \
|
|
||||||
# binutils \
|
|
||||||
# build-essential \
|
|
||||||
# bzip2 \
|
|
||||||
# curl \
|
|
||||||
# devscripts \
|
|
||||||
# equivs \
|
|
||||||
# fakeroot \
|
|
||||||
# file \
|
|
||||||
# gawk \
|
|
||||||
# git \
|
|
||||||
# git \
|
|
||||||
# gnupg \
|
|
||||||
# jq \
|
|
||||||
# less \
|
|
||||||
# lib32atomic1 \
|
|
||||||
# lib32stdc++6 \
|
|
||||||
# lib32z1 \
|
|
||||||
# libasound2 \
|
|
||||||
# libc6-i386 \
|
|
||||||
# libdbus-glib-1-2 \
|
|
||||||
# libgtk-3-0 \
|
|
||||||
# libucl1 \
|
|
||||||
# make \
|
|
||||||
# mercurial \
|
|
||||||
# p7zip-full \
|
|
||||||
# patch \
|
|
||||||
# procps \
|
|
||||||
# python3 \
|
|
||||||
# python3-dev \
|
|
||||||
# python3-pip \
|
|
||||||
# python3-distutils-extra \
|
|
||||||
# python3-minimal \
|
|
||||||
# python3-psutil \
|
|
||||||
# python3-venv \
|
|
||||||
# rsync screen tar unzip uuid \
|
|
||||||
# vim-tiny wget x11-utils xz-utils zip zstd
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# This is the interesting part of the Dockerfile
|
|
||||||
#
|
|
||||||
|
|
||||||
RUN git clone --recursive https://gitlab.com/librewolf-community/browser/windows.git
|
|
||||||
WORKDIR windows/linux
|
|
||||||
|
|
||||||
|
|
||||||
RUN make setup-debian
|
|
||||||
RUN make upstream-update
|
|
||||||
RUN make fetch-archive
|
|
||||||
RUN make extract-arch
|
|
||||||
RUN make old-style-bootstrap-arch
|
|
||||||
RUN make winsdk-arch
|
|
||||||
|
|
@ -1,99 +0,0 @@
|
||||||
.PHONY: artifacts ahk-tools
|
|
||||||
|
|
||||||
version:=$(shell cat version)
|
|
||||||
release:=$(shell cat release)
|
|
||||||
source_release:=$(shell cat source_release)
|
|
||||||
full_version:=$(version)-$(source_release)$(shell [ $(release) -gt 1 ] && echo "-$(release)")
|
|
||||||
mozbuild=~/.mozbuild
|
|
||||||
|
|
||||||
incoming_artifact=firefox-$(full_version).en-US.win64.zip
|
|
||||||
setupname=librewolf-$(full_version).en-US.win64-setup.exe
|
|
||||||
zipname=librewolf-$(full_version).en-US.win64-portable.zip
|
|
||||||
|
|
||||||
#wine=~/.mozbuild/wine/bin/wineconsole
|
|
||||||
wine=wineconsole --backend=curses
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
artifacts :
|
|
||||||
|
|
||||||
|
|
||||||
# this section makes the work/librewolf folder
|
|
||||||
|
|
||||||
|
|
||||||
( rm -rf work && mkdir work )
|
|
||||||
( cd work && unzip -q ../$(incoming_artifact) )
|
|
||||||
mv work/firefox work/librewolf
|
|
||||||
mv work/librewolf/firefox.exe work/librewolf/librewolf.exe
|
|
||||||
cp assets/librewolf.ico work/librewolf
|
|
||||||
|
|
||||||
|
|
||||||
# this section makes the setup.exe
|
|
||||||
|
|
||||||
|
|
||||||
mkdir work/x86-ansi
|
|
||||||
wget -q -O ./work/x86-ansi/nsProcess.dll "https://shorsh.de/upload/2y9p/nsProcess.dll"
|
|
||||||
wget -q -O ./work/vc_redist.x64.exe "https://aka.ms/vs/17/release/vc_redist.x64.exe"
|
|
||||||
sed "s/pkg_version/$(full_version)/g" < assets/setup.nsi > work/tmp.nsi
|
|
||||||
cp assets/librewolf.ico work
|
|
||||||
cp assets/banner.bmp work
|
|
||||||
( cd work && $(mozbuild)/nsis/bin/makensis -V1 tmp.nsi )
|
|
||||||
rm -rf work/tmp.nsi work/librewolf.ico work/banner.bmp work/x86-ansi vc_redist.x64.exe
|
|
||||||
mv work/$(setupname) .
|
|
||||||
|
|
||||||
|
|
||||||
# this section makes the portable.zip
|
|
||||||
|
|
||||||
|
|
||||||
rm -rf work/librewolf-$(full_version)
|
|
||||||
|
|
||||||
mkdir -p work/librewolf-$(full_version)/Profiles/Default
|
|
||||||
mkdir -p work/librewolf-$(full_version)/LibreWolf
|
|
||||||
|
|
||||||
cp -r work/librewolf/* work/librewolf-$(full_version)/LibreWolf
|
|
||||||
|
|
||||||
# we're using the latest ahk-tools here.
|
|
||||||
|
|
||||||
( cd work/librewolf-$(full_version) && \
|
|
||||||
wget -q -O librewolf-ahk-tools-2023-02-11.zip https://gitlab.com/librewolf-community/browser/windows/uploads/fc5e0483707a1bafdfd8f10b7b6c50b1/librewolf-ahk-tools-2023-02-11.zip && \
|
|
||||||
unzip librewolf-ahk-tools-2023-02-11.zip && \
|
|
||||||
rm librewolf-ahk-tools-2023-02-11.zip )
|
|
||||||
|
|
||||||
# issue #224 - Consider including msvcp140 & vcruntime140 in portable package
|
|
||||||
|
|
||||||
( cd work/librewolf-$(full_version)/LibreWolf && \
|
|
||||||
wget -q -O ./vc_redist.x64-extracted.zip "https://gitlab.com/librewolf-community/browser/windows/uploads/7106b776dc663d985bb88eabeb4c5d7d/vc_redist.x64-extracted.zip" && \
|
|
||||||
unzip vc_redist.x64-extracted.zip && \
|
|
||||||
rm vc_redist.x64-extracted.zip )
|
|
||||||
( rm -f $(zipname) && cd work && zip -qr9 ../$(zipname) librewolf-$(full_version) )
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
ahk-tools :
|
|
||||||
# clone autohotkey stuff
|
|
||||||
|
|
||||||
( cd work && \
|
|
||||||
git clone "https://github.com/ltGuillaume/LibreWolf-Portable" && \
|
|
||||||
git clone "https://github.com/ltGuillaume/LibreWolf-WinUpdater" )
|
|
||||||
|
|
||||||
cp work/LibreWolf-Portable/LibreWolf-Portable.* work/LibreWolf-Portable/*.exe work/librewolf-$(full_version)
|
|
||||||
cp work/LibreWolf-WinUpdater/LibreWolf-WinUpdater.ahk work/LibreWolf-WinUpdater/*.ico work/librewolf-$(full_version)
|
|
||||||
|
|
||||||
wget -q -O work/ahk.zip "https://www.autohotkey.com/download/ahk.zip"
|
|
||||||
( mkdir work/ahk && cd work/ahk && unzip -q ../ahk.zip )
|
|
||||||
|
|
||||||
# now we can use wine32 to run autohotkey
|
|
||||||
# ---
|
|
||||||
# tip from: https://forums.linuxmint.com/viewtopic.php?t=74356
|
|
||||||
rm -rf /root/.wine
|
|
||||||
winecfg
|
|
||||||
|
|
||||||
-( cd work/librewolf-$(full_version) && $(wine) ../ahk/Compiler/Ahk2Exe.exe /in LibreWolf-Portable.ahk )
|
|
||||||
[ -f work/librewolf-$(full_version)/LibreWolf-Portable.exe ] # because we ignored previous exit code
|
|
||||||
( cd work/librewolf-$(full_version) && rm -f LibreWolf-Portable.ahk LibreWolf-Portable.ico dejsonlz4.exe jsonlz4.exe )
|
|
||||||
|
|
||||||
-( cd work/librewolf-$(full_version) && $(wine) ../ahk/Compiler/Ahk2Exe.exe /in LibreWolf-WinUpdater.ahk )
|
|
||||||
[ -f work/librewolf-$(full_version)/LibreWolf-WinUpdater.exe ]
|
|
||||||
( cd work/librewolf-$(full_version) && rm -f LibreWolf-WinUpdater.ahk LibreWolf-WinUpdater*.ico )
|
|
||||||
|
|
||||||
|
Before Width: | Height: | Size: 151 KiB |
|
|
@ -1,20 +0,0 @@
|
||||||
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
index 10d7a8f..610a4fa 100644
|
|
||||||
--- a/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
+++ b/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
@@ -2457,6 +2457,7 @@ def package_l10n(command_context, verbose=False, locales=[]):
|
|
||||||
)
|
|
||||||
command_context.run_process(
|
|
||||||
[
|
|
||||||
+ "python3",
|
|
||||||
mozpath.join(command_context.topsrcdir, "mach"),
|
|
||||||
"build",
|
|
||||||
"chrome-{}".format(locale),
|
|
||||||
@@ -2476,6 +2477,7 @@ def package_l10n(command_context, verbose=False, locales=[]):
|
|
||||||
)
|
|
||||||
command_context.run_process(
|
|
||||||
[
|
|
||||||
+ "python3",
|
|
||||||
mozpath.join(command_context.topsrcdir, "mach"),
|
|
||||||
"android",
|
|
||||||
"assemble-app",
|
|
||||||
|
Before Width: | Height: | Size: 31 KiB |
|
|
@ -1,86 +0,0 @@
|
||||||
# mozconfig - crosscompile from Linux to Windows
|
|
||||||
|
|
||||||
export MOZBUILD=$HOME/.mozbuild
|
|
||||||
ac_add_options --target=x86_64-pc-mingw32
|
|
||||||
ac_add_options --enable-bootstrap
|
|
||||||
|
|
||||||
# since v110.0 - liblowercase not needed anymore?
|
|
||||||
#mk_add_options "export LD_PRELOAD=$MOZBUILD/liblowercase/liblowercase.so"
|
|
||||||
#mk_add_options "export LOWERCASE_DIRS=$MOZBUILD/win-cross"
|
|
||||||
# since v110.0 - extra variable?
|
|
||||||
export WINSYSROOT="$MOZBUILD/win-cross/vs"
|
|
||||||
|
|
||||||
# since v110.0 - no longer needed?
|
|
||||||
#export WINDOWSSDKDIR="$MOZBUILD/win-cross/vs/windows kits/10"
|
|
||||||
|
|
||||||
EXTRA_PATH="$MOZBUILD/win-cross/vs/vc/tools/msvc/14.29.30133/bin/hostx64/x64:"
|
|
||||||
mk_add_options "export PATH=$EXTRA_PATH$PATH"
|
|
||||||
export CC="$MOZBUILD/clang/bin/clang-cl"
|
|
||||||
export CXX="$MOZBUILD/clang/bin/clang-cl"
|
|
||||||
export HOST_CC="$MOZBUILD/clang/bin/clang"
|
|
||||||
export HOST_CXX="$MOZBUILD/clang/bin/clang++"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#export WINE=wineconsole
|
|
||||||
#export WINE="$MOZBUILD/wine/bin/wine64"
|
|
||||||
#export MIDL="$MOZBUILD/wine/bin/widl"
|
|
||||||
|
|
||||||
#export MIDL=midl
|
|
||||||
#export MIDL=widl
|
|
||||||
|
|
||||||
###
|
|
||||||
# TODO : fixme
|
|
||||||
#
|
|
||||||
|
|
||||||
#ac_add_options --without-wasm-sandboxed-libraries
|
|
||||||
|
|
||||||
###
|
|
||||||
# old config settings
|
|
||||||
#
|
|
||||||
|
|
||||||
ac_add_options --enable-application=browser
|
|
||||||
|
|
||||||
ac_add_options --allow-addon-sideload
|
|
||||||
ac_add_options --disable-crashreporter
|
|
||||||
ac_add_options --disable-debug
|
|
||||||
ac_add_options --disable-default-browser-agent
|
|
||||||
ac_add_options --disable-tests
|
|
||||||
# updater disabled in Settings repo (app.update.auto).
|
|
||||||
ac_add_options --disable-updater
|
|
||||||
ac_add_options --enable-hardening
|
|
||||||
ac_add_options --enable-optimize
|
|
||||||
ac_add_options --enable-release
|
|
||||||
ac_add_options --enable-rust-simd
|
|
||||||
|
|
||||||
ac_add_options --with-app-name=firefox
|
|
||||||
ac_add_options --with-branding=browser/branding/librewolf
|
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
|
||||||
|
|
||||||
# see issue # https://gitlab.com/librewolf-community/browser/arch/-/issues/49
|
|
||||||
export MOZ_REQUIRE_SIGNING=
|
|
||||||
|
|
||||||
mk_add_options MOZ_CRASHREPORTER=0
|
|
||||||
mk_add_options MOZ_DATA_REPORTING=0
|
|
||||||
mk_add_options MOZ_NORMANTY=0
|
|
||||||
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
|
||||||
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
|
||||||
export WINE=wineconsole
|
|
||||||
#
|
|
||||||
# windows specific.
|
|
||||||
#
|
|
||||||
# - no need to specify wasi sdk folder
|
|
||||||
#
|
|
||||||
|
|
||||||
ac_add_options --disable-maintenance-service
|
|
||||||
ac_add_options --enable-strip
|
|
||||||
|
|
||||||
# needed for windows/mac auto update ONLY. it's a security risk so other OSses don't need it
|
|
||||||
# https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html
|
|
||||||
|
|
||||||
#ac_add_options --disable-verify-mar
|
|
||||||
|
|
||||||
# Internationalization
|
|
||||||
ac_add_options --with-l10n-base=$(pwd)/browser/locales/l10n
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
. "./mozconfig.std"
|
|
||||||
|
|
||||||
ac_add_options --target=x86_64-pc-mingw32
|
|
||||||
MOZBUILD=~/.mozbuild
|
|
||||||
export WINSYSROOT="$MOZBUILD/win-cross/vs"
|
|
||||||
|
|
@ -1,176 +0,0 @@
|
||||||
!include "MUI2.nsh"
|
|
||||||
!include "LogicLib.nsh"
|
|
||||||
!addplugindir .
|
|
||||||
!addplugindir x86-ansi
|
|
||||||
|
|
||||||
!define APPNAME "LibreWolf"
|
|
||||||
!define PROGNAME "librewolf"
|
|
||||||
!define EXECUTABLE "${PROGNAME}.exe"
|
|
||||||
!define PROG_VERSION "pkg_version"
|
|
||||||
!define COMPANYNAME "LibreWolf"
|
|
||||||
!define ESTIMATED_SIZE 190000
|
|
||||||
!define MUI_ICON "librewolf.ico"
|
|
||||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "banner.bmp"
|
|
||||||
|
|
||||||
Name "${APPNAME}"
|
|
||||||
OutFile "${PROGNAME}-${PROG_VERSION}.en-US.win64-setup.exe"
|
|
||||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "InstallLocation"
|
|
||||||
InstallDir $PROGRAMFILES64\${APPNAME}
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
# Pages
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
|
|
||||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to the LibreWolf Setup"
|
|
||||||
!define MUI_WELCOMEPAGE_TEXT "This setup will guide you through the installation of LibreWolf.$\r$\n$\r$\n\
|
|
||||||
If you don't have it installed already, this will also install the latest Visual C++ Redistributable.$\r$\n$\r$\n\
|
|
||||||
Click Next to continue."
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
|
|
||||||
Section
|
|
||||||
|
|
||||||
# Make sure LibreWolf is closed before the installation
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
IfSilent 0 +4
|
|
||||||
DetailPrint "${APPNAME} is still running, aborting because of silent install."
|
|
||||||
SetErrorlevel 2
|
|
||||||
Abort
|
|
||||||
|
|
||||||
DetailPrint "${APPNAME} is still running"
|
|
||||||
MessageBox MB_OKCANCEL "LibreWolf is still running and has to be closed for the setup to continue." IDOK continue IDCANCEL break
|
|
||||||
break:
|
|
||||||
SetErrorlevel 1
|
|
||||||
Abort
|
|
||||||
continue:
|
|
||||||
DetailPrint "Closing ${APPNAME} gracefully..."
|
|
||||||
nsProcess::_CloseProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
Sleep 2000
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
DetailPrint "Failed to close ${APPNAME}, killing it..."
|
|
||||||
nsProcess::_KillProcess "${EXECUTABLE}"
|
|
||||||
Sleep 2000
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
DetailPrint "Failed to kill ${APPNAME}, aborting"
|
|
||||||
MessageBox MB_ICONSTOP "LibreWolf is still running and can't be closed by the installer. Please close it manually and try again."
|
|
||||||
SetErrorlevel 2
|
|
||||||
Abort
|
|
||||||
${EndIf}
|
|
||||||
${EndIf}
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
# Install Visual C++ Redistributable (only if not silent)
|
|
||||||
IfSilent +4 0
|
|
||||||
InitPluginsDir
|
|
||||||
File /oname=$PLUGINSDIR\vc_redist.x64.exe vc_redist.x64.exe
|
|
||||||
ExecWait "$PLUGINSDIR\vc_redist.x64.exe /install /quiet /norestart"
|
|
||||||
|
|
||||||
# Copy files
|
|
||||||
SetOutPath $INSTDIR
|
|
||||||
File /r librewolf\*.*
|
|
||||||
|
|
||||||
# Start Menu
|
|
||||||
createDirectory "$SMPROGRAMS\${COMPANYNAME}"
|
|
||||||
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\${PROGNAME}.exe" "" "$INSTDIR\${MUI_ICON}"
|
|
||||||
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\${MUI_ICON}$\""
|
|
||||||
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\FileAssociations" ".pdf" "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" "Start the LibreWolf Browser"
|
|
||||||
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationCompany" "LibreWolf Community"
|
|
||||||
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\DefaultIcon" "" "$INSTDIR\librewolf.exe,0"
|
|
||||||
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\shell\open\command" "" "$\"$INSTDIR\librewolf.exe$\" -osint -url $\"%1$\""
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
|
|
||||||
# Uninstaller
|
|
||||||
section "Uninstall"
|
|
||||||
|
|
||||||
# Kill LibreWolf if it is still running
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
DetailPrint "${APPNAME} is still running, killing it..."
|
|
||||||
nsProcess::_KillProcess "${EXECUTABLE}"
|
|
||||||
Sleep 2000
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/browser/app/splash.rc b/browser/app/splash.rc
|
|
||||||
index 259a806..78cd58e 100644
|
|
||||||
--- a/browser/app/splash.rc
|
|
||||||
+++ b/browser/app/splash.rc
|
|
||||||
@@ -12,7 +12,7 @@ IDI_APPLICATION ICON FIREFOX_ICO
|
|
||||||
IDI_NEWWINDOW ICON NEWWINDOW_ICO
|
|
||||||
IDI_NEWTAB ICON NEWTAB_ICO
|
|
||||||
IDI_PBMODE ICON PBMODE_ICO
|
|
||||||
-IDI_DOCUMENT_PDF ICON DOCUMENT_PDF_ICO
|
|
||||||
+IDI_DOCUMENT_PDF ICON DOCUMENT_ICO
|
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
|
|
@ -1,65 +0,0 @@
|
||||||
.PHONY : help all clean veryclean fetch build artifacts update full-mar serve-mar langpacks
|
|
||||||
|
|
||||||
help :
|
|
||||||
@echo "Use: make [all] [clean] [veryclean] [check] ..."
|
|
||||||
@echo ""
|
|
||||||
@echo " all - Build librewolf and it's windows artifacts."
|
|
||||||
@echo " clean - Remove output files and temporary files."
|
|
||||||
@echo " veryclean - Like 'clean', but also remove all downloaded files."
|
|
||||||
@echo " update - update 'version' and 'source_release' files."
|
|
||||||
@echo " full-mar - create mar setup file, and update.xml."
|
|
||||||
@echo " serve-mar - serve the update files"
|
|
||||||
@echo " langpacks - build language packs."
|
|
||||||
@echo ""
|
|
||||||
@echo " fetch - Fetch the latest librewolf source."
|
|
||||||
@echo " build - Perform './mach build && ./mach package' on it."
|
|
||||||
@echo " debug - Perform a debug build with different 'mozconfig'."
|
|
||||||
@echo " artifacts - Create the setup.exe and the portable.zip."
|
|
||||||
@echo ""
|
|
||||||
@echo "Note: to upload, after artifacts, into the windows repo, use:"
|
|
||||||
@echo ""
|
|
||||||
@echo " python3 mk.py upload <token>"
|
|
||||||
@echo ""
|
|
||||||
|
|
||||||
all : fetch build artifacts
|
|
||||||
|
|
||||||
clean :
|
|
||||||
cp version source_release linux && cp version source_release linux-mar
|
|
||||||
$(MAKE) -C linux clean && $(MAKE) -C linux-mar clean
|
|
||||||
rm -rf work
|
|
||||||
|
|
||||||
veryclean : clean
|
|
||||||
cp version source_release linux && cp version source_release linux-mar
|
|
||||||
$(MAKE) -C linux veryclean && $(MAKE) -C linux-mar veryclean
|
|
||||||
rm -f librewolf-$(shell cat version)*.en-US.win64* sha256sums.txt upload.txt firefox-$(shell cat version)*.en-US.win64.zip firefox-$(shell cat version)*.en-US.win64.installer.exe
|
|
||||||
rm -rf librewolf-$(shell cat version)-$(shell cat source_release)
|
|
||||||
rm -f librewolf-$(shell cat version)-*.source.tar.gz*
|
|
||||||
|
|
||||||
update :
|
|
||||||
@echo "Fetching from gitlab.."
|
|
||||||
@wget -q -O version "https://gitlab.com/librewolf-community/browser/source/-/raw/main/version"
|
|
||||||
@wget -q -O source_release "https://gitlab.com/librewolf-community/browser/source/-/raw/main/release"
|
|
||||||
@echo ""
|
|
||||||
@echo Version: $(shell cat version)-$(shell cat source_release)
|
|
||||||
@echo Windows release version: $(shell cat release)
|
|
||||||
|
|
||||||
fetch :
|
|
||||||
python3 mk.py fetch
|
|
||||||
|
|
||||||
build :
|
|
||||||
python3 mk.py build
|
|
||||||
|
|
||||||
debug :
|
|
||||||
python3 mk.py build-debug
|
|
||||||
|
|
||||||
artifacts : langpacks
|
|
||||||
python3 mk.py artifacts
|
|
||||||
|
|
||||||
full-mar :
|
|
||||||
python3 mk.py full-mar
|
|
||||||
|
|
||||||
serve-mar :
|
|
||||||
(cd librewolf-$(shell cat version)-$(shell cat source_release)/MAR && python3 -m http.server 8000)
|
|
||||||
|
|
||||||
langpacks :
|
|
||||||
(cd librewolf-$(shell cat version)-$(shell cat source_release) && cat browser/locales/shipped-locales | xargs ./mach package-multi-locale --locales)
|
|
||||||
|
Before Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 5.8 KiB |
|
|
@ -1,136 +0,0 @@
|
||||||
/* 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/. */
|
|
||||||
@namespace html "http://www.w3.org/1999/xhtml";
|
|
||||||
|
|
||||||
#aboutDialog {
|
|
||||||
width: 620px;
|
|
||||||
/* Set an explicit line-height to avoid discrepancies in 'auto' spacing
|
|
||||||
across screens with different device DPI, which may cause font metrics
|
|
||||||
to round differently. */
|
|
||||||
line-height: 1.5;
|
|
||||||
}
|
|
||||||
|
|
||||||
#rightBox {
|
|
||||||
background-image: url("chrome://branding/content/about-wordmark.svg");
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-size: 288px auto;
|
|
||||||
/* padding-top creates room for the wordmark */
|
|
||||||
padding-top: 38px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#rightBox:-moz-locale-dir(rtl) {
|
|
||||||
background-position: 100% 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#bottomBox {
|
|
||||||
padding: 15px 10px 0;
|
|
||||||
height: 52px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#release {
|
|
||||||
font-weight: bold;
|
|
||||||
font-size: 125%;
|
|
||||||
margin-top: 10px;
|
|
||||||
margin-inline-start: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#version {
|
|
||||||
font-weight: bold;
|
|
||||||
margin-inline-start: 0;
|
|
||||||
user-select: text;
|
|
||||||
-moz-user-focus: normal;
|
|
||||||
cursor: text;
|
|
||||||
}
|
|
||||||
|
|
||||||
#version.update {
|
|
||||||
font-weight: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
#distribution,
|
|
||||||
#distributionId {
|
|
||||||
display: none;
|
|
||||||
margin-block: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.text-blurb {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-inline-start: 0;
|
|
||||||
padding-inline-start: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#updateDeck > *:not(.selected) {
|
|
||||||
visibility: hidden;
|
|
||||||
}
|
|
||||||
|
|
||||||
#updateButton,
|
|
||||||
#updateDeck > hbox > label {
|
|
||||||
margin-inline-start: 0;
|
|
||||||
padding-inline-start: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.update-throbber {
|
|
||||||
width: 16px;
|
|
||||||
min-height: 16px;
|
|
||||||
margin-inline-end: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
html|img.update-throbber {
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
|
|
||||||
image.update-throbber {
|
|
||||||
list-style-image: url("chrome://global/skin/icons/loading.png");
|
|
||||||
}
|
|
||||||
|
|
||||||
@media (min-resolution: 1.1dppx) {
|
|
||||||
.update-throbber {
|
|
||||||
list-style-image: url("chrome://global/skin/icons/loading@2x.png");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
description > .text-link {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#submit-feedback {
|
|
||||||
margin-inline-start: .9em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.bottom-link {
|
|
||||||
text-align: center;
|
|
||||||
margin: 0 40px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#currentChannel {
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
|
|
||||||
#updateBox {
|
|
||||||
line-height: normal;
|
|
||||||
}
|
|
||||||
|
|
||||||
#icons > .icon {
|
|
||||||
-moz-context-properties: fill;
|
|
||||||
margin: 5px;
|
|
||||||
width: 16px;
|
|
||||||
height: 16px;
|
|
||||||
}
|
|
||||||
|
|
||||||
#icons:not(.checkingForUpdates, .downloading, .applying, .restarting) > .update-throbber,
|
|
||||||
#icons:not(.noUpdatesFound) > .noUpdatesFound,
|
|
||||||
#icons:not(.apply) > .apply {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#icons > .noUpdatesFound {
|
|
||||||
fill: #30e60b;
|
|
||||||
}
|
|
||||||
|
|
||||||
#icons > .apply {
|
|
||||||
fill: white;
|
|
||||||
}
|
|
||||||
|
|
@ -1,121 +0,0 @@
|
||||||
/* 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/. */
|
|
||||||
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
/* import-globals-from aboutDialog-appUpdater.js */
|
|
||||||
|
|
||||||
// Services = object with smart getters for common XPCOM services
|
|
||||||
var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|
||||||
var { AppConstants } = ChromeUtils.import(
|
|
||||||
"resource://gre/modules/AppConstants.jsm"
|
|
||||||
);
|
|
||||||
if (AppConstants.MOZ_UPDATER) {
|
|
||||||
Services.scriptloader.loadSubScript(
|
|
||||||
"chrome://browser/content/aboutDialog-appUpdater.js",
|
|
||||||
this
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
async function init(aEvent) {
|
|
||||||
if (aEvent.target != document) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let defaults = Services.prefs.getDefaultBranch(null);
|
|
||||||
let distroId = defaults.getCharPref("distribution.id", "");
|
|
||||||
if (distroId) {
|
|
||||||
let distroAbout = defaults.getStringPref("distribution.about", "");
|
|
||||||
// If there is about text, we always show it.
|
|
||||||
if (distroAbout) {
|
|
||||||
let distroField = document.getElementById("distribution");
|
|
||||||
distroField.value = distroAbout;
|
|
||||||
distroField.style.display = "block";
|
|
||||||
}
|
|
||||||
// If it's not a mozilla distribution, show the rest,
|
|
||||||
// unless about text exists, then we always show.
|
|
||||||
if (!distroId.startsWith("mozilla-") || distroAbout) {
|
|
||||||
let distroVersion = defaults.getCharPref("distribution.version", "");
|
|
||||||
if (distroVersion) {
|
|
||||||
distroId += " - " + distroVersion;
|
|
||||||
}
|
|
||||||
|
|
||||||
let distroIdField = document.getElementById("distributionId");
|
|
||||||
distroIdField.value = distroId;
|
|
||||||
distroIdField.style.display = "block";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Include the build ID and display warning if this is an "a#" (nightly or aurora) build
|
|
||||||
let versionId = "aboutDialog-version";
|
|
||||||
let versionAttributes = {
|
|
||||||
version: AppConstants.MOZ_APP_VERSION_DISPLAY,
|
|
||||||
bits: Services.appinfo.is64Bit ? 64 : 32,
|
|
||||||
};
|
|
||||||
|
|
||||||
let version = Services.appinfo.version;
|
|
||||||
if (/a\d+$/.test(version)) {
|
|
||||||
versionId = "aboutDialog-version-nightly";
|
|
||||||
let buildID = Services.appinfo.appBuildID;
|
|
||||||
let year = buildID.slice(0, 4);
|
|
||||||
let month = buildID.slice(4, 6);
|
|
||||||
let day = buildID.slice(6, 8);
|
|
||||||
versionAttributes.isodate = `${year}-${month}-${day}`;
|
|
||||||
|
|
||||||
document.getElementById("experimental").hidden = false;
|
|
||||||
document.getElementById("communityDesc").hidden = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use Fluent arguments for append version and the architecture of the build
|
|
||||||
let versionField = document.getElementById("version");
|
|
||||||
|
|
||||||
document.l10n.setAttributes(versionField, versionId, versionAttributes);
|
|
||||||
|
|
||||||
await document.l10n.translateElements([versionField]);
|
|
||||||
|
|
||||||
// Show a release notes link if we have a URL.
|
|
||||||
let relNotesLink = document.getElementById("releasenotes");
|
|
||||||
let relNotesPrefType = Services.prefs.getPrefType(
|
|
||||||
"app.releaseNotesURL.aboutDialog"
|
|
||||||
);
|
|
||||||
if (relNotesPrefType != Services.prefs.PREF_INVALID) {
|
|
||||||
let relNotesURL = Services.urlFormatter.formatURLPref(
|
|
||||||
"app.releaseNotesURL.aboutDialog"
|
|
||||||
);
|
|
||||||
if (relNotesURL != "about:blank") {
|
|
||||||
relNotesLink.href = relNotesURL;
|
|
||||||
relNotesLink.hidden = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppConstants.MOZ_UPDATER) {
|
|
||||||
gAppUpdater = new appUpdater({ buttonAutoFocus: true });
|
|
||||||
|
|
||||||
let channelLabel = document.getElementById("currentChannel");
|
|
||||||
let currentChannelText = document.getElementById("currentChannelText");
|
|
||||||
channelLabel.value = UpdateUtils.UpdateChannel;
|
|
||||||
let hasWinPackageId = false;
|
|
||||||
try {
|
|
||||||
hasWinPackageId = Services.sysinfo.getProperty("hasWinPackageId");
|
|
||||||
} catch (_ex) {
|
|
||||||
// The hasWinPackageId property doesn't exist; assume it should be false.
|
|
||||||
}
|
|
||||||
if (/^release($|\-)/.test(channelLabel.value) || hasWinPackageId) {
|
|
||||||
currentChannelText.hidden = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppConstants.IS_ESR) {
|
|
||||||
document.getElementById("release").hidden = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
window.sizeToContent();
|
|
||||||
|
|
||||||
if (AppConstants.platform == "macosx") {
|
|
||||||
window.moveTo(
|
|
||||||
screen.availWidth / 2 - window.outerWidth / 2,
|
|
||||||
screen.availHeight / 5
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,168 +0,0 @@
|
||||||
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
|
|
||||||
|
|
||||||
# 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/.
|
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
|
||||||
<?xml-stylesheet href="chrome://browser/content/aboutDialog.css" type="text/css"?>
|
|
||||||
<?xml-stylesheet href="chrome://branding/content/aboutDialog.css" type="text/css"?>
|
|
||||||
|
|
||||||
<window xmlns:html="http://www.w3.org/1999/xhtml"
|
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
||||||
id="aboutDialog"
|
|
||||||
windowtype="Browser:About"
|
|
||||||
onload="init(event);"
|
|
||||||
#ifdef MOZ_UPDATER
|
|
||||||
onunload="onUnload(event);"
|
|
||||||
#endif
|
|
||||||
#ifdef XP_MACOSX
|
|
||||||
inwindowmenu="false"
|
|
||||||
#else
|
|
||||||
data-l10n-id="aboutDialog-title"
|
|
||||||
#endif
|
|
||||||
role="dialog"
|
|
||||||
aria-describedby="version distribution distributionId communityDesc contributeDesc trademark"
|
|
||||||
>
|
|
||||||
#ifdef XP_MACOSX
|
|
||||||
#include macWindow.inc.xhtml
|
|
||||||
#else
|
|
||||||
<script src="chrome://browser/content/utilityOverlay.js"/>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
<linkset>
|
|
||||||
<html:link rel="localization" href="branding/brand.ftl"/>
|
|
||||||
<html:link rel="localization" href="browser/aboutDialog.ftl"/>
|
|
||||||
</linkset>
|
|
||||||
|
|
||||||
<script src="chrome://browser/content/aboutDialog.js"/>
|
|
||||||
|
|
||||||
<vbox id="aboutDialogContainer">
|
|
||||||
<hbox id="clientBox">
|
|
||||||
<vbox id="leftBox" flex="1"/>
|
|
||||||
<vbox id="rightBox" flex="1">
|
|
||||||
<label id="release" hidden="true">
|
|
||||||
<!-- This string is explicitly not translated -->
|
|
||||||
Extended Support Release
|
|
||||||
</label>
|
|
||||||
#ifndef MOZ_UPDATER
|
|
||||||
<!-- This HBOX is duplicated below with class="update" -->
|
|
||||||
<hbox align="baseline">
|
|
||||||
<label id="version"/>
|
|
||||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
|
||||||
</hbox>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
<label id="distribution" class="text-blurb"/>
|
|
||||||
<label id="distributionId" class="text-blurb"/>
|
|
||||||
|
|
||||||
<vbox id="detailsBox">
|
|
||||||
<hbox id="updateBox">
|
|
||||||
#ifdef MOZ_UPDATER
|
|
||||||
<html:div id="icons">
|
|
||||||
<html:img class="icon update-throbber" src="chrome://global/skin/icons/loading.png" role="presentation"/>
|
|
||||||
<html:img class="icon noUpdatesFound" src="chrome://global/skin/icons/check.svg" role="presentation"/>
|
|
||||||
<html:img class="icon apply" src="chrome://global/skin/icons/reload.svg" role="presentation"/>
|
|
||||||
</html:div>
|
|
||||||
<vbox>
|
|
||||||
<stack id="updateDeck" orient="vertical">
|
|
||||||
<hbox id="checkForUpdates" align="center">
|
|
||||||
<button id="checkForUpdatesButton" align="start"
|
|
||||||
data-l10n-id="update-checkForUpdatesButton"
|
|
||||||
oncommand="gAppUpdater.checkForUpdates();"/>
|
|
||||||
<spacer flex="1"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="downloadAndInstall" align="center">
|
|
||||||
<button id="downloadAndInstallButton" align="start"
|
|
||||||
oncommand="gAppUpdater.startDownload();"/>
|
|
||||||
<!-- label and accesskey will be filled by JS -->
|
|
||||||
<spacer flex="1"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="apply" align="center">
|
|
||||||
<button id="updateButton" align="start"
|
|
||||||
data-l10n-id="update-updateButton"
|
|
||||||
oncommand="gAppUpdater.buttonRestartAfterDownload();"/>
|
|
||||||
<spacer flex="1"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="checkingForUpdates" align="center">
|
|
||||||
<label data-l10n-id="update-checkingForUpdates"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="downloading" data-l10n-id="update-downloading-message" align="center">
|
|
||||||
<label id="downloadStatus" data-l10n-name="download-status"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="applying" align="center">
|
|
||||||
<label data-l10n-id="update-applying"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="downloadFailed" align="center" data-l10n-id="update-failed">
|
|
||||||
<label id="failedLink" is="text-link" data-l10n-name="failed-link"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="policyDisabled" align="center">
|
|
||||||
<label data-l10n-id="update-adminDisabled"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="noUpdatesFound" align="center">
|
|
||||||
<label data-l10n-id="update-noUpdatesFound"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="otherInstanceHandlingUpdates" align="center">
|
|
||||||
<label data-l10n-id="update-otherInstanceHandlingUpdates"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="manualUpdate" align="center" data-l10n-id="update-manual">
|
|
||||||
<label id="manualLink" is="text-link" data-l10n-name="manual-link"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="unsupportedSystem" align="center" data-l10n-id="update-unsupported">
|
|
||||||
<label id="unsupportedLink" is="text-link" data-l10n-name="unsupported-link"/>
|
|
||||||
</hbox>
|
|
||||||
<hbox id="restarting" align="center">
|
|
||||||
<label data-l10n-id="update-restarting"/>
|
|
||||||
</hbox>
|
|
||||||
</stack>
|
|
||||||
<!-- This HBOX is duplicated above without class="update" -->
|
|
||||||
<hbox align="baseline">
|
|
||||||
<label id="version" class="update"/>
|
|
||||||
<label id="releasenotes" is="text-link" hidden="true" data-l10n-id="releaseNotes-link"/>
|
|
||||||
</hbox>
|
|
||||||
<description class="text-blurb">
|
|
||||||
<label is="text-link" onclick="openHelpLink('firefox-help')" data-l10n-id="aboutdialog-help-user"/>
|
|
||||||
<label id="submit-feedback" is="text-link" onclick="openFeedbackPage()" data-l10n-id="aboutdialog-submit-feedback"/>
|
|
||||||
</description>
|
|
||||||
</vbox>
|
|
||||||
#endif
|
|
||||||
</hbox>
|
|
||||||
|
|
||||||
#ifdef MOZ_UPDATER
|
|
||||||
<description class="text-blurb" id="currentChannelText" data-l10n-id="channel-description">
|
|
||||||
<label id="currentChannel" data-l10n-name="current-channel"/>
|
|
||||||
</description>
|
|
||||||
#endif
|
|
||||||
<vbox id="experimental" hidden="true">
|
|
||||||
<description class="text-blurb" id="warningDesc" data-l10n-id="warningDesc-version"></description>
|
|
||||||
<description class="text-blurb" id="communityExperimentalDesc" data-l10n-id="community-exp">
|
|
||||||
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="community-exp-mozillaLink"/>
|
|
||||||
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-exp-creditsLink"/>
|
|
||||||
</description>
|
|
||||||
</vbox>
|
|
||||||
<description class="text-blurb" id="communityDesc" data-l10n-id="community-2">
|
|
||||||
<label is="text-link" href="https://www.mozilla.org/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="community-mozillaLink"/>
|
|
||||||
<label is="text-link" useoriginprincipal="true" href="about:credits" data-l10n-name="community-creditsLink"/>
|
|
||||||
</description>
|
|
||||||
<description class="text-blurb" id="contributeDesc" data-l10n-id="helpus">
|
|
||||||
<label is="text-link" href="https://donate.mozilla.org/?utm_source=firefox&utm_medium=referral&utm_campaign=firefox_about&utm_content=firefox_about" data-l10n-name="helpus-donateLink"/>
|
|
||||||
<label is="text-link" href="https://www.mozilla.org/contribute/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-name="helpus-getInvolvedLink"/>
|
|
||||||
</description>
|
|
||||||
</vbox>
|
|
||||||
</vbox>
|
|
||||||
</hbox>
|
|
||||||
<vbox id="bottomBox">
|
|
||||||
<hbox pack="center">
|
|
||||||
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:license" data-l10n-id="bottomLinks-license"/>
|
|
||||||
<label is="text-link" class="bottom-link" useoriginprincipal="true" href="about:rights" data-l10n-id="bottomLinks-rights"/>
|
|
||||||
<label is="text-link" class="bottom-link" href="https://www.mozilla.org/privacy/?utm_source=firefox-browser&utm_medium=firefox-desktop&utm_campaign=about-dialog" data-l10n-id="bottomLinks-privacy"/>
|
|
||||||
</hbox>
|
|
||||||
<description id="trademark" data-l10n-id="trademarkInfo"></description>
|
|
||||||
</vbox>
|
|
||||||
</vbox>
|
|
||||||
|
|
||||||
<keyset>
|
|
||||||
<key keycode="VK_ESCAPE" oncommand="window.close();"/>
|
|
||||||
</keyset>
|
|
||||||
|
|
||||||
</window>
|
|
||||||
|
Before Width: | Height: | Size: 151 KiB |
|
|
@ -1,26 +0,0 @@
|
||||||
diff --git a/toolkit/components/maintenanceservice/moz.build b/toolkit/components/maintenanceservice/moz.build
|
|
||||||
index a4dae3f..312873c 100644
|
|
||||||
--- a/toolkit/components/maintenanceservice/moz.build
|
|
||||||
+++ b/toolkit/components/maintenanceservice/moz.build
|
|
||||||
@@ -18,7 +18,7 @@ USE_LIBS += [
|
|
||||||
]
|
|
||||||
|
|
||||||
# For debugging purposes only
|
|
||||||
-# DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
|
|
||||||
+DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
|
|
||||||
|
|
||||||
DEFINES["UNICODE"] = True
|
|
||||||
DEFINES["_UNICODE"] = True
|
|
||||||
diff --git a/toolkit/mozapps/update/tests/moz.build b/toolkit/mozapps/update/tests/moz.build
|
|
||||||
index 1a52a88..59d100c 100644
|
|
||||||
--- a/toolkit/mozapps/update/tests/moz.build
|
|
||||||
+++ b/toolkit/mozapps/update/tests/moz.build
|
|
||||||
@@ -59,7 +59,7 @@ if CONFIG["MOZ_MAINTENANCE_SERVICE"]:
|
|
||||||
DEFINES["MOZ_MAINTENANCE_SERVICE"] = CONFIG["MOZ_MAINTENANCE_SERVICE"]
|
|
||||||
|
|
||||||
# For debugging purposes only
|
|
||||||
-# DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
|
|
||||||
+DEFINES['DISABLE_UPDATER_AUTHENTICODE_CHECK'] = True
|
|
||||||
|
|
||||||
if CONFIG["CC_TYPE"] == "clang-cl":
|
|
||||||
WIN32_EXE_LDFLAGS += ["-ENTRY:wmainCRTStartup"]
|
|
||||||
|
|
@ -1,20 +0,0 @@
|
||||||
diff --git a/python/mozbuild/mozbuild/mach_commands.py b/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
index 10d7a8f..610a4fa 100644
|
|
||||||
--- a/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
+++ b/python/mozbuild/mozbuild/mach_commands.py
|
|
||||||
@@ -2457,6 +2457,7 @@ def package_l10n(command_context, verbose=False, locales=[]):
|
|
||||||
)
|
|
||||||
command_context.run_process(
|
|
||||||
[
|
|
||||||
+ "python3",
|
|
||||||
mozpath.join(command_context.topsrcdir, "mach"),
|
|
||||||
"build",
|
|
||||||
"chrome-{}".format(locale),
|
|
||||||
@@ -2476,6 +2477,7 @@ def package_l10n(command_context, verbose=False, locales=[]):
|
|
||||||
)
|
|
||||||
command_context.run_process(
|
|
||||||
[
|
|
||||||
+ "python3",
|
|
||||||
mozpath.join(command_context.topsrcdir, "mach"),
|
|
||||||
"android",
|
|
||||||
"assemble-app",
|
|
||||||
|
Before Width: | Height: | Size: 31 KiB |
|
|
@ -1,43 +0,0 @@
|
||||||
ac_add_options --enable-application=browser
|
|
||||||
|
|
||||||
ac_add_options --allow-addon-sideload
|
|
||||||
ac_add_options --disable-crashreporter
|
|
||||||
ac_add_options --disable-debug
|
|
||||||
ac_add_options --disable-default-browser-agent
|
|
||||||
ac_add_options --disable-tests
|
|
||||||
ac_add_options --disable-updater
|
|
||||||
ac_add_options --enable-hardening
|
|
||||||
ac_add_options --enable-optimize
|
|
||||||
ac_add_options --enable-release
|
|
||||||
ac_add_options --enable-rust-simd
|
|
||||||
|
|
||||||
ac_add_options --with-app-name=firefox
|
|
||||||
ac_add_options --with-branding=browser/branding/librewolf
|
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
|
||||||
|
|
||||||
# see issue # https://gitlab.com/librewolf-community/browser/arch/-/issues/49
|
|
||||||
export MOZ_REQUIRE_SIGNING=
|
|
||||||
|
|
||||||
mk_add_options MOZ_CRASHREPORTER=0
|
|
||||||
mk_add_options MOZ_DATA_REPORTING=0
|
|
||||||
mk_add_options MOZ_NORMANTY=0
|
|
||||||
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
|
||||||
mk_add_options MOZ_TELEMETRY_REPORTING=0
|
|
||||||
|
|
||||||
#
|
|
||||||
# windows specific.
|
|
||||||
#
|
|
||||||
# - no need to specify wasi sdk folder
|
|
||||||
#
|
|
||||||
|
|
||||||
ac_add_options --disable-maintenance-service
|
|
||||||
ac_add_options --enable-strip
|
|
||||||
|
|
||||||
# needed for windows/mac auto update ONLY. it's a security risk so other OSses don't need it
|
|
||||||
# https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html
|
|
||||||
|
|
||||||
#ac_add_options --disable-verify-mar
|
|
||||||
|
|
||||||
# Internationalization
|
|
||||||
ac_add_options --with-l10n-base=$(pwd -W)/browser/locales/l10n
|
|
||||||
|
|
@ -1,6 +0,0 @@
|
||||||
ac_add_options --enable-application=browser
|
|
||||||
|
|
||||||
ac_add_options --enable-debug
|
|
||||||
|
|
||||||
#ac_add_options --with-app-name=librewolf
|
|
||||||
ac_add_options --with-branding=browser/branding/librewolf
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
################
|
|
||||||
# build 32-bit version..
|
|
||||||
#ac_add_options --target=x86_64-pc-mingw32
|
|
||||||
ac_add_options --target=i686-pc-mingw32
|
|
||||||
#ac_add_options --enable-bootstrap
|
|
||||||
ac_add_options --without-wasm-sandboxed-libraries
|
|
||||||
|
|
||||||
# currently fails on <stdatomic.h> when building..
|
|
||||||
#def deps_win32():
|
|
||||||
# exec('rustup target add i686-pc-windows-msvc')
|
|
||||||
#
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
|
|
||||||
index 4daacdb..8edd77f 100644
|
|
||||||
--- a/browser/installer/package-manifest.in
|
|
||||||
+++ b/browser/installer/package-manifest.in
|
|
||||||
@@ -397,8 +397,8 @@ bin/libfreebl_64int_3.so
|
|
||||||
; [MaintenanceService]
|
|
||||||
;
|
|
||||||
#ifdef MOZ_MAINTENANCE_SERVICE
|
|
||||||
-@BINPATH@/maintenanceservice.exe
|
|
||||||
-@BINPATH@/maintenanceservice_installer.exe
|
|
||||||
+;@BINPATH@/maintenanceservice.exe
|
|
||||||
+;@BINPATH@/maintenanceservice_installer.exe
|
|
||||||
#endif
|
|
||||||
|
|
||||||
; [Crash Reporter]
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
<!-- 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/. -->
|
|
||||||
|
|
||||||
<Application xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
|
|
||||||
<VisualElements
|
|
||||||
ShowNameOnSquare150x150Logo='on'
|
|
||||||
Square150x150Logo='browser\VisualElements\PrivateBrowsing_150.png'
|
|
||||||
Square70x70Logo='browser\VisualElements\PrivateBrowsing_70.png'
|
|
||||||
ForegroundText='light'
|
|
||||||
BackgroundColor='#14171a'/>
|
|
||||||
</Application>
|
|
||||||
|
|
@ -1,176 +0,0 @@
|
||||||
!include "MUI2.nsh"
|
|
||||||
!include "LogicLib.nsh"
|
|
||||||
!addplugindir .
|
|
||||||
!addplugindir x86-ansi
|
|
||||||
|
|
||||||
!define APPNAME "LibreWolf"
|
|
||||||
!define PROGNAME "librewolf"
|
|
||||||
!define EXECUTABLE "${PROGNAME}.exe"
|
|
||||||
!define PROG_VERSION "pkg_version"
|
|
||||||
!define COMPANYNAME "LibreWolf"
|
|
||||||
!define ESTIMATED_SIZE 190000
|
|
||||||
!define MUI_ICON "librewolf.ico"
|
|
||||||
!define MUI_WELCOMEFINISHPAGE_BITMAP "banner.bmp"
|
|
||||||
|
|
||||||
Name "${APPNAME}"
|
|
||||||
OutFile "${PROGNAME}-${PROG_VERSION}.en-US.win64-setup.exe"
|
|
||||||
InstallDirRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${COMPANYNAME} ${APPNAME}" "InstallLocation"
|
|
||||||
InstallDir $PROGRAMFILES64\${APPNAME}
|
|
||||||
RequestExecutionLevel admin
|
|
||||||
|
|
||||||
# Pages
|
|
||||||
|
|
||||||
!define MUI_ABORTWARNING
|
|
||||||
|
|
||||||
!define MUI_WELCOMEPAGE_TITLE "Welcome to the LibreWolf Setup"
|
|
||||||
!define MUI_WELCOMEPAGE_TEXT "This setup will guide you through the installation of LibreWolf.$\r$\n$\r$\n\
|
|
||||||
If you don't have it installed already, this will also install the latest Visual C++ Redistributable.$\r$\n$\r$\n\
|
|
||||||
Click Next to continue."
|
|
||||||
!insertmacro MUI_PAGE_WELCOME
|
|
||||||
!insertmacro MUI_PAGE_DIRECTORY
|
|
||||||
!insertmacro MUI_PAGE_INSTFILES
|
|
||||||
!insertmacro MUI_PAGE_FINISH
|
|
||||||
|
|
||||||
!insertmacro MUI_UNPAGE_CONFIRM
|
|
||||||
!insertmacro MUI_UNPAGE_INSTFILES
|
|
||||||
|
|
||||||
!insertmacro MUI_LANGUAGE "English"
|
|
||||||
|
|
||||||
Section
|
|
||||||
|
|
||||||
# Make sure LibreWolf is closed before the installation
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
IfSilent 0 +4
|
|
||||||
DetailPrint "${APPNAME} is still running, aborting because of silent install."
|
|
||||||
SetErrorlevel 2
|
|
||||||
Abort
|
|
||||||
|
|
||||||
DetailPrint "${APPNAME} is still running"
|
|
||||||
MessageBox MB_OKCANCEL "LibreWolf is still running and has to be closed for the setup to continue." IDOK continue IDCANCEL break
|
|
||||||
break:
|
|
||||||
SetErrorlevel 1
|
|
||||||
Abort
|
|
||||||
continue:
|
|
||||||
DetailPrint "Closing ${APPNAME} gracefully..."
|
|
||||||
nsProcess::_CloseProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
Sleep 2000
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
DetailPrint "Failed to close ${APPNAME}, killing it..."
|
|
||||||
nsProcess::_KillProcess "${EXECUTABLE}"
|
|
||||||
Sleep 2000
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
DetailPrint "Failed to kill ${APPNAME}, aborting"
|
|
||||||
MessageBox MB_ICONSTOP "LibreWolf is still running and can't be closed by the installer. Please close it manually and try again."
|
|
||||||
SetErrorlevel 2
|
|
||||||
Abort
|
|
||||||
${EndIf}
|
|
||||||
${EndIf}
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
# Install Visual C++ Redistributable (only if not silent)
|
|
||||||
IfSilent +4 0
|
|
||||||
InitPluginsDir
|
|
||||||
File /oname=$PLUGINSDIR\vc_redist.x64.exe vc_redist.x64.exe
|
|
||||||
ExecWait "$PLUGINSDIR\vc_redist.x64.exe /install /quiet /norestart"
|
|
||||||
|
|
||||||
# Copy files
|
|
||||||
SetOutPath $INSTDIR
|
|
||||||
File /r librewolf\*.*
|
|
||||||
|
|
||||||
# Start Menu
|
|
||||||
createDirectory "$SMPROGRAMS\${COMPANYNAME}"
|
|
||||||
createShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME}.lnk" "$INSTDIR\${PROGNAME}.exe" "" "$INSTDIR\${MUI_ICON}"
|
|
||||||
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\${MUI_ICON}$\""
|
|
||||||
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\FileAssociations" ".pdf" "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" "Start the LibreWolf Browser"
|
|
||||||
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationCompany" "LibreWolf Community"
|
|
||||||
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\DefaultIcon" "" "$INSTDIR\librewolf.exe,0"
|
|
||||||
WriteRegStr HKLM "Software\Classes\LibreWolfHTM\shell\open\command" "" "$\"$INSTDIR\librewolf.exe$\" -osint -url $\"%1$\""
|
|
||||||
|
|
||||||
SectionEnd
|
|
||||||
|
|
||||||
|
|
||||||
# Uninstaller
|
|
||||||
section "Uninstall"
|
|
||||||
|
|
||||||
# Kill LibreWolf if it is still running
|
|
||||||
nsProcess::_FindProcess "${EXECUTABLE}"
|
|
||||||
Pop $R0
|
|
||||||
${If} $R0 = 0
|
|
||||||
DetailPrint "${APPNAME} is still running, killing it..."
|
|
||||||
nsProcess::_KillProcess "${EXECUTABLE}"
|
|
||||||
Sleep 2000
|
|
||||||
${EndIf}
|
|
||||||
|
|
||||||
# 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
|
|
||||||
|
|
@ -1,50 +0,0 @@
|
||||||
import os,sys,subprocess,os.path
|
|
||||||
|
|
||||||
bash_loc = 'c:/mozilla-build/msys2/usr/bin/bash.exe'
|
|
||||||
do_zip = False
|
|
||||||
|
|
||||||
# native()/bash()/exec() utility functions
|
|
||||||
def native(cmd,do_print=True):
|
|
||||||
sys.stdout.flush()
|
|
||||||
if do_print:
|
|
||||||
print(cmd)
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
retval = os.system(cmd)
|
|
||||||
if retval != 0:
|
|
||||||
sys.exit(retval)
|
|
||||||
|
|
||||||
def bash(cmd,do_print=True):
|
|
||||||
tmp = []
|
|
||||||
tmp += [bash_loc, '-c', cmd]
|
|
||||||
sys.stdout.flush()
|
|
||||||
if do_print:
|
|
||||||
print(cmd)
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
retval = subprocess.run(tmp).returncode
|
|
||||||
if retval != 0:
|
|
||||||
sys.exit(retval)
|
|
||||||
|
|
||||||
def exec(cmd,do_print=True):
|
|
||||||
_native = False
|
|
||||||
if not os.path.isfile(bash_loc):
|
|
||||||
_native = True
|
|
||||||
if _native:
|
|
||||||
return native(cmd,do_print)
|
|
||||||
return bash(cmd,do_print)
|
|
||||||
|
|
||||||
def patch(patchfile):
|
|
||||||
cmd = "patch -p1 -i {}".format(patchfile)
|
|
||||||
sys.stdout.flush()
|
|
||||||
print("\n*** -> {}".format(cmd))
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
retval = os.system(cmd)
|
|
||||||
if retval != 0:
|
|
||||||
sys.stdout.flush()
|
|
||||||
print("fatal error: patch '{}' failed".format(patchfile))
|
|
||||||
sys.stdout.flush()
|
|
||||||
sys.exit(retval)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,13 +0,0 @@
|
||||||
diff --git a/browser/app/splash.rc b/browser/app/splash.rc
|
|
||||||
index 259a806..78cd58e 100644
|
|
||||||
--- a/browser/app/splash.rc
|
|
||||||
+++ b/browser/app/splash.rc
|
|
||||||
@@ -12,7 +12,7 @@ IDI_APPLICATION ICON FIREFOX_ICO
|
|
||||||
IDI_NEWWINDOW ICON NEWWINDOW_ICO
|
|
||||||
IDI_NEWTAB ICON NEWTAB_ICO
|
|
||||||
IDI_PBMODE ICON PBMODE_ICO
|
|
||||||
-IDI_DOCUMENT_PDF ICON DOCUMENT_PDF_ICO
|
|
||||||
+IDI_DOCUMENT_PDF ICON DOCUMENT_ICO
|
|
||||||
|
|
||||||
STRINGTABLE DISCARDABLE
|
|
||||||
BEGIN
|
|
||||||
|
|
@ -1,142 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import optparse
|
|
||||||
|
|
||||||
import subprocess,os.path
|
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
|
||||||
parser.add_option('-n', '--no-execute', dest='no_execute', default=False, action="store_true")
|
|
||||||
options, remainder = parser.parse_args()
|
|
||||||
|
|
||||||
bash_loc = 'c:/mozilla-build/msys/bin/bash.exe'
|
|
||||||
|
|
||||||
# native()/bash()/exec() utility functions
|
|
||||||
def native(cmd,exit_on_fail = True,do_print=True):
|
|
||||||
sys.stdout.flush()
|
|
||||||
if do_print:
|
|
||||||
print(cmd)
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
retval = os.system(cmd)
|
|
||||||
if retval != 0 and exit_on_fail:
|
|
||||||
sys.exit(retval)
|
|
||||||
return retval
|
|
||||||
|
|
||||||
def bash(cmd,exit_on_fail = True,do_print=True):
|
|
||||||
tmp = []
|
|
||||||
tmp += [bash_loc, '-c', cmd]
|
|
||||||
sys.stdout.flush()
|
|
||||||
if do_print:
|
|
||||||
print(cmd)
|
|
||||||
sys.stdout.flush()
|
|
||||||
|
|
||||||
retval = subprocess.run(tmp).returncode
|
|
||||||
if retval != 0 and exit_on_fail:
|
|
||||||
sys.exit(retval)
|
|
||||||
return retval
|
|
||||||
|
|
||||||
def exec(cmd,exit_on_fail = True, do_print=True):
|
|
||||||
_native = False
|
|
||||||
if not os.path.isfile(bash_loc):
|
|
||||||
_native = True
|
|
||||||
if _native:
|
|
||||||
return native(cmd,exit_on_fail,do_print)
|
|
||||||
return bash(cmd,exit_on_fail,do_print)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#def exec(cmd, exit_on_fail = True, do_print = True):
|
|
||||||
# if cmd != '':
|
|
||||||
# if do_print:
|
|
||||||
# print(cmd)
|
|
||||||
# if not options.no_execute:
|
|
||||||
# retval = os.system(cmd)
|
|
||||||
# if retval != 0 and exit_on_fail:
|
|
||||||
# print("fatal error: command '{}' failed".format(cmd))
|
|
||||||
# sys.exit(1)
|
|
||||||
# return retval
|
|
||||||
# return None
|
|
||||||
#
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
def get_version_from_file(version_filename = './version'):
|
|
||||||
with open(version_filename) as f:
|
|
||||||
lines = f.readlines()
|
|
||||||
if len(lines) != 1:
|
|
||||||
sys.stderr.write('error: ./version contains too many lines.')
|
|
||||||
os.exit(1)
|
|
||||||
return lines[0].strip()
|
|
||||||
return None
|
|
||||||
|
|
||||||
def make_version_string(major,minor,patch):
|
|
||||||
if patch == 0:
|
|
||||||
return '{}.{}'.format(major,minor)
|
|
||||||
else:
|
|
||||||
return '{}.{}.{}'.format(major,minor,patch)
|
|
||||||
|
|
||||||
def firefox_release_url(ver):
|
|
||||||
return 'https://archive.mozilla.org/pub/firefox/releases/{}/source/firefox-{}.source.tar.xz'.format(ver, ver)
|
|
||||||
|
|
||||||
def check_url_exists(url):
|
|
||||||
i = exec('wget --spider {} 2>/dev/null'.format(url), do_print=False, exit_on_fail=False)
|
|
||||||
if i == 0:
|
|
||||||
return True
|
|
||||||
else:
|
|
||||||
return False
|
|
||||||
|
|
||||||
#
|
|
||||||
# main script
|
|
||||||
#
|
|
||||||
|
|
||||||
base_version = get_version_from_file()
|
|
||||||
|
|
||||||
# split base_version into major.minor.patch
|
|
||||||
split_version = base_version.split(sep='.')
|
|
||||||
if len(split_version) > 3 or len(split_version) < 1:
|
|
||||||
sys.stderr.write('error: ./version file contains invalid version number')
|
|
||||||
sys.exit(1)
|
|
||||||
elif len(split_version) == 1:
|
|
||||||
major = int(split_version[0])
|
|
||||||
minor = 0
|
|
||||||
patch = 0
|
|
||||||
elif len(split_version) == 2:
|
|
||||||
major = int(split_version[0])
|
|
||||||
minor = int(split_version[1])
|
|
||||||
patch = 0
|
|
||||||
elif len(split_version) == 3:
|
|
||||||
major = int(split_version[0])
|
|
||||||
minor = int(split_version[1])
|
|
||||||
patch = int(split_version[2])
|
|
||||||
|
|
||||||
# now check if this version exists with Mozilla
|
|
||||||
if not check_url_exists(firefox_release_url(make_version_string(major,minor,patch))):
|
|
||||||
sys.stderr.write('error: The current version is unavailable.\n')
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
# Check for releases..
|
|
||||||
s = ''
|
|
||||||
|
|
||||||
if check_url_exists(firefox_release_url(make_version_string(major,minor,patch+1))):
|
|
||||||
s = ('{}.{}.{}'.format(major,minor,patch+1))
|
|
||||||
elif check_url_exists(firefox_release_url(make_version_string(major,minor+1,0))):
|
|
||||||
s = ('{}.{}'.format(major,minor+1))
|
|
||||||
elif check_url_exists(firefox_release_url(make_version_string(major+1,0,0))):
|
|
||||||
s = ('{}.0'.format(major+1))
|
|
||||||
else:
|
|
||||||
s = base_version
|
|
||||||
|
|
||||||
if s != base_version:
|
|
||||||
print('~ The wheel has turned, and version {} has been released. ~'.format(s))
|
|
||||||
|
|
||||||
with open('./version', 'w') as f:
|
|
||||||
f.write(s)
|
|
||||||
exec('echo 0 > release')
|
|
||||||
else:
|
|
||||||
print('- Latest Firefox release is still {}. -'.format(base_version))
|
|
||||||
|
|
||||||
sys.exit(0) # ensure 0 exit code
|
|
||||||
336
winbuild/mk.py
|
|
@ -1,336 +0,0 @@
|
||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import os,sys,subprocess,os.path
|
|
||||||
from assets.tools import exec, patch
|
|
||||||
|
|
||||||
#
|
|
||||||
# main functions
|
|
||||||
#
|
|
||||||
|
|
||||||
|
|
||||||
def deps_win32():
|
|
||||||
exec('rustup target add i686-pc-windows-msvc')
|
|
||||||
|
|
||||||
def full_mar():
|
|
||||||
with open('version','r') as file:
|
|
||||||
version = file.read().rstrip()
|
|
||||||
with open('source_release','r') as file:
|
|
||||||
source_release = file.read().rstrip()
|
|
||||||
os.chdir('librewolf-{}-{}'.format(version,source_release))
|
|
||||||
|
|
||||||
# see https://firefox-source-docs.mozilla.org/taskcluster/setting-up-an-update-server.html
|
|
||||||
|
|
||||||
objdir = 'obj-x86_64-pc-mingw32'
|
|
||||||
mar_output_path = 'MAR'
|
|
||||||
# version already set
|
|
||||||
channel = 'default'
|
|
||||||
|
|
||||||
exec('mkdir -p MAR') # output folder
|
|
||||||
exec('touch {}/dist/firefox/precomplete'.format(objdir))
|
|
||||||
exec('MAR={}/dist/host/bin/mar.exe MOZ_PRODUCT_VERSION={}-{} MAR_CHANNEL_ID={} ./tools/update-packaging/make_full_update.sh {} {}/dist/firefox'.format(objdir,version,source_release,channel,mar_output_path,objdir))
|
|
||||||
|
|
||||||
# create config.xml
|
|
||||||
mar_name = 'output.mar'
|
|
||||||
|
|
||||||
# sha512sum
|
|
||||||
hash_sha512 = ''
|
|
||||||
exec("cat MAR/{} | sha512sum | awk '{}' > tmpfile78419".format(mar_name,'{print $1}'))
|
|
||||||
with open('tmpfile78419', 'r') as tmpfile:
|
|
||||||
data = tmpfile.read().rstrip()
|
|
||||||
hash_sha512 = data
|
|
||||||
exec('rm -f tmpfile78419')
|
|
||||||
|
|
||||||
# size in bytes
|
|
||||||
size = os.path.getsize('MAR/{}'.format(mar_name))
|
|
||||||
mar_version = '2000.0a1'
|
|
||||||
build_id = '21181002100236'
|
|
||||||
update_url = 'http://127.0.0.1:8000' # no trailing slash
|
|
||||||
config_xml = '''<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<updates>
|
|
||||||
<update type="minor" displayVersion="{}" appVersion="{}" platformVersion="{}" buildID="{}">
|
|
||||||
<patch type="complete" URL="{}/{}" hashFunction="sha512" hashValue="{}" size="{}"/>
|
|
||||||
</update>
|
|
||||||
</updates>
|
|
||||||
'''.format(mar_version,mar_version,mar_version,build_id,update_url,mar_name,hash_sha512,size)
|
|
||||||
textfile = open('MAR/update.xml','w')
|
|
||||||
textfile.write(config_xml)
|
|
||||||
textfile.close()
|
|
||||||
|
|
||||||
# restore state
|
|
||||||
os.chdir('..')
|
|
||||||
pass
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def fetch():
|
|
||||||
exec('wget -q -O version https://gitlab.com/librewolf-community/browser/source/-/raw/main/version')
|
|
||||||
exec('wget -q -O source_release https://gitlab.com/librewolf-community/browser/source/-/raw/main/release')
|
|
||||||
exec('wget -q -O librewolf-$(cat version)-$(cat source_release).source.tar.gz.sha256sum https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(cat version)-$(cat source_release).source.tar.gz.sha256sum?job=Build')
|
|
||||||
exec('wget -q -O librewolf-$(cat version)-$(cat source_release).source.tar.gz https://gitlab.com/librewolf-community/browser/source/-/jobs/artifacts/main/raw/librewolf-$(cat version)-$(cat source_release).source.tar.gz?job=Build')
|
|
||||||
exec('sha256sum -c librewolf-$(cat version)-$(cat source_release).source.tar.gz.sha256sum')
|
|
||||||
exec('cat librewolf-$(cat version)-$(cat source_release).source.tar.gz.sha256sum')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def build(debug=False):
|
|
||||||
|
|
||||||
exec('rm -rf librewolf-$(cat version)-$(cat source_release)')
|
|
||||||
exec('tar xf librewolf-$(cat version)-$(cat source_release).source.tar.gz')
|
|
||||||
|
|
||||||
with open('version','r') as file:
|
|
||||||
version = file.read().rstrip()
|
|
||||||
with open('source_release','r') as file:
|
|
||||||
source_release = file.read().rstrip()
|
|
||||||
os.chdir('librewolf-{}-{}'.format(version,source_release))
|
|
||||||
|
|
||||||
# patches
|
|
||||||
if debug:
|
|
||||||
exec('cp -v ../assets/mozconfig.windows.debug mozconfig')
|
|
||||||
else:
|
|
||||||
exec('cp -v ../assets/mozconfig.windows mozconfig')
|
|
||||||
|
|
||||||
# patches for windows only
|
|
||||||
patch('../assets/package-manifest.patch')
|
|
||||||
#patch('../assets/disable-verify-mar.patch')
|
|
||||||
patch('../assets/tryfix-reslink-fail.patch')
|
|
||||||
patch('../assets/fix-l10n-package-cmd.patch')
|
|
||||||
exec("cp -v ../assets/private_browsing.VisualElementsManifest.xml ../assets/PrivateBrowsing_150.png ../assets/PrivateBrowsing_70.png browser/branding/librewolf")
|
|
||||||
|
|
||||||
# perform the build and package.
|
|
||||||
exec('./mach build')
|
|
||||||
exec('./mach package')
|
|
||||||
os.chdir('..')
|
|
||||||
|
|
||||||
|
|
||||||
def artifacts():
|
|
||||||
|
|
||||||
# Trying to fix issue #146 -> https://gitlab.com/librewolf-community/browser/windows/-/issues/146
|
|
||||||
# (keep this False for now)
|
|
||||||
_with_app_name = False
|
|
||||||
|
|
||||||
with open('version','r') as file1:
|
|
||||||
version = file1.read().rstrip()
|
|
||||||
source_release = ''
|
|
||||||
with open('source_release','r') as file3:
|
|
||||||
source_release = file3.read().rstrip()
|
|
||||||
buildzip_filename = 'firefox-{}-{}.en-US.win64.zip'.format(version,source_release)
|
|
||||||
if _with_app_name:
|
|
||||||
buildzip_filename = 'librewolf-{}-{}.en-US.win64.zip'.format(version,source_release)
|
|
||||||
exec('cp -v librewolf-{}-{}/obj-x86_64-pc-mingw32/dist/{} .'.format(version,source_release,buildzip_filename))
|
|
||||||
exec('cp -v librewolf-{}-{}/obj-x86_64-pc-mingw32/dist/install/sea/firefox-{}-{}.en-US.win64.installer.exe .'.format(version,source_release,version,source_release))
|
|
||||||
exec('rm -rf work && mkdir work')
|
|
||||||
os.chdir('work')
|
|
||||||
exec('unzip -q ../{}'.format(buildzip_filename))
|
|
||||||
if not _with_app_name:
|
|
||||||
exec('mv firefox librewolf')
|
|
||||||
os.chdir('librewolf')
|
|
||||||
if not _with_app_name:
|
|
||||||
exec('mv firefox.exe librewolf.exe')
|
|
||||||
os.chdir('..')
|
|
||||||
os.chdir('..')
|
|
||||||
|
|
||||||
# let's get 'release'.
|
|
||||||
with open('release','r') as file2:
|
|
||||||
release = file2.read().rstrip()
|
|
||||||
source_release = ''
|
|
||||||
with open('source_release','r') as file5:
|
|
||||||
source_release = file5.read().rstrip()
|
|
||||||
if release == '1' :
|
|
||||||
full_version = '{}-{}'.format(version,source_release)
|
|
||||||
else:
|
|
||||||
full_version = '{}-{}-{}'.format(version,source_release,release)
|
|
||||||
|
|
||||||
# let's copy in the .ico icon.
|
|
||||||
exec('cp -v assets/librewolf.ico work/librewolf')
|
|
||||||
|
|
||||||
# Let's make the portable zip first.
|
|
||||||
if False:
|
|
||||||
os.chdir('work')
|
|
||||||
exec('rm -rf librewolf-{}'.format(version))
|
|
||||||
os.makedirs('librewolf-{}/Profiles/Default'.format(version), exist_ok=True)
|
|
||||||
os.makedirs('librewolf-{}/LibreWolf'.format(version), exist_ok=True)
|
|
||||||
exec('cp -r librewolf/* librewolf-{}/LibreWolf'.format(version))
|
|
||||||
exec('wget -q -O librewolf-{}/librewolf-portable.exe https://gitlab.com/librewolf-community/browser/windows/uploads/64b929c39999d00efb56419f963e1b22/librewolf-portable.exe'.format(version))
|
|
||||||
zipname = 'librewolf-{}.en-US.win64.zip'.format(full_version)
|
|
||||||
exec("rm -f ../{}".format(zipname))
|
|
||||||
exec("zip -qr9 ../{} librewolf-{}".format(zipname,version))
|
|
||||||
os.chdir('..')
|
|
||||||
|
|
||||||
# With that out of the way, we need to create the main nsis setup.
|
|
||||||
os.chdir('work')
|
|
||||||
exec("mkdir x86-ansi")
|
|
||||||
exec("wget -q -O ./x86-ansi/nsProcess.dll https://shorsh.de/upload/2y9p/nsProcess.dll")
|
|
||||||
exec("wget -q -O ./vc_redist.x64.exe https://aka.ms/vs/17/release/vc_redist.x64.exe")
|
|
||||||
setupname = 'librewolf-{}.en-US.win64-setup.exe'.format(full_version)
|
|
||||||
exec('sed \"s/pkg_version/{}/g\" < ../assets/setup.nsi > tmp.nsi'.format(full_version))
|
|
||||||
exec('cp -v ../assets/librewolf.ico .')
|
|
||||||
exec('cp -v ../assets/banner.bmp .')
|
|
||||||
exec('makensis -V1 tmp.nsi')
|
|
||||||
exec('rm -rf tmp.nsi librewolf.ico banner.bmp x86-ansi')
|
|
||||||
exec("mv {} ..".format(setupname))
|
|
||||||
os.chdir('..')
|
|
||||||
|
|
||||||
# Latest addition: better portable app
|
|
||||||
os.chdir('work')
|
|
||||||
|
|
||||||
exec('rm -rf librewolf-{}'.format(version))
|
|
||||||
os.makedirs('librewolf-{}/Profiles/Default'.format(version), exist_ok=True)
|
|
||||||
os.makedirs('librewolf-{}/LibreWolf'.format(version), exist_ok=True)
|
|
||||||
exec('cp -r librewolf/* librewolf-{}/LibreWolf'.format(version))
|
|
||||||
# on gitlab: https://gitlab.com/ltGuillaume
|
|
||||||
exec('"/c/Program Files/Git/bin/git.exe" clone https://github.com/ltGuillaume/LibreWolf-Portable')
|
|
||||||
exec('cp -v LibreWolf-Portable/LibreWolf-Portable.* LibreWolf-Portable/*.exe librewolf-{}/'.format(version))
|
|
||||||
os.chdir('librewolf-{}'.format(version))
|
|
||||||
# installed from: https://www.autohotkey.com/
|
|
||||||
exec('echo \\"c:/Program Files/AutoHotkey/Compiler/Ahk2Exe.exe\\" /in LibreWolf-Portable.ahk /icon LibreWolf-Portable.ico > tmp.bat')
|
|
||||||
exec('cmd /c tmp.bat')
|
|
||||||
exec('rm -f tmp.bat')
|
|
||||||
# let's remove the ahk and icon and embedded executables
|
|
||||||
exec('rm -f LibreWolf-Portable.ahk LibreWolf-Portable.ico dejsonlz4.exe jsonlz4.exe')
|
|
||||||
os.chdir('..')
|
|
||||||
|
|
||||||
# issue #244
|
|
||||||
os.chdir('librewolf-{}/LibreWolf'.format(version))
|
|
||||||
exec('wget -q -O ./vc_redist.x64-extracted.zip "https://gitlab.com/librewolf-community/browser/windows/uploads/7106b776dc663d985bb88eabeb4c5d7d/vc_redist.x64-extracted.zip"')
|
|
||||||
exec('unzip vc_redist.x64-extracted.zip')
|
|
||||||
exec('rm vc_redist.x64-extracted.zip')
|
|
||||||
os.chdir('../..')
|
|
||||||
|
|
||||||
# make final zip
|
|
||||||
pa_zipname = 'librewolf-{}.en-US.win64-portable.zip'.format(full_version)
|
|
||||||
exec("rm -f ../{}".format(pa_zipname))
|
|
||||||
exec("zip -qr9 ../{} librewolf-{}".format(pa_zipname,version))
|
|
||||||
|
|
||||||
os.chdir('..')
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Utility function to upload() function.
|
|
||||||
def do_upload1(filename,token):
|
|
||||||
exec('curl --request POST --header \"PRIVATE-TOKEN: {}\" --form \"file=@{}\" \"https://gitlab.com/api/v4/projects/13852981/uploads\" > tmp.json'.format(token,filename), False)
|
|
||||||
exec('echo $(cat tmp.json | jq .alt | cut -c 2- | sed \'s/.$//\') \'--->\' https://gitlab.com$(cat tmp.json | jq .full_path | cut -c 2- | sed \'s/.$//\') ')
|
|
||||||
exec('cat tmp.json')
|
|
||||||
exec('echo "" && rm -f tmp.json')
|
|
||||||
|
|
||||||
|
|
||||||
# Utility function to upload() function.
|
|
||||||
#
|
|
||||||
#curl --request PUT \
|
|
||||||
# --upload-file whatever.tar.bz2 \
|
|
||||||
# --header "PRIVATE-TOKEN: ${GITLAB_TOKEN}" \
|
|
||||||
# https://gitlab.com/api/v4/projects/${PROJECT_ID}/packages/generic/librewolf/latest/whatever.tar.bz2
|
|
||||||
#
|
|
||||||
def do_upload2(filename,token):
|
|
||||||
project_id='13852981'
|
|
||||||
exec('curl --request PUT --upload-file "{}" --header "PRIVATE-TOKEN: {}" "https://gitlab.com/api/v4/projects/{}/packages/generic/librewolf/latest/{}" > tmp.json'.format(filename, token, project_id, filename), False)
|
|
||||||
exec('echo $(cat tmp.json | jq .alt | cut -c 2- | sed \'s/.$//\') \'--->\' https://gitlab.com$(cat tmp.json | jq .full_path | cut -c 2- | sed \'s/.$//\') ')
|
|
||||||
exec('cat tmp.json')
|
|
||||||
exec('echo "" && rm -f tmp.json')
|
|
||||||
|
|
||||||
|
|
||||||
def upload(token):
|
|
||||||
|
|
||||||
with open('version','r') as file1:
|
|
||||||
version = file1.read().rstrip()
|
|
||||||
with open('release','r') as file2:
|
|
||||||
release = file2.read().rstrip()
|
|
||||||
|
|
||||||
source_release = ''
|
|
||||||
with open('source_release','r') as file3:
|
|
||||||
source_release = file3.read().rstrip()
|
|
||||||
|
|
||||||
if release == '1' :
|
|
||||||
full_version = '{}-{}'.format(version,source_release)
|
|
||||||
else:
|
|
||||||
full_version = '{}-{}'.format(version,source_release,release)
|
|
||||||
|
|
||||||
# Files we need to upload..
|
|
||||||
if False:
|
|
||||||
zip_filename = 'librewolf-{}.en-US.win64.zip'.format(full_version)
|
|
||||||
setup_filename = 'librewolf-{}.en-US.win64-setup.exe'.format(full_version)
|
|
||||||
pazip_filename = 'librewolf-{}.en-US.win64-portable.zip'.format(full_version)
|
|
||||||
if False:
|
|
||||||
exec('sha256sum {} {} {} > sha256sums.txt'.format(setup_filename,zip_filename,pazip_filename))
|
|
||||||
else:
|
|
||||||
exec('sha256sum {} {} > sha256sums.txt'.format(setup_filename,pazip_filename))
|
|
||||||
|
|
||||||
#
|
|
||||||
# create signatures
|
|
||||||
#
|
|
||||||
|
|
||||||
exec('gpg --yes --detach-sign {}'.format(setup_filename))
|
|
||||||
exec('echo "Press Control-D to continue (is this still needed?)..." ; cat > /dev/null')
|
|
||||||
exec('gpg --yes --detach-sign {}'.format(pazip_filename))
|
|
||||||
|
|
||||||
#
|
|
||||||
# upload everything
|
|
||||||
#
|
|
||||||
|
|
||||||
do_upload1('{}.sig'.format(setup_filename),token)
|
|
||||||
do_upload1('{}.sig'.format(pazip_filename),token)
|
|
||||||
do_upload1('sha256sums.txt',token)
|
|
||||||
do_upload2(setup_filename,token)
|
|
||||||
do_upload2(pazip_filename,token)
|
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# parse commandline for commands
|
|
||||||
#
|
|
||||||
|
|
||||||
help_msg = '''
|
|
||||||
Use: ./mk.py <command> ...
|
|
||||||
|
|
||||||
commands:
|
|
||||||
fetch
|
|
||||||
build
|
|
||||||
build-debug
|
|
||||||
artifacts
|
|
||||||
upload <token>
|
|
||||||
|
|
||||||
'''
|
|
||||||
|
|
||||||
done_something = False
|
|
||||||
|
|
||||||
in_upload=False
|
|
||||||
for arg in sys.argv:
|
|
||||||
if in_upload:
|
|
||||||
upload(arg)
|
|
||||||
done_something=True
|
|
||||||
elif arg == 'fetch':
|
|
||||||
fetch()
|
|
||||||
done_something = True
|
|
||||||
elif arg == 'build':
|
|
||||||
build()
|
|
||||||
done_something = True
|
|
||||||
elif arg == 'build-debug':
|
|
||||||
build(True)
|
|
||||||
done_something = True
|
|
||||||
elif arg == 'artifacts':
|
|
||||||
artifacts()
|
|
||||||
done_something = True
|
|
||||||
elif arg == 'full-mar':
|
|
||||||
full_mar()
|
|
||||||
done_something = True
|
|
||||||
elif arg == 'upload':
|
|
||||||
in_upload = True
|
|
||||||
else:
|
|
||||||
if arg == sys.argv[0]:
|
|
||||||
pass
|
|
||||||
else:
|
|
||||||
print(help_msg)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if done_something:
|
|
||||||
sys.exit(0)
|
|
||||||
|
|
||||||
print(help_msg)
|
|
||||||
sys.exit(1)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
1
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
111.0.1
|
|
||||||