From 7c3ff63c31df9f1d0f08d0238ee73c1d12505fe1 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Fri, 14 Jan 2022 10:59:27 +0100 Subject: [PATCH 1/3] bugfixes --- assets/mozconfig.windows | 3 +-- mk.py | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/assets/mozconfig.windows b/assets/mozconfig.windows index 8e0ccc6..1abe6c7 100644 --- a/assets/mozconfig.windows +++ b/assets/mozconfig.windows @@ -11,9 +11,8 @@ 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-app-name=librewolf ac_add_options --with-branding=browser/branding/librewolf -#ac_add_options --with-distribution-id=io.gitlab.librewolf-community ac_add_options --with-unsigned-addon-scopes=app,system diff --git a/mk.py b/mk.py index 6eec0ed..0c4a95d 100755 --- a/mk.py +++ b/mk.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -import os,sys,subprocess +import os,sys,subprocess,os.path # native()/bash()/exec() utility functions def native(cmd,do_print=True): @@ -27,7 +27,7 @@ def bash(cmd,do_print=True): def exec(cmd,do_print=True): _native = False - if not os.path.isFile('c:/mozilla-build/msys/bin/bash.exe'): + if not os.path.isfile('c:/mozilla-build/msys/bin/bash.exe'): _native = True if _native: return native(cmd,do_print) From 93c4a2a4c6e64ef8a035011ff25fb8bd9b5b5079 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Fri, 14 Jan 2022 15:18:21 +0100 Subject: [PATCH 2/3] added _with_app_name to mk.py and added cairo-windows as drawing toolkit, also added .pdf as a file association in the nsis setup file --- assets/mozconfig.windows | 7 +++++-- assets/setup.nsi | 5 +++-- mk.py | 10 ++++++++-- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/assets/mozconfig.windows b/assets/mozconfig.windows index 1abe6c7..2312bb5 100644 --- a/assets/mozconfig.windows +++ b/assets/mozconfig.windows @@ -17,10 +17,10 @@ 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_REQUIRE_SIGNING= mk_add_options MOZ_SERVICES_HEALTHREPORT=0 mk_add_options MOZ_TELEMETRY_REPORTING=0 @@ -32,3 +32,6 @@ mk_add_options MOZ_TELEMETRY_REPORTING=0 ac_add_options --disable-updater ac_add_options --disable-maintenance-service +ac_add_options --enable-strip + +ac_add_options --enable-default-toolkit=cairo-windows diff --git a/assets/setup.nsi b/assets/setup.nsi index 36ac22f..3448471 100644 --- a/assets/setup.nsi +++ b/assets/setup.nsi @@ -65,6 +65,7 @@ Section "${PROGNAME}" 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" @@ -79,8 +80,8 @@ Section "${PROGNAME}" WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "AppUserModelId" "LibreWolf" WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationIcon" "$INSTDIR\librewolf.exe,0" WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationName" "LibreWolf" - WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationDescription" "Howling to Freedom" - WriteRegStr HKLM "Software\Classes\LibreWolfHTM\Application" "ApplicationCompany" "LibreWolf" + WriteRegStr HKLM "Software\Classes\LibreWolfHTM\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 %1" diff --git a/mk.py b/mk.py index 0c4a95d..f2d9b66 100755 --- a/mk.py +++ b/mk.py @@ -82,17 +82,23 @@ def build(): def artifacts(): + + _with_app_name = True # Trying to fix issue #146 -> https://gitlab.com/librewolf-community/browser/windows/-/issues/146 with open('version','r') as file1: version = file1.read().rstrip() buildzip_filename = 'firefox-{}.en-US.win64.zip'.format(version) + if _with_app_name: + buildzip_filename = 'librewolf-{}.en-US.win64.zip'.format(version) exec('cp -v librewolf-{}/obj-x86_64-pc-mingw32/dist/{} .'.format(version,buildzip_filename)) exec('rm -rf work && mkdir work') os.chdir('work') exec('unzip ../{}'.format(buildzip_filename)) - exec('mv firefox librewolf') + if not _with_app_name: + exec('mv firefox librewolf') os.chdir('librewolf') - exec('mv firefox.exe librewolf.exe') + if not _with_app_name: + exec('mv firefox.exe librewolf.exe') os.chdir('..') os.chdir('..') From cd7107a05e4ea325a9a5d6092beb227f2ebb6b75 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Fri, 14 Jan 2022 15:22:22 +0100 Subject: [PATCH 3/3] fix to actually remove librewolf distfiles --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6e31a0f..543ef19 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,7 @@ all : fetch build artifacts clean : rm -rf work - rm -f librewolf-$(shell cat version).*.en-US.win64* md5sums.txt upload.txt firefox-$(shell cat version).en-US.win64.zip + rm -f librewolf-$(shell cat version)*.en-US.win64* md5sums.txt upload.txt firefox-$(shell cat version).en-US.win64.zip veryclean : clean rm -rf librewolf-$(shell cat version)