diff --git a/build.py b/build.py index 2a0ddfd..742fdf5 100755 --- a/build.py +++ b/build.py @@ -312,62 +312,54 @@ def execute_lw_do_patches(): 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('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') - - if options.src == 'nightly' or options.src == 'gecko-dev': - # this code ultimately does not work, it remains stuck on 'tab-overflow-indicator.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.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/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/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') - 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/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/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/preferences/no-search-results.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/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 + pass # EON (end of nightmare) leave_srcdir() @@ -565,10 +557,14 @@ def execute_all(): execute_lw_artifacts() def execute_clean(): - exec("rm -rf librewolf-{}".format(pkgver)) + exec("rm -rf librewolf-{} librewolf-{}".format(pkgver,nightly_ver)) exec("rm -rf librewolf bootstrap.py tmp.nsi tmp.exe sha256sums.txt upload.txt librewolf-portable.exe") for filename in glob.glob("librewolf-*"): + try: os.remove(filename) + except: + pass + def execute_veryclean(): exec("rm -rf firefox-{}.source.tar.xz mozilla-unified tor-browser gecko-dev".format(pkgver)) diff --git a/librewolf-portable/librewolf-portable.cpp b/librewolf-portable/librewolf-portable.cpp index 57b3db7..8f3c6a9 100644 --- a/librewolf-portable/librewolf-portable.cpp +++ b/librewolf-portable/librewolf-portable.cpp @@ -25,7 +25,12 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, _In_ LPWSTR lpCmdLine, _In_ int nCmdShow) { - wchar_t path[_MAX_PATH + 1], dir[_MAX_PATH+1], exe[_MAX_PATH+1], cmdline[_MAX_PATH+1]; + //https://docs.microsoft.com/en-us/windows/win32/fileio/maximum-file-path-limitation?tabs=cmd + //constexpr int max_path = _MAX_PATH+1; + constexpr int max_path = 32767+1; + static wchar_t path[max_path], dir[max_path], exe[max_path], cmdline[max_path]; + + GetModuleFileName(NULL, path, _MAX_PATH); *wcsrchr(path,L'\\') = L'\0';