diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /browser/installer | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'browser/installer')
-rw-r--r-- | browser/installer/package-manifest.in | 13 | ||||
-rw-r--r-- | browser/installer/windows/docs/InstallerBuild.rst | 4 | ||||
-rw-r--r-- | browser/installer/windows/docs/MSIX.rst | 21 | ||||
-rw-r--r-- | browser/installer/windows/msix/AppxManifest.xml.in | 8 | ||||
-rwxr-xr-x | browser/installer/windows/nsis/installer.nsi | 19 | ||||
-rwxr-xr-x | browser/installer/windows/nsis/shared.nsh | 47 | ||||
-rwxr-xr-x | browser/installer/windows/nsis/uninstaller.nsi | 57 |
7 files changed, 100 insertions, 69 deletions
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in index 718f6483c7..1b87a9ab4a 100644 --- a/browser/installer/package-manifest.in +++ b/browser/installer/package-manifest.in @@ -60,10 +60,7 @@ @RESPATH@/update.locale @RESPATH@/updater.ini #endif -#ifdef MOZ_DEFAULT_BROWSER_AGENT -@RESPATH@/defaultagent.ini -#endif -#if defined(MOZ_UPDATE_AGENT) || defined(MOZ_DEFAULT_BROWSER_AGENT) +#if defined(MOZ_UPDATE_AGENT) @RESPATH@/locale.ini #endif @@ -152,10 +149,8 @@ #endif @BINPATH@/@DLL_PREFIX@lgpllibs@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@gkcodecs@DLL_SUFFIX@ -#ifdef MOZ_FFVPX @BINPATH@/@DLL_PREFIX@mozavutil@DLL_SUFFIX@ @BINPATH@/@DLL_PREFIX@mozavcodec@DLL_SUFFIX@ -#endif ; [Components] #ifdef ACCESSIBILITY @@ -409,6 +404,12 @@ bin/libfreebl_64int_3.so ; @BINPATH@/pingsender@BIN_SUFFIX@ +; [ Native Messaging Host Proxy ] +; +#if defined(XP_WIN) || defined(XP_MACOSX) +@BINPATH@/nmhproxy@BIN_SUFFIX@ +#endif + ; [ Notification COM Server ] ; #if defined(MOZ_NOTIFICATION_SERVER) diff --git a/browser/installer/windows/docs/InstallerBuild.rst b/browser/installer/windows/docs/InstallerBuild.rst index a98e819d8c..0473bb3f1d 100644 --- a/browser/installer/windows/docs/InstallerBuild.rst +++ b/browser/installer/windows/docs/InstallerBuild.rst @@ -34,9 +34,7 @@ Build process .. note:: If you intend to distribute your build to others, you'll want to add - ``export WIN32_REDIST_DIR=<CRT_LOCATION>`` in your ``mozconfig``. The CRT location - will vary depending on your Visual Studio version. At the time of writing, this would look like: - ``export WIN32_REDIST_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Redist/MSVC/14.28.29325/x86/Microsoft.VC142.CRT"``. + ``ac_add_options --with-redist`` in your ``mozconfig``. Both the full and stub installers are built through a similar process, which is summarized here along with references to the relevant bits of code. diff --git a/browser/installer/windows/docs/MSIX.rst b/browser/installer/windows/docs/MSIX.rst index 771ea6c061..8d98135ce8 100644 --- a/browser/installer/windows/docs/MSIX.rst +++ b/browser/installer/windows/docs/MSIX.rst @@ -145,6 +145,27 @@ Linux users can obtain a prebuilt version with: After `bug 1743036 <https://bugzilla.mozilla.org/show_bug.cgi?id=1743036>`__ is fixed, macOS and Windows users will have a similar option. +Avoiding signing locally with unsigned packages +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Windows 11 allows to install unsigned packages, provided that its AppX +manifest includes a special OID (organization ID) value in its +``Identity`` element. See +https://github.com/MicrosoftDocs/msix-docs/blob/769dee9364df2b6fd0b78000774f8d14de8fe814/msix-src/package/unsigned-package.md. +To produce a suitable package, use the ``--unsigned`` command line +switch, like: + +:: + + $ ./mach repackage msix --unsigned + +Note that unsigned packages **must** be installed by an administrator. +Generally, run Powershell as an administrator and then use commands like + +:: + + $ Add-AppxPackage -Path ... -AllowUnsigned -ForceUpdateFromAnyVersion + Signing locally ~~~~~~~~~~~~~~~ diff --git a/browser/installer/windows/msix/AppxManifest.xml.in b/browser/installer/windows/msix/AppxManifest.xml.in index 0f591fe43e..f1c3b6b721 100644 --- a/browser/installer/windows/msix/AppxManifest.xml.in +++ b/browser/installer/windows/msix/AppxManifest.xml.in @@ -92,14 +92,14 @@ </uap3:Protocol> </uap3:Extension> <uap3:Extension Category="windows.protocol"> - <uap3:Protocol Name="firefox" Parameters="-osint -url "%1""> - <uap:DisplayName>Firefox Protocol</uap:DisplayName> + <uap3:Protocol Name="firefox-bridge" Parameters="-osint -url "%1""> + <uap:DisplayName>Firefox Bridge Protocol</uap:DisplayName> <uap:Logo>Assets\Document44x44.png</uap:Logo> </uap3:Protocol> </uap3:Extension> <uap3:Extension Category="windows.protocol"> - <uap3:Protocol Name="firefox-private" Parameters="-osint -private-window "%1""> - <uap:DisplayName>Firefox Private Browsing Protocol</uap:DisplayName> + <uap3:Protocol Name="firefox-private-bridge" Parameters="-osint -private-window "%1""> + <uap:DisplayName>Firefox Private Bridge Protocol</uap:DisplayName> <uap:Logo>Assets\Document44x44.png</uap:Logo> </uap3:Protocol> </uap3:Extension> diff --git a/browser/installer/windows/nsis/installer.nsi b/browser/installer/windows/nsis/installer.nsi index 7ec5f9fe6f..c282067697 100755 --- a/browser/installer/windows/nsis/installer.nsi +++ b/browser/installer/windows/nsis/installer.nsi @@ -474,22 +474,22 @@ Section "-Application" APP_IDX ${AddDisabledDDEHandlerValues} "FirefoxURL-$AppUserModelID" "$2" "$8,${IDI_DOCUMENT_ZERO_BASED}" \ "${AppRegName} URL" "true" - ; Create protocol registry keys for dual browser extensions - only if not already set + ; Create protocol registry keys for FirefoxBridge extensions - only if not already set SetShellVarContext current ; Set SHCTX to HKCU - !define FIREFOX_PROTOCOL "firefox" + !define FIREFOX_PROTOCOL "firefox-bridge" ClearErrors ReadRegStr $0 SHCTX "Software\Classes\${FIREFOX_PROTOCOL}" "" ${If} $0 == "" ${AddDisabledDDEHandlerValues} "${FIREFOX_PROTOCOL}" "$2" "$8,${IDI_APPICON_ZERO_BASED}" \ - "Firefox Browsing Protocol" "true" + "Firefox Bridge Protocol" "true" ${EndIf} - !define FIREFOX_PRIVATE_PROTOCOL "firefox-private" + !define FIREFOX_PRIVATE_PROTOCOL "firefox-private-bridge" ClearErrors ReadRegStr $0 SHCTX "Software\Classes\${FIREFOX_PRIVATE_PROTOCOL}" "" ${If} $0 == "" ${AddDisabledDDEHandlerValues} "${FIREFOX_PRIVATE_PROTOCOL}" "$\"$8$\" -osint -private-window $\"%1$\"" \ - "$8,${IDI_PBICON_PB_EXE_ZERO_BASED}" "Firefox Private Browsing Protocol" "true" + "$8,${IDI_PBICON_PB_EXE_ZERO_BASED}" "Firefox Private Bridge Protocol" "true" ${EndIf} SetShellVarContext all ; Set SHCTX to HKLM @@ -794,6 +794,15 @@ Section "-InstallEndCleanup" ; Refresh desktop icons ${RefreshShellIcons} + ; Remove old unsupported firefox and firefox-private extension protocol + ; handlers which were added in FX122 for the dual browser extension, since + ; renamed to FirefoxBridge + Push $1 + ${GetLongPath} "$INSTDIR\${FileMainEXE}" $1 + ${DeleteProtocolRegistryIfSetToInstallation} "$1" "firefox" + ${DeleteProtocolRegistryIfSetToInstallation} "$1" "firefox-private" + Pop $1 + ${InstallEndCleanupCommon} ${If} $PreventRebootRequired == "true" diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh index f0caece663..ccad601abe 100755 --- a/browser/installer/windows/nsis/shared.nsh +++ b/browser/installer/windows/nsis/shared.nsh @@ -1577,6 +1577,7 @@ ${RemoveDefaultBrowserAgentShortcut} Push "crashreporter.exe" Push "default-browser-agent.exe" Push "minidump-analyzer.exe" + Push "nmhproxy.exe" Push "pingsender.exe" Push "updater.exe" Push "mozwer.dll" @@ -1824,3 +1825,49 @@ FunctionEnd ${WriteRegStr2} ${RegKey} "Software\Classes\CLSID\$0\InProcServer32" "" "$INSTDIR\notificationserver.dll" 0 !macroend !define WriteToastNotificationRegistration "!insertmacro WriteToastNotificationRegistration" + +/** + * Deletes the registry keys for a protocol handler but only if those registry + * keys were pointed to the installation being uninstalled. + * Does this with both the HKLM and the HKCU registry entries. + * + * @param _PROTOCOL + * The protocol to delete the registry keys for + */ +!macro DeleteProtocolRegistryIfSetToInstallation INSTALL_PATH _PROTOCOL + Push $0 + + ; Check if there is a protocol handler registered by fetching the DefaultIcon value + ; in the registry. + ; If there is something registered for the icon, it will be the path to the executable, + ; plus a comma and a number for the id of the resource for the icon. + ; Use StrCpy with -2 to remove the comma and the resource id so that + ; the whole path to the executable can be compared against what's being + ; uninstalled. + + ; Do all of that twice, once for the local machine and once for the current user + + ; Remove protocol handlers + ClearErrors + ReadRegStr $0 HKLM "Software\Classes\${_PROTOCOL}\DefaultIcon" "" + ${If} $0 != "" + StrCpy $0 $0 -2 + ${If} $0 == '"${INSTALL_PATH}"' + DeleteRegKey HKLM "Software\Classes\${_PROTOCOL}" + ${EndIf} + ${EndIf} + + ClearErrors + ReadRegStr $0 HKCU "Software\Classes\${_PROTOCOL}\DefaultIcon" "" + ${If} $0 != "" + StrCpy $0 $0 -2 + ${If} $0 == '"${INSTALL_PATH}"' + DeleteRegKey HKCU "Software\Classes\${_PROTOCOL}" + ${EndIf} + ${EndIf} + + ClearErrors + + Pop $0 +!macroend +!define DeleteProtocolRegistryIfSetToInstallation '!insertmacro DeleteProtocolRegistryIfSetToInstallation' diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi index 695beed25f..31bd992047 100755 --- a/browser/installer/windows/nsis/uninstaller.nsi +++ b/browser/installer/windows/nsis/uninstaller.nsi @@ -411,54 +411,6 @@ SectionEnd ################################################################################ # Uninstall Sections -/** - * Deletes the registry keys for a protocol handler but only if those registry - * keys were pointed to the installation being uninstalled. - * Does this with both the HKLM and the HKCU registry entries. - * - * @param _PROTOCOL - * The protocol to delete the registry keys for - */ -!macro DeleteProtocolRegistryIfSetToInstallation _PROTOCOL - Push $0 - Push $1 - ; Check if there is a protocol handler registered by fetching the DefaultIcon value - ; in the registry. - ; If there is something registered for the icon, it will be the path to the executable, - ; plus a comma and a number for the id of the resource for the icon. - ; Use StrCpy with -2 to remove the comma and the resource id so that - ; the whole path to the executable can be compared against what's being - ; uninstalled. - - ; Do all of that twice, once for the local machine and once for the current user - - ; Remove protocol handlers - ClearErrors - ${un.GetLongPath} "$INSTDIR\${FileMainEXE}" $1 - ReadRegStr $0 HKLM "Software\Classes\${_PROTOCOL}\DefaultIcon" "" - ${If} $0 != "" - StrCpy $0 $0 -2 - ${If} $0 == $1 - DeleteRegKey HKLM "Software\Classes\${_PROTOCOL}" - ${EndIf} - ${EndIf} - - ClearErrors - ReadRegStr $0 HKCU "Software\Classes\${_PROTOCOL}\DefaultIcon" "" - ${If} $0 != "" - StrCpy $0 $0 -2 - ${If} $0 == $1 - DeleteRegKey HKCU "Software\Classes\${_PROTOCOL}" - ${EndIf} - ${EndIf} - - ClearErrors - - Pop $0 - Pop $1 -!macroend -!define DeleteProtocolRegistryIfSetToInstallation '!insertmacro DeleteProtocolRegistryIfSetToInstallation' - Section "Uninstall" SetDetailsPrint textonly DetailPrint $(STATUS_UNINSTALL_MAIN) @@ -571,9 +523,12 @@ Section "Uninstall" ; Clean up "launch on login" registry key for this installation. DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Run" "Mozilla-${AppName}-$AppUserModelID" - ; Remove dual browser extension protocol handlers - ${DeleteProtocolRegistryIfSetToInstallation} "firefox" - ${DeleteProtocolRegistryIfSetToInstallation} "firefox-private" + ; Remove FirefoxBridge extension protocol handlers + Push $1 + ${un.GetLongPath} "$INSTDIR\${FileMainEXE}" $1 + ${DeleteProtocolRegistryIfSetToInstallation} "$1" "firefox-bridge" + ${DeleteProtocolRegistryIfSetToInstallation} "$1" "firefox-private-bridge" + Pop $1 ; Remove old protocol handler and StartMenuInternet keys without install path ; hashes, but only if they're for this installation. We've never supported |