From aaeb9c6c9a021b110d1cd009ab9581a369b3471c Mon Sep 17 00:00:00 2001 From: Dan Stillman Date: Tue, 4 Aug 2026 13:28:55 -0400 Subject: [PATCH] fx153: Don't bundle unused Firefox runtime files Skip crashhelper (all platforms -- the crash reporter is disabled) and desktop-launcher and nmhproxy.exe (Windows). Also skip dxcompiler.dll (Windows, 22 MB), which is loaded only by WebGPU, now also disabled via pref. Nothing renders with WebGPU, and local ML -- including any future plugin API -- should go through Firefox's inference libraries (mozinference/onnxruntime), which are compiled CPU-only. --- app/assets/prefs.js | 3 +++ app/build.sh | 6 +++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/app/assets/prefs.js b/app/assets/prefs.js index 72fc9c0cf2..1feb01288c 100644 --- a/app/assets/prefs.js +++ b/app/assets/prefs.js @@ -96,6 +96,9 @@ pref("datareporting.policy.dataSubmissionEnabled", false); pref("toolkit.crashreporter.enabled", false); pref("extensions.remoteSettings.disabled", true); +// Disable WebGPU -- nothing uses it, and it lets us skip bundling dxcompiler.dll on Windows +pref("dom.webgpu.enabled", false); + pref("extensions.update.url", ""); // Don't try to load the "Get Add-ons" tab on first load of Add-ons window diff --git a/app/build.sh b/app/build.sh index ac648432f7..6a863269a2 100755 --- a/app/build.sh +++ b/app/build.sh @@ -676,7 +676,7 @@ if [ $BUILD_MAC == 1 ]; then # Merge relevant assets from Firefox mkdir "$CONTENTSDIR/MacOS" - cp -r "$MAC_RUNTIME_PATH/Contents/MacOS/"!(firefox|firefox-bin|crashreporter.app|minidump-analyzer|nmhproxy|pingsender|updater.app) "$CONTENTSDIR/MacOS" + cp -r "$MAC_RUNTIME_PATH/Contents/MacOS/"!(firefox|firefox-bin|crashhelper|crashreporter.app|minidump-analyzer|nmhproxy|pingsender|updater.app) "$CONTENTSDIR/MacOS" cp -r "$MAC_RUNTIME_PATH/Contents/Resources/"!(application.ini|Assets.car|browser|defaults|precomplete|removed-files|updater.ini|update-settings.ini|webapprt*|*.icns|*.lproj) "$CONTENTSDIR/Resources" # Add our custom ChannelPrefs.framework and change channel if not a source build @@ -944,7 +944,7 @@ if [ $BUILD_WIN == 1 ]; then # # 'i686' is a huge directory containing x86 versions of xul.dll and other files in # Firefox ARM64 builds for use with the EME DRM plugins - cp -R "$runtime_path"/!(application.ini|browser|crashreporter*|default-browser-agent.exe|defaultagent*|defaults|devtools-files|firefox*|i686|maintenanceservice*|minidump-analyzer.exe|pingsender.exe|private_browsing*|precomplete|removed-files|uninstall|update*) "$APPDIR" + cp -R "$runtime_path"/!(application.ini|browser|crashhelper.exe|crashreporter*|default-browser-agent.exe|defaultagent*|defaults|desktop-launcher|devtools-files|dxcompiler.dll|firefox*|i686|maintenanceservice*|minidump-analyzer.exe|nmhproxy.exe|pingsender.exe|private_browsing*|precomplete|removed-files|uninstall|update*) "$APPDIR" # Copy zotero.exe, which is built directly from Firefox source and then modified by # ResourceHacker to add icons @@ -1129,7 +1129,7 @@ if [ $BUILD_LINUX == 1 ]; then mkdir "$APPDIR" # Merge relevant assets from Firefox - cp -r "$runtime_path/"!(application.ini|browser|defaults|devtools-files|crashreporter|crashreporter.ini|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR" + cp -r "$runtime_path/"!(application.ini|browser|crashhelper|crashreporter|crashreporter.ini|defaults|devtools-files|firefox|pingsender|precomplete|removed-files|run-mozilla.sh|update-settings.ini|updater|updater.ini) "$APPDIR" # Use our own launcher that calls the original Firefox executable with -app mv "$APPDIR"/firefox-bin "$APPDIR"/zotero-bin