added linux and linux-mar folders

This commit is contained in:
Bert van der Weerd 2022-09-25 17:04:14 +02:00
parent 7d48baebb8
commit 61a6317a5f
No known key found for this signature in database
GPG key ID: 73370A0B9E5516B0
15 changed files with 616 additions and 0 deletions

89
linux-mar/Makefile Normal file
View file

@ -0,0 +1,89 @@
.PHONY : help 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 " 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 ""
all : build package artifacts
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
build : dir
(cd librewolf-$(full_version) && ./mach build)
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 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
setup-fedora :
dnf -y install python3 curl wget zstd python3-devel python3-pip mercurial msitools p7zip upx openssl-devel
#
# Build the artifacts in a seperate Makefile
#
librewolf-$(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 : librewolf-$(full_version).en-US.win64.zip
${MAKE} -f assets/artifacts.mk artifacts

View file

@ -0,0 +1,11 @@
.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.zip
artifacts :

BIN
linux-mar/assets/banner.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View file

@ -0,0 +1,20 @@
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",

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,71 @@
# 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
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/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)/browser/locales/l10n

View file

@ -0,0 +1,13 @@
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

89
linux/Makefile Normal file
View file

@ -0,0 +1,89 @@
.PHONY : help 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 " 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 ""
all : build package artifacts
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
build : dir
(cd librewolf-$(full_version) && ./mach build)
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 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
setup-fedora :
dnf -y install python3 curl wget zstd python3-devel python3-pip mercurial msitools p7zip upx openssl-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

43
linux/assets/artifacts.mk Normal file
View file

@ -0,0 +1,43 @@
.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=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
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
( cd work && git clone "https://github.com/ltGuillaume/LibreWolf-Portable" )
cp work/LibreWolf-Portable/LibreWolf-Portable.* work/LibreWolf-Portable/*.exe 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 )
( cd work/librewolf-$(full_version) && wine64 ../ahk/Compiler/Ahk2Exe.exe /in LibreWolf-Portable.ahk /icon LibreWolf-Portable.ico )
( cd work/librewolf-$(full_version) && rm -f LibreWolf-Portable.ahk LibreWolf-Portable.ico dejsonlz4.exe jsonlz4.exe )
rm -f $(zipname)
( cd work && zip -qr9 ../$(zipname) librewolf-$(full_version) )

BIN
linux/assets/banner.bmp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

View file

@ -0,0 +1,20 @@
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",

BIN
linux/assets/librewolf.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

71
linux/assets/mozconfig Normal file
View file

@ -0,0 +1,71 @@
# 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
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)/browser/locales/l10n

176
linux/assets/setup.nsi Normal file
View file

@ -0,0 +1,176 @@
!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

View file

@ -0,0 +1,13 @@
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