Bug 1441685 - Backed out changeset ab285921713c from bug 1427712 [Integrate Beijing office's customizations into the full installer] to build Thunderbird 59 beta. a=jorgk DONTBUILD THUNDERBIRD590b2_2018022701_RELBRANCH
authorJorg K <jorgk@jorgk.com>
Wed, 28 Feb 2018 09:06:21 +0100
branchTHUNDERBIRD590b2_2018022701_RELBRANCH
changeset 452593 6429339f38d8b985891c97f5c09580bfb846dddd
parent 452588 dd4421aa167f61cf9df964663e12db84656c1e1b
child 452604 6df98ce7da1f5c296f6c0a255ac75b003a9921ff
push id8783
push usermozilla@jorgk.com
push dateWed, 28 Feb 2018 08:07:47 +0000
treeherdermozilla-beta@6429339f38d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1441685, 1427712
milestone59.0
Bug 1441685 - Backed out changeset ab285921713c from bug 1427712 [Integrate Beijing office's customizations into the full installer] to build Thunderbird 59 beta. a=jorgk DONTBUILD
browser/installer/windows/Makefile.in
browser/installer/windows/nsis/defines.nsi.in
browser/installer/windows/nsis/extensionsLocale.nsh
browser/installer/windows/nsis/installer.nsi
toolkit/mozapps/installer/windows/nsis/common.nsh
--- a/browser/installer/windows/Makefile.in
+++ b/browser/installer/windows/Makefile.in
@@ -82,16 +82,13 @@ endif
 	  $(srcdir)/nsis/defines.nsi.in -o $(CONFIG_DIR)/defines.nsi)
 	$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-locale $(topsrcdir) \
 	  $(PPL_LOCALE_ARGS) $(AB_CD) $(CONFIG_DIR)
 	$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
 	  --preprocess-single-file $(topsrcdir) \
 	  $(PPL_LOCALE_ARGS) $(CONFIG_DIR) \
 	  nsisstrings.properties nsisstrings.nlf
-	$(PYTHON) $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/preprocess-locale.py \
-	  --convert-utf8-utf16le \
-	  $(srcdir)/nsis/extensionsLocale.nsh $(CONFIG_DIR)/extensionsLocale.nsh
 
 GARBARGE_DIRS += instgen
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/toolkit/mozapps/installer/windows/nsis/makensis.mk
--- a/browser/installer/windows/nsis/defines.nsi.in
+++ b/browser/installer/windows/nsis/defines.nsi.in
@@ -99,22 +99,16 @@
 #endif
 
 !define MinSupportedCPU "SSE2"
 
 #ifdef MOZ_MAINTENANCE_SERVICE
 !define MOZ_MAINTENANCE_SERVICE
 #endif
 
-!if "@AB_CD@" == "en-US"
-!define MOZ_OPTIONAL_EXTENSIONS
-!else if "@AB_CD@" == "zh-CN"
-!define MOZ_OPTIONAL_EXTENSIONS
-!endif
-
 # File details shared by both the installer and uninstaller
 VIProductVersion "1.0.0.0"
 VIAddVersionKey "ProductName"     "${BrandShortName}"
 VIAddVersionKey "CompanyName"     "${CompanyName}"
 #ifdef MOZ_OFFICIAL_BRANDING
 VIAddVersionKey "LegalTrademarks" "${BrandShortName} is a Trademark of The Mozilla Foundation."
 #endif
 VIAddVersionKey "LegalCopyright"  "${CompanyName}"
deleted file mode 100644
--- a/browser/installer/windows/nsis/extensionsLocale.nsh
+++ /dev/null
@@ -1,20 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-; Strings for the optional extensions page. This is not in the locale
-; directory so these strings are only translated to zh-CN.
-
-!if "${AB_CD}" == "en-US"
-LangString EXTENSIONS_PAGE_TITLE 0  "Install Optional Extensions"
-LangString EXTENSIONS_PAGE_SUBTITLE 0  "$ExtensionRecommender recommends these extensions"
-LangString OPTIONAL_EXTENSIONS_CHECKBOX_DESC 0  "Install &Extension:"
-LangString OPTIONAL_EXTENSIONS_DESC 0  "You can add or remove these extensions at any time. Click the menu button and choose “Add-ons”."
-!endif
-
-!if "${AB_CD}" == "zh-CN"
-LangString EXTENSIONS_PAGE_TITLE 0  "安装可选扩展"
-LangString EXTENSIONS_PAGE_SUBTITLE 0  "$ExtensionRecommender 推荐安装以下扩展"
-LangString OPTIONAL_EXTENSIONS_CHECKBOX_DESC 0  "安装扩展(&E):"
-LangString OPTIONAL_EXTENSIONS_DESC 0  "您随时可以点击浏览器的菜单按钮并选择“附加组件”来添加或移除扩展。"
-!endif
\ No newline at end of file
--- a/browser/installer/windows/nsis/installer.nsi
+++ b/browser/installer/windows/nsis/installer.nsi
@@ -29,18 +29,16 @@ ManifestDPIAware true
 
 Var TmpVal
 Var InstallType
 Var AddStartMenuSC
 Var AddTaskbarSC
 Var AddQuickLaunchSC
 Var AddDesktopSC
 Var InstallMaintenanceService
-Var InstallOptionalExtensions
-Var ExtensionRecommender
 Var PageName
 Var PreventRebootRequired
 
 ; By defining NO_STARTMENU_DIR an installer that doesn't provide an option for
 ; an application's Start Menu PROGRAMS directory and doesn't define the
 ; StartMenuDir variable can use the common InstallOnInitCommon macro.
 !define NO_STARTMENU_DIR
 
@@ -166,21 +164,16 @@ Page custom preOptions leaveOptions
 ; Custom Components Page
 !ifdef MOZ_MAINTENANCE_SERVICE
 Page custom preComponents leaveComponents
 !endif
 
 ; Custom Shortcuts Page
 Page custom preShortcuts leaveShortcuts
 
-; Custom Extensions Page
-!ifdef MOZ_OPTIONAL_EXTENSIONS
-Page custom preExtensions leaveExtensions
-!endif
-
 ; Custom Summary Page
 Page custom preSummary leaveSummary
 
 ; Install Files Page
 !insertmacro MUI_PAGE_INSTFILES
 
 ; Finish Page
 !define MUI_FINISHPAGE_TITLE_3LINES
@@ -591,52 +584,16 @@ Section "-Application" APP_IDX
         ; know the correct full path.
         ${LogMsg} "Added Quick Launch Shortcut: ${BrandShortName}.lnk"
         GetFunctionAddress $0 AddQuickLaunchShortcut
         UAC::ExecCodeSegment $0
       ${EndIf}
     ${EndUnless}
   ${EndIf}
 
-!ifdef MOZ_OPTIONAL_EXTENSIONS
-  ${If} ${FileExists} "$INSTDIR\distribution\optional-extensions"
-    ${LogHeader} "Installing optional extensions if requested"
-
-    ${If} $InstallOptionalExtensions != "0"
-    ${AndIf} ${FileExists} "$INSTDIR\distribution\setup.ini"
-      ${Unless} ${FileExists} "$INSTDIR\distribution\extensions"
-        CreateDirectory "$INSTDIR\distribution\extensions"
-      ${EndUnless}
-
-      StrCpy $0 0
-      ${Do}
-        ClearErrors
-        ReadINIStr $1 "$INSTDIR\distribution\setup.ini" "OptionalExtensions" \
-                                                        "extension.$0.id"
-        ${If} ${Errors}
-          ${ExitDo}
-        ${EndIf}
-
-        ReadINIStr $2 "$INSTDIR\distribution\setup.ini" "OptionalExtensions" \
-                                                        "extension.$0.checked"
-        ${If} $2 != ${BST_UNCHECKED}
-          ${LogMsg} "Installing optional extension: $1"
-          CopyFiles /SILENT "$INSTDIR\distribution\optional-extensions\$1.xpi" \
-                            "$INSTDIR\distribution\extensions"
-        ${EndIf}
-
-        IntOp $0 $0 + 1
-      ${Loop}
-    ${EndIf}
-
-    ${LogMsg} "Removing the optional-extensions directory"
-    RMDir /r /REBOOTOK "$INSTDIR\distribution\optional-extensions"
-  ${EndIf}
-!endif
-
 !ifdef MOZ_MAINTENANCE_SERVICE
   ${If} $TmpVal == "HKLM"
     ; Add the registry keys for allowed certificates.
     ${AddMaintCertKeys}
   ${EndIf}
 !endif
 SectionEnd
 
@@ -903,19 +860,16 @@ FunctionEnd
 ################################################################################
 # Language
 
 !insertmacro MOZ_MUI_LANGUAGE 'baseLocale'
 !verbose push
 !verbose 3
 !include "overrideLocale.nsh"
 !include "customLocale.nsh"
-!ifdef MOZ_OPTIONAL_EXTENSIONS
-!include "extensionsLocale.nsh"
-!endif
 !verbose pop
 
 ; Set this after the locale files to override it if it is in the locale
 ; using " " for BrandingText will hide the "Nullsoft Install System..." branding
 BrandingText " "
 
 ################################################################################
 # Page pre, show, and leave functions
@@ -1038,129 +992,16 @@ Function leaveComponents
   ${EndIf}
   ${MUI_INSTALLOPTIONS_READ} $InstallMaintenanceService "components.ini" "Field 2" "State"
   ${If} $InstallType == ${INSTALLTYPE_CUSTOM}
     Call CheckExistingInstall
   ${EndIf}
 FunctionEnd
 !endif
 
-!ifdef MOZ_OPTIONAL_EXTENSIONS
-Function preExtensions
-  StrCpy $PageName "Extensions"
-  ${CheckCustomCommon}
-
-  ; Abort if no optional extensions configured in distribution/setup.ini
-  ${If} ${FileExists} "$EXEDIR\core\distribution\setup.ini"
-    ClearErrors
-    ReadINIStr $ExtensionRecommender "$EXEDIR\core\distribution\setup.ini" \
-      "OptionalExtensions" "Recommender.${AB_CD}"
-    ${If} ${Errors}
-      ClearErrors
-      ReadINIStr $ExtensionRecommender "$EXEDIR\core\distribution\setup.ini" \
-        "OptionalExtensions" "Recommender"
-    ${EndIf}
-
-    ${If} ${Errors}
-      ClearErrors
-      Abort
-    ${EndIf}
-  ${Else}
-    Abort
-  ${EndIf}
-
-  !insertmacro MUI_HEADER_TEXT "$(EXTENSIONS_PAGE_TITLE)" "$(EXTENSIONS_PAGE_SUBTITLE)"
-  !insertmacro MUI_INSTALLOPTIONS_DISPLAY "extensions.ini"
-FunctionEnd
-
-Function leaveExtensions
-  ${MUI_INSTALLOPTIONS_READ} $0 "extensions.ini" "Settings" "NumFields"
-  ${MUI_INSTALLOPTIONS_READ} $1 "extensions.ini" "Settings" "State"
-
-  ; $0 is count of checkboxes
-  IntOp $0 $0 - 1
-
-  ${If} $1 > $0
-    Abort
-  ${ElseIf} $1 == 0
-    ; $1 is count of selected optional extension(s)
-    StrCpy $1 0
-
-    StrCpy $2 2
-    ${Do}
-      ${MUI_INSTALLOPTIONS_READ} $3 "extensions.ini" "Field $2" "State"
-      ${If} $3 == ${BST_CHECKED}
-        IntOp $1 $1 + 1
-      ${EndIf}
-
-      IntOp $4 $2 - 2
-      WriteINIStr "$EXEDIR\core\distribution\setup.ini" \
-        "OptionalExtensions" "extension.$4.checked" "$3"
-
-      ${If} $0 == $2
-        ${ExitDo}
-      ${Else}
-        IntOp $2 $2 + 1
-      ${EndIf}
-    ${Loop}
-
-    ; Different from state of field 1, "0" means no optional extensions selected
-    ${If} $1 > 0
-      StrCpy $InstallOptionalExtensions "1"
-    ${Else}
-      StrCpy $InstallOptionalExtensions "0"
-    ${EndIf}
-
-    ${If} $InstallType == ${INSTALLTYPE_CUSTOM}
-      Call CheckExistingInstall
-    ${EndIf}
-  ${ElseIf} $1 == 1
-    ; Check/uncheck all optional extensions with field 1
-    ${MUI_INSTALLOPTIONS_READ} $1 "extensions.ini" "Field 1" "State"
-
-    StrCpy $2 2
-    ${Do}
-      ${MUI_INSTALLOPTIONS_READ} $3 "extensions.ini" "Field $2" "HWND"
-      SendMessage $3 ${BM_SETCHECK} $1 0
-
-      ${If} $0 == $2
-        ${ExitDo}
-      ${Else}
-        IntOp $2 $2 + 1
-      ${EndIf}
-    ${Loop}
-
-    Abort
-  ${ElseIf} $1 > 1
-    StrCpy $1 ${BST_CHECKED}
-
-    StrCpy $2 2
-    ${Do}
-      ${MUI_INSTALLOPTIONS_READ} $3 "extensions.ini" "Field $2" "State"
-      ${If} $3 == ${BST_UNCHECKED}
-        StrCpy $1 ${BST_UNCHECKED}
-        ${ExitDo}
-      ${EndIf}
-
-      ${If} $0 == $2
-        ${ExitDo}
-      ${Else}
-        IntOp $2 $2 + 1
-      ${EndIf}
-    ${Loop}
-
-    ; Check field 1 only if all optional extensions are selected
-    ${MUI_INSTALLOPTIONS_READ} $3 "extensions.ini" "Field 1" "HWND"
-    SendMessage $3 ${BM_SETCHECK} $1 0
-
-    Abort
-  ${EndIf}
-FunctionEnd
-!endif
-
 Function preSummary
   StrCpy $PageName "Summary"
   ; Setup the summary.ini file for the Custom Summary Page
   WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "3"
 
   WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Type   "label"
   WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Text   "$(SUMMARY_INSTALLED_TO)"
   WriteINIStr "$PLUGINSDIR\summary.ini" "Field 1" Left   "0"
@@ -1325,17 +1166,16 @@ Function .onInit
   SetRegView 64
 !endif
 
   ${InstallOnInitCommon} "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
 
   !insertmacro InitInstallOptionsFile "options.ini"
   !insertmacro InitInstallOptionsFile "shortcuts.ini"
   !insertmacro InitInstallOptionsFile "components.ini"
-  !insertmacro InitInstallOptionsFile "extensions.ini"
   !insertmacro InitInstallOptionsFile "summary.ini"
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
 
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Type   "label"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Text   "$(OPTIONS_SUMMARY)"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Left   "0"
   WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Right  "-1"
@@ -1430,84 +1270,16 @@ Function .onInit
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Text   "$(MAINTENANCE_SERVICE_CHECKBOX_DESC)"
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Left   "0"
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Right  "-1"
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Top    "27"
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Bottom "37"
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" State  "1"
   WriteINIStr "$PLUGINSDIR\components.ini" "Field 2" Flags  "GROUP"
 
-  ; Setup the extensions.ini file for the Custom Extensions Page
-  StrCpy $R9 0
-  StrCpy $R8 ${BST_CHECKED}
-
-  ${If} ${FileExists} "$EXEDIR\core\distribution\setup.ini"
-    ${Do}
-      IntOp $R7 $R9 + 2
-
-      ClearErrors
-      ReadINIStr $R6 "$EXEDIR\core\distribution\setup.ini" \
-        "OptionalExtensions" "extension.$R9.name.${AB_CD}"
-      ${If} ${Errors}
-        ClearErrors
-        ReadINIStr $R6 "$EXEDIR\core\distribution\setup.ini" \
-          "OptionalExtensions" "extension.$R9.name"
-      ${EndIf}
-
-      ${If} ${Errors}
-        ${ExitDo}
-      ${EndIf}
-
-      ; Each row moves down by 13 DLUs
-      IntOp $R2 $R9 * 13
-      IntOp $R2 $R2 + 21
-      IntOp $R1 $R2 + 10
-
-      ClearErrors
-      ReadINIStr $R0 "$EXEDIR\core\distribution\setup.ini" \
-        "OptionalExtensions" "extension.$R9.checked"
-      ${If} ${Errors}
-        StrCpy $R0 ${BST_CHECKED}
-      ${ElseIf} $R0 == "0"
-        StrCpy $R8 ${BST_UNCHECKED}
-      ${EndIf}
-
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Type   "checkbox"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Text   "$R6"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Left   "11"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Right  "-1"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Top    "$R2"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Bottom "$R1"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" State  "$R0"
-      WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R7" Flags  "NOTIFY"
-
-      IntOp $R9 $R9 + 1
-    ${Loop}
-  ${EndIf}
-
-  IntOp $R9 $R9 + 2
-
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Settings" NumFields "$R9"
-
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Type   "checkbox"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Text   "$(OPTIONAL_EXTENSIONS_CHECKBOX_DESC)"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Left   "0"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Right  "-1"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Top    "5"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Bottom "15"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" State  "$R8"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field 1" Flags  "GROUP|NOTIFY"
-
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R9" Type   "label"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R9" Text   "$(OPTIONAL_EXTENSIONS_DESC)"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R9" Left   "0"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R9" Right  "-1"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R9" Top    "-23"
-  WriteINIStr "$PLUGINSDIR\extensions.ini" "Field $R9" Bottom "-5"
-
   ; There must always be a core directory.
   ${GetSize} "$EXEDIR\core\" "/S=0K" $R5 $R7 $R8
   SectionSetSize ${APP_IDX} $R5
 
   ; Initialize $hHeaderBitmap to prevent redundant changing of the bitmap if
   ; the user clicks the back button
   StrCpy $hHeaderBitmap ""
 FunctionEnd
--- a/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -5094,23 +5094,16 @@
             ReadINIStr $R8 $R7 "Install" "MaintenanceService"
             ${If} $R8 == "false"
               StrCpy $InstallMaintenanceService "0"
             ${Else}
               ; Installing the service always requires elevation.
               ${ElevateUAC}
             ${EndIf}
 
-            ReadINIStr $R8 $R7 "Install" "OptionalExtensions"
-            ${If} $R8 == "false"
-              StrCpy $InstallOptionalExtensions "0"
-            ${Else}
-              StrCpy $InstallOptionalExtensions "1"
-            ${EndIf}
-
             !ifndef NO_STARTMENU_DIR
               ReadINIStr $R8 $R7 "Install" "StartMenuDirectoryName"
               ${If} $R8 != ""
                 StrCpy $StartMenuDir "$R8"
               ${EndIf}
             !endif
           ${EndIf}
         ${Else}