From 576230272b142a17e482c6f4209dbdad2f3abdac Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Sat, 28 Aug 2021 12:16:05 +0200 Subject: [PATCH] Much improved handling of the settings UI repository --- build.py | 74 +- patches/librewolf-pref-pane.patch | 1159 +++++++++++++++++++++++++++++ 2 files changed, 1175 insertions(+), 58 deletions(-) create mode 100644 patches/librewolf-pref-pane.patch diff --git a/build.py b/build.py index 47b13ae..a58c5a2 100755 --- a/build.py +++ b/build.py @@ -309,58 +309,14 @@ def execute_lw_do_patches(): # insert the settings pane source (experimental) if options.settings_pane: + exec('rm -rf librewolf-pref-pane') exec('git clone https://gitlab.com/ohfp/librewolf-pref-pane.git') - exec('cp -vrf librewolf-pref-pane/browser/* browser') - - # this code ultimately does not work, it remains stuck on 'tab-overflow-indicator.svg' - - exec('touch browser/themes/shared/newInstall.css') - exec('touch browser/themes/shared/newInstallPage.css') - exec('cp browser/themes/shared/icons/pin-12.svg browser/themes/shared/icons/pin-tab.svg') - exec('cp browser/themes/shared/icons/stop-to-reload.svg browser/themes/shared/icons/stop.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/unpin-tab.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/fingerprinters.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/tracker-image.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/tracker-image-disabled.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/customizableui/menu-arrow.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/illustrations/blue-berror.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/illustrations/error-connection-failure.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/illustrations/error-server-not-found.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/illustrations/error-session-restore.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/canvas-blocked.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/canvas.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/indexedDB.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/popup-subitem.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/update.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/webauthn.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/block-cryptominer.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/block-social.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/notification-icons/block-fingerprinter.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/back-12.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/3rdpartycookies-disabled.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/cryptominers-disabled.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/fingerprinters-disabled.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/controlcenter/socialblock-disabled.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/preferences/no-search-results.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/restore-session.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/quit.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/reload.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/send-to-device.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/sign-out.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/tab-12.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/icons/zoom-in.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/tabbrowser/indicator-tab-attention.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/tabbrowser/tab-audio-blocked.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/tabbrowser/tab-overflow-indicator.png') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/update-circle-fill-12.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/incontent-icons/welcome-back.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/places/folder.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/places/history.svg') - exec('cp browser/themes/shared/icons/stop.svg browser/themes/shared/warning.svg') - - pass # EON (end of nightmare) - + os.chdir('librewolf-pref-pane') + exec('git diff 1fee314adc81000294fc0cf3196a758e4b64dace > ../../patches/librewolf-pref-pane.patch') + os.chdir('..') + patch('../patches/librewolf-pref-pane.patch') + leave_srcdir() @@ -405,11 +361,11 @@ def execute_lw_artifacts(): elif options.distro == 'deb': exe = "" ospkg = "deb" - dirname = "{}/dist/firefox".format(get_objdir()) + dirname = "{}/dist/librewolf".format(get_objdir()) elif options.distro == 'rpm': exe = "" ospkg = "rpm" - dirname = "{}/dist/firefox".format(get_objdir()) + dirname = "{}/dist/librewolf".format(get_objdir()) elif options.distro == 'osx': #exe = "" #ospkg = "osx" @@ -425,14 +381,16 @@ def execute_lw_artifacts(): librewolfdir = "librewolf" if options.distro == 'osx': librewolfdir = 'librewolf/Librewolf.app' - exec("mv firefox librewolf") + if options.distro == 'win': + exec("mv firefox librewolf") if options.distro != 'osx': + if options.distro == 'win': exec("mv -v {}/firefox{} {}/librewolf{}".format(librewolfdir,exe,librewolfdir,exe)); - exec("rm -rf {}/maintainanceservice* {}/pingsender* {}/firefox.*.xml {}/precomplete {}/removed-files {}/uninstall" - .format(librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir)) - exec("cp -v common/source_files/browser/branding/librewolf/firefox.ico {}/librewolf.ico".format(librewolfdir)) - if options.distro != 'win': - exec("cp -v files/register-librewolf files/start-librewolf files/start-librewolf.desktop.in librewolf") + exec("rm -rf {}/maintainanceservice* {}/pingsender* {}/firefox.*.xml {}/precomplete {}/removed-files {}/uninstall" + .format(librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir,librewolfdir)) + exec("cp -v common/source_files/browser/branding/librewolf/firefox.ico {}/librewolf.ico".format(librewolfdir)) + if options.distro != 'win': + exec("cp -v files/register-librewolf files/start-librewolf files/start-librewolf.desktop.in librewolf") # create zip filename if options.src == 'release': diff --git a/patches/librewolf-pref-pane.patch b/patches/librewolf-pref-pane.patch new file mode 100644 index 0000000..0864078 --- /dev/null +++ b/patches/librewolf-pref-pane.patch @@ -0,0 +1,1159 @@ +diff --git a/browser/components/preferences/jar.mn b/browser/components/preferences/jar.mn +index 4f3babe..97c7ec2 100644 +--- a/browser/components/preferences/jar.mn ++++ b/browser/components/preferences/jar.mn +@@ -11,6 +11,7 @@ browser.jar: + content/browser/preferences/home.js + content/browser/preferences/search.js + content/browser/preferences/privacy.js ++ content/browser/preferences/librewolf.js + content/browser/preferences/containers.js + content/browser/preferences/sync.js + content/browser/preferences/experimental.js +diff --git a/browser/components/preferences/librewolf.inc.xhtml b/browser/components/preferences/librewolf.inc.xhtml +new file mode 100644 +index 0000000..0b5e930 +--- /dev/null ++++ b/browser/components/preferences/librewolf.inc.xhtml +@@ -0,0 +1,388 @@ ++# 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/. ++ ++