Bug 726781 - No way to distinguish between Firefox release and Firefox ESR via the registry. r=bbondy

This commit is contained in:
Robert Strong 2014-03-25 12:17:33 -07:00
parent 10c415da99
commit 45a19ce347

View File

@ -549,37 +549,67 @@ FunctionEnd
; 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"
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion}$3 (${AB_CD})\Main"
${WriteRegStr2} $TmpVal "$0" "Install Directory" "$8" 0
${WriteRegStr2} $TmpVal "$0" "PathToExe" "$8\${FileMainEXE}" 0
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})\Uninstall"
${WriteRegStr2} $TmpVal "$0" "Description" "${BrandFullNameInternal} ${AppVersion} (${ARCH} ${AB_CD})" 0
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion}$3 (${AB_CD})\Uninstall"
${WriteRegStr2} $TmpVal "$0" "Description" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion} (${AB_CD})"
${WriteRegStr2} $TmpVal "$0" "" "${AppVersion} (${AB_CD})" 0
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}\${AppVersion}$3 (${AB_CD})"
${WriteRegStr2} $TmpVal "$0" "" "${AppVersion}$3 (${AB_CD})" 0
${If} "$3" == ""
DeleteRegValue SHCTX "$0" "ESR"
${Else}
${WriteRegDWORD2} $TmpVal "$0" "ESR" 1 0
${EndIf}
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}\bin"
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}$3\bin"
${WriteRegStr2} $TmpVal "$0" "PathToExe" "$8\${FileMainEXE}" 0
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}\extensions"
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}$3\extensions"
${WriteRegStr2} $TmpVal "$0" "Components" "$8\components" 0
${WriteRegStr2} $TmpVal "$0" "Plugins" "$8\plugins" 0
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}"
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal} ${AppVersion}$3"
${WriteRegStr2} $TmpVal "$0" "GeckoVer" "${GREVersion}" 0
${If} "$3" == ""
DeleteRegValue SHCTX "$0" "ESR"
${Else}
${WriteRegDWORD2} $TmpVal "$0" "ESR" 1 0
${EndIf}
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}"
StrCpy $0 "Software\Mozilla\${BrandFullNameInternal}$3"
${WriteRegStr2} $TmpVal "$0" "" "${GREVersion}" 0
${WriteRegStr2} $TmpVal "$0" "CurrentVersion" "${AppVersion} (${AB_CD})" 0
${WriteRegStr2} $TmpVal "$0" "CurrentVersion" "${AppVersion}$3 (${AB_CD})" 0
!macroend
!define SetAppKeys "!insertmacro SetAppKeys"
; 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
StrCpy $0 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${BrandFullNameInternal} ${AppVersion} (${ARCH} ${AB_CD})"
; 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}$3 (${ARCH} ${AB_CD})"
StrCpy $2 ""
ClearErrors
@ -606,9 +636,9 @@ FunctionEnd
${GetLongPath} "$INSTDIR" $8
; Write the uninstall registry keys
${WriteRegStr2} $1 "$0" "Comments" "${BrandFullNameInternal} ${AppVersion} (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "Comments" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "DisplayIcon" "$8\${FileMainEXE},0" 0
${WriteRegStr2} $1 "$0" "DisplayName" "${BrandFullNameInternal} ${AppVersion} (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "DisplayName" "${BrandFullNameInternal} ${AppVersion}$3 (${ARCH} ${AB_CD})" 0
${WriteRegStr2} $1 "$0" "DisplayVersion" "${AppVersion}" 0
${WriteRegStr2} $1 "$0" "InstallLocation" "$8" 0
${WriteRegStr2} $1 "$0" "Publisher" "Mozilla" 0