Bug 1548612 Part 3 - Add support for BrandProductName to SetBrandNameVars. r=agashlin a=jcristau
authorMatt Howell <mhowell@mozilla.com>
Tue, 21 May 2019 16:12:44 +0000
changeset 536457 a8f835eddb73d8f302b30efc97a4005fb43f5b31
parent 536456 8886e6d132f086ae69eeea8b0f96688d9591dba0
child 536458 b1fc004020e57440833c6f3a58a001cf4dde5dff
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagashlin, jcristau
bugs1548612
milestone68.0
Bug 1548612 Part 3 - Add support for BrandProductName to SetBrandNameVars. r=agashlin a=jcristau BrandProductName is a recently-introduced branding string which is intended to not change with the channel of the product; e.g., for a Nightly Firefox build, BrandShortName is not "Firefox", it's "Nightly", but BrandProductName is still "Firefox". Some of the new stub installer copy needs a name string like this. Depends on D31140 Differential Revision: https://phabricator.services.mozilla.com/D31141
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -4985,49 +4985,59 @@ end:
     !undef _MOZFUNC_UN_TMP
 
     ; Prevent declaring vars twice when the SetBrandNameVars macro is
     ; inserted into both the installer and uninstaller.
     !ifndef SetBrandNameVars
       Var BrandFullName
       Var BrandFullNameDA
       Var BrandShortName
+      Var BrandProductName
     !endif
 
     !verbose push
     !verbose ${_MOZFUNC_VERBOSE}
     !define ${_MOZFUNC_UN}SetBrandNameVars "!insertmacro ${_MOZFUNC_UN}SetBrandNameVarsCall"
 
     Function ${_MOZFUNC_UN}SetBrandNameVars
       Exch $R9
       Push $R8
       Push $R7
       Push $R6
+      Push $R5
 
       StrCpy $R8 "${BrandFullName}"
       StrCpy $R7 "${BrandShortName}"
+      StrCpy $R6 "${BrandProductName}"
 
       IfFileExists "$R9" +1 finish
 
       ClearErrors
-      ReadINIStr $R6 $R9 "Branding" "BrandFullName"
+      ReadINIStr $R5 $R9 "Branding" "BrandFullName"
       IfErrors +2 +1
-      StrCpy $R8 "$R6"
+      StrCpy $R8 "$R5"
 
       ClearErrors
-      ReadINIStr $R6 $R9 "Branding" "BrandShortName"
+      ReadINIStr $R5 $R9 "Branding" "BrandShortName"
       IfErrors +2 +1
-      StrCpy $R7 "$R6"
+      StrCpy $R7 "$R5"
+
+      ClearErrors
+      ReadINIStr $R5 $R9 "Branding" "BrandProductName"
+      IfErrors +2 +1
+      StrCpy $R6 "$R5"
 
       finish:
       StrCpy $BrandFullName "$R8"
       ${${_MOZFUNC_UN}WordReplace} "$R8" "&" "&&" "+" $R8
       StrCpy $BrandFullNameDA "$R8"
       StrCpy $BrandShortName "$R7"
-
+      StrCpy $BrandProductName "$R6"
+
+      Pop $R5
       Pop $R6
       Pop $R7
       Pop $R8
       Exch $R9
     FunctionEnd
 
     !verbose pop
   !endif