tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit ec21a4153356f40d8b64512cc570db50827174ba
parent 522b8aec56e35ba1cbb7d0b6904ecf4f4be1d54a
Author: Ryan VanderMeulen <rvandermeulen@mozilla.com>
Date:   Tue, 14 Oct 2025 22:50:48 +0000

Bug 1994090 - Remove unused GetInstallerRegistryPref NSIS installer macro. r=browser-installer-reviewers,nrishel

Usage was removed in bug 1771951.

Differential Revision: https://phabricator.services.mozilla.com/D268476

Diffstat:
Mbrowser/installer/windows/nsis/installer.nsi | 5-----
Mbrowser/installer/windows/nsis/uninstaller.nsi | 5-----
Mtoolkit/mozapps/installer/windows/nsis/common.nsh | 87-------------------------------------------------------------------------------
3 files changed, 0 insertions(+), 97 deletions(-)

diff --git a/browser/installer/windows/nsis/installer.nsi b/browser/installer/windows/nsis/installer.nsi @@ -139,11 +139,6 @@ VIAddVersionKey "OriginalFilename" "setup.exe" !insertmacro WriteRegStr2 !insertmacro WriteRegDWORD2 -; This needs to be inserted after InitHashAppModelId because it uses -; $AppUserModelID and the compiler can't handle using variables lexically before -; they've been declared. -!insertmacro GetInstallerRegistryPref - !include shared.nsh ; Helper macros for ui callbacks. Insert these after shared.nsh diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi @@ -109,11 +109,6 @@ VIAddVersionKey "OriginalFilename" "helper.exe" !insertmacro WriteRegDWORD2 !insertmacro WriteRegStr2 -; This needs to be inserted after InitHashAppModelId because it uses -; $AppUserModelID and the compiler can't handle using variables lexically before -; they've been declared. -!insertmacro GetInstallerRegistryPref - !insertmacro un.ChangeMUIHeaderImage !insertmacro un.ChangeMUISidebarImage !insertmacro un.CheckForFilesInUse diff --git a/toolkit/mozapps/installer/windows/nsis/common.nsh b/toolkit/mozapps/installer/windows/nsis/common.nsh @@ -1200,93 +1200,6 @@ !verbose pop !macroend -/** - * Read the value of an installer pref that's been set by the product. - * - * @param _KEY ($R1) - * Sub key containing all the installer prefs - * Usually "Software\Mozilla\${AppName}" - * @param _PREF ($R2) - * Name of the pref to look up - * @return _RESULT ($R3) - * 'true' or 'false' (only boolean prefs are supported) - * If no value exists for the requested pref, the result is 'false' - */ -!macro GetInstallerRegistryPref - !ifndef ${_MOZFUNC_UN}GetInstallerRegistryPref - !verbose push - !verbose ${_MOZFUNC_VERBOSE} - !define ${_MOZFUNC_UN}GetInstallerRegistryPref "!insertmacro GetInstallerRegistryPrefCall" - - Function ${_MOZFUNC_UN}GetInstallerRegistryPref - ; stack: key, pref - Exch $R1 ; key, stack: old R1, pref - Exch 1 ; stack: pref, old R1 - Exch $R2 ; pref, stack: old R2, old R1 - Push $R3 - - StrCpy $R3 0 - - ; These prefs are always stored in the native registry. - SetRegView 64 - - ClearErrors - ReadRegDWORD $R3 HKCU "$R1\Installer\$AppUserModelID" "$R2" - - SetRegView lastused - - ${IfNot} ${Errors} - ${AndIf} $R3 != 0 - StrCpy $R1 "true" - ${Else} - StrCpy $R1 "false" - ${EndIf} - - ; stack: old R3, old R2, old R1 - Pop $R3 ; stack: old R2, old R1 - Pop $R2 ; stack: old R1 - Exch $R1 ; stack: result - FunctionEnd - - !verbose pop - !endif -!macroend - -!macro GetInstallerRegistryPrefCall _KEY _PREF _RESULT - !verbose push - !verbose ${_MOZFUNC_VERBOSE} - Push "${_PREF}" - Push "${_KEY}" - Call GetInstallerRegistryPref - Pop ${_RESULT} - !verbose pop -!macroend - -!macro un.GetInstallerRegistryPrefCall _KEY _PREF _RESULT - !verbose push - !verbose ${_MOZFUNC_VERBOSE} - Push "${_PREF}" - Push "${_KEY}" - Call un.GetInstallerRegistryPref - Pop ${_RESULT} - !verbose pop -!macroend - -!macro un.GetInstallerRegistryPref - !ifndef un.GetInstallerRegistryPref - !verbose push - !verbose ${_MOZFUNC_VERBOSE} - !undef _MOZFUNC_UN - !define _MOZFUNC_UN "un." - - !insertmacro GetInstallerRegistryPref - - !undef _MOZFUNC_UN - !define _MOZFUNC_UN - !verbose pop - !endif -!macroend - ################################################################################ # Macros for adding file and protocol handlers