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] 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('..')