Bug 1898366 - Set ${UpdateChannel} variable in NSIS installer and set registry values correctly. r=Paenglab

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

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Rob Lemley 2024-05-23 16:16:43 +00:00
Родитель 3874d17f00
Коммит db6dd61c19
2 изменённых файлов: 26 добавлений и 0 удалений

Просмотреть файл

@ -27,6 +27,12 @@
!define BrandFullName "${BrandFullNameInternal}"
!endif
!if "@MOZ_UPDATE_CHANNEL@" == ""
!define UpdateChannel "Unknown"
!else
!define UpdateChannel "@MOZ_UPDATE_CHANNEL@"
!endif
!if "@MOZ_UPDATE_CHANNEL@" == "beta"
# NO_INSTDIR_FROM_REG is defined for Beta to prevent finding a non-default
# installation directory in the registry and using that as the default. This

Просмотреть файл

@ -679,6 +679,16 @@
; Add Software\Mozilla\ registry entries (uses SHCTX).
!macro SetAppKeys
; Check if this is an ESR release and if so add registry values so it is
; possible to determine that this is an ESR install (bug 726781).
ClearErrors
${WordFind} "${UpdateChannel}" "esr" "E#" $3
${If} ${Errors}
StrCpy $3 ""
${Else}
StrCpy $3 " ESR"
${EndIf}
${GetLongPath} "$INSTDIR" $8
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Main"
${WriteRegStr2} $TmpVal "$0" "Install Directory" "$8" 0
@ -710,6 +720,16 @@
; Add uninstall registry entries. This macro tests for write access to determine
; if the uninstall keys should be added to HKLM or HKCU.
!macro SetUninstallKeys
; Check if this is an ESR release and if so add registry values so it is
; possible to determine that this is an ESR install (bug 726781).
ClearErrors
${WordFind} "${UpdateChannel}" "esr" "E#" $3
${If} ${Errors}
StrCpy $3 ""
${Else}
StrCpy $3 " ESR"
${EndIf}
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} ${AppVersion} (${ARCH} ${AB_CD})"
StrCpy $2 ""