Bug 689057 - When upgrading Thunderbird, the button in the installer should be "Upgrade" instead of "Install". r=mkmelin

--HG--
extra : rebase_source : 5f855b430940f3fe1e8359b117b27d9402a43f5c
This commit is contained in:
Richard Marti 2020-05-30 14:18:21 +02:00
Родитель 465b38bb6a
Коммит 3ff9517c2a
2 изменённых файлов: 54 добавлений и 44 удалений

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

@ -594,7 +594,7 @@ Section "-InstallEndCleanup"
${Unless} ${Silent}
ClearErrors
${MUI_INSTALLOPTIONS_READ} $0 "options.ini" "Field 6" "State"
${MUI_INSTALLOPTIONS_READ} $0 "summary.ini" "Field 4" "State"
${If} "$0" == "1"
${LogHeader} "Setting as the default mail application"
ClearErrors
@ -979,36 +979,59 @@ Function preSummary
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Top "130"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Bottom "150"
${If} "$TmpVal" == "true"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Type "label"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Text "$(SUMMARY_REBOOT_REQUIRED_INSTALL)"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Left "0"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Right "-1"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Top "35"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Bottom "45"
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "4"
${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Text "$(SUMMARY_UPGRADE_CLICK)"
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NextButtonText "$(UPGRADE_BUTTON)"
${Else}
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 3" Text "$(SUMMARY_INSTALL_CLICK)"
DeleteINIStr "$PLUGINSDIR\summary.ini" "Settings" NextButtonText
${EndIf}
ReadINIStr $0 "$PLUGINSDIR\options.ini" "Field 6" "State"
${If} "$0" == "1"
${If} "$TmpVal" == "true"
; To insert this control reset Top / Bottom for controls below this one
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Top "50"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Bottom "60"
; Remove the "Field 4" ini section in case the user hits back and changes the
; installation directory which could change whether the make default checkbox
; should be displayed.
DeleteINISec "$PLUGINSDIR\summary.ini" "Field 4"
; Check if it is possible to write to HKLM
ClearErrors
WriteRegStr HKLM "Software\Thunderbird" "${BrandShortName}InstallerTest" "Write Test"
${Unless} ${Errors}
DeleteRegValue HKLM "Software\Thunderbird" "${BrandShortName}InstallerTest"
; Check if Firefox is already the handler for http. This is set on all
; versions of Windows.
${IsHandlerForInstallDir} "http" $R9
${If} "$R9" != "true"
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "4"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Type "checkbox"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Text "$(SUMMARY_TAKE_DEFAULTS)"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Left "0"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Right "-1"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" State "1"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Top "32"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field 4" Bottom "53"
${EndIf}
${EndUnless}
${If} "$TmpVal" == "true"
; If there is already a Type entry in the "Field 4" section with a value of
; checkbox then the set as the default mail client checkbox is displayed and
; this text must be moved below it.
ReadINIStr $0 "$PLUGINSDIR\summary.ini" "Field 4" "Type"
${If} "$0" == "checkbox"
StrCpy $0 "5"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "53"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "68"
${Else}
StrCpy $0 "4"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "35"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "50"
${EndIf}
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "$0"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Type "label"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Text "$(SUMMARY_MAKE_DEFAULT)"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Text "$(SUMMARY_REBOOT_REQUIRED_INSTALL)"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Left "0"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Right "-1"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Top "35"
WriteINIStr "$PLUGINSDIR\summary.ini" "Field $0" Bottom "45"
WriteINIStr "$PLUGINSDIR\summary.ini" "Settings" NumFields "$0"
${EndIf}
!insertmacro MUI_HEADER_TEXT "$(SUMMARY_PAGE_TITLE)" "$(SUMMARY_PAGE_SUBTITLE)"
@ -1096,26 +1119,7 @@ Function .onInit
!insertmacro InitInstallOptionsFile "components.ini"
!insertmacro InitInstallOptionsFile "summary.ini"
ClearErrors
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" "Write Test"
${If} ${Errors}
; Setup the options.ini file for the Custom Options Page without the option
; to set as default since the installer is unable to write to HKLM.
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
${Else}
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
; Setup the options.ini file for the Custom Options Page with the option
; to set as default
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "6"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Type "checkbox"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Text "$(OPTIONS_MAKE_DEFAULT)"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Left "0"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Right "-1"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Top "124"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" Bottom "145"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 6" State "1"
${EndIf}
WriteINIStr "$PLUGINSDIR\options.ini" "Settings" NumFields "5"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Type "label"
WriteINIStr "$PLUGINSDIR\options.ini" "Field 1" Text "$(OPTIONS_SUMMARY)"

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

@ -23,7 +23,6 @@ CONTEXT_OPTIONS=$BrandShortName &Options
CONTEXT_SAFE_MODE=$BrandShortName &Safe Mode
OPTIONS_PAGE_TITLE=Setup Type
OPTIONS_PAGE_SUBTITLE=Choose setup options
OPTIONS_MAKE_DEFAULT=&Use $BrandShortName as my default mail application
SHORTCUTS_PAGE_TITLE=Set Up Shortcuts
SHORTCUTS_PAGE_SUBTITLE=Create Program Icons
COMPONENTS_PAGE_TITLE=Set Up Optional Components
@ -35,8 +34,9 @@ SUMMARY_PAGE_SUBTITLE=Ready to start installing $BrandShortName
SUMMARY_INSTALLED_TO=$BrandShortName will be installed to the following location:
SUMMARY_REBOOT_REQUIRED_INSTALL=A restart of your computer may be required to complete the installation.
SUMMARY_REBOOT_REQUIRED_UNINSTALL=A restart of your computer may be required to complete the uninstall.
SUMMARY_MAKE_DEFAULT=$BrandShortName will be set as your default mail application.
SUMMARY_CLICK=Click Install to continue.
SUMMARY_TAKE_DEFAULTS=U&se $BrandShortName as my default mail application
SUMMARY_INSTALL_CLICK=Click Install to continue.
SUMMARY_UPGRADE_CLICK=Click Upgrade to continue.
SURVEY_TEXT=&Tell us what you thought of $BrandShortName
LAUNCH_TEXT=&Launch $BrandFullName now
CREATE_ICONS_DESC=Create icons for $BrandShortName:
@ -77,3 +77,9 @@ OPTION_STANDARD_RADIO=&Standard
# Two lines
OPTION_CUSTOM_DESC=You may choose individual options to be installed. Recommended for experienced users.
OPTION_CUSTOM_RADIO=&Custom
# LOCALIZATION NOTE:
# The following text replaces the Install button text on the summary page.
# Verify that the access key for InstallBtn (in override.properties) and
# UPGRADE_BUTTON is not already used by SUMMARY_TAKE_DEFAULTS.
UPGRADE_BUTTON=&Upgrade