mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 322206 - Firefox net / stub installer - fix branch support, set as default displayed as appropriate, and other fixes. r=bbondy
This commit is contained in:
parent
c7f8127729
commit
3f7d13553d
@ -13,8 +13,8 @@
|
||||
!define URLInfoAbout "http://www.mozilla.org"
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-aurora-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-aurora-latest&os=win&lang=${AB_CD}"
|
||||
|
||||
# The installer's certificate name and issuer expected by the stub installer
|
||||
!define CertNameDownload "Mozilla Corporation"
|
||||
|
@ -13,8 +13,8 @@
|
||||
!define URLInfoAbout "http://www.mozilla.org"
|
||||
!define URLUpdateInfo "http://www.mozilla.org/projects/firefox"
|
||||
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-latest&os=win&lang=${AB_CD}"
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-nightly-latest&os=win&lang=${AB_CD}"
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-nightly-latest&os=win&lang=${AB_CD}"
|
||||
|
||||
# The installer's certificate name and issuer expected by the stub installer
|
||||
!define CertNameDownload "Mozilla Corporation"
|
||||
|
@ -29,6 +29,12 @@
|
||||
# The value below removes all LSP categories previously set.
|
||||
!define LSP_CATEGORIES "0x00000000"
|
||||
|
||||
# Due to official and beta using the same branding this is needed to
|
||||
# differentiante between the url used by the stub for downloading.
|
||||
!if "@MOZ_UPDATE_CHANNEL@" == "beta"
|
||||
!define BETA_UPDATE_CHANNEL
|
||||
!endif
|
||||
|
||||
# NO_INSTDIR_FROM_REG is defined for pre-releases which have a PreReleaseSuffix
|
||||
# (e.g. Alpha X, Beta X, etc.) to prevent finding a non-default installation
|
||||
# directory in the registry and using that as the default. This prevents
|
||||
|
@ -62,6 +62,7 @@ Var ExistingTopDir
|
||||
Var SpaceAvailableBytes
|
||||
Var InitialInstallDir
|
||||
Var HandleDownload
|
||||
Var CanSetAsDefault
|
||||
|
||||
Var HEIGHT_PX
|
||||
Var CTL_RIGHT_PX
|
||||
@ -85,17 +86,24 @@ Var CTL_RIGHT_PX
|
||||
!include "locales.nsi"
|
||||
!include "branding.nsi"
|
||||
|
||||
; Override BrandFullNameInternal from branding.nsi
|
||||
!undef BrandFullNameInternal
|
||||
!define BrandFullNameInternal "Mozilla Firefox"
|
||||
|
||||
!include "defines.nsi"
|
||||
|
||||
; Workaround to support different urls for Official and Beta since they share
|
||||
; the same branding.
|
||||
!ifdef BETA_UPDATE_CHANNEL
|
||||
!undef URLStubDownload
|
||||
!define URLStubDownload "http://download.mozilla.org/?product=firefox-beta-latest&os=win&lang=${AB_CD}"
|
||||
!undef URLManualDownload
|
||||
!define URLManualDownload "http://download.mozilla.org/?product=firefox-beta-latest&os=win&lang=${AB_CD}"
|
||||
!endif
|
||||
|
||||
!include "common.nsh"
|
||||
|
||||
!insertmacro ElevateUAC
|
||||
!insertmacro GetLongPath
|
||||
!insertmacro GetSingleInstallPath
|
||||
!insertmacro GetTextWidthHeight
|
||||
!insertmacro IsUserAdmin
|
||||
!insertmacro SetBrandNameVars
|
||||
!insertmacro UnloadUAC
|
||||
|
||||
@ -207,10 +215,18 @@ Function .onInit
|
||||
${EndIf}
|
||||
|
||||
StrCpy $InitialInstallDir "$INSTDIR"
|
||||
${If} ${AtMostWin7}
|
||||
StrCpy $CheckboxSetAsDefault 1
|
||||
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
|
||||
"Write Test"
|
||||
|
||||
${If} ${Errors}
|
||||
${OrIf} ${AtLeastWin8}
|
||||
StrCpy $CanSetAsDefault "false"
|
||||
StrCpy $CheckboxSetAsDefault "0"
|
||||
${Else}
|
||||
StrCpy $CheckboxSetAsDefault 0
|
||||
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
|
||||
StrCpy $CanSetAsDefault "true"
|
||||
${EndIf}
|
||||
|
||||
CreateFont $FontBlurb "$(^Font)" "12" "500"
|
||||
@ -294,7 +310,7 @@ Function createIntro
|
||||
GetDlgItem $0 $HWNDPARENT 10 ; Default browser checkbox
|
||||
; Set as default is not supported in the installer for Win8 and above so
|
||||
; only display it on Windows 7 and below
|
||||
${If} ${AtMostWin7}
|
||||
${If} $CanSetAsDefault == "true"
|
||||
SendMessage $0 ${WM_SETFONT} $FontNormal 0
|
||||
SendMessage $0 ${WM_SETTEXT} 0 "STR:$(MAKE_DEFAULT)"
|
||||
SendMessage $0 ${BM_SETCHECK} 1 0
|
||||
@ -489,11 +505,29 @@ Function createOptions
|
||||
Call UpdateFreeSpaceLabel
|
||||
|
||||
!ifdef MOZ_MAINTENANCE_SERVICE
|
||||
; Only show the maintenance service checkbox if we have write access to HKLM
|
||||
Call IsUserAdmin
|
||||
Pop $0
|
||||
ClearErrors
|
||||
WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
|
||||
"Write Test"
|
||||
${If} ${Errors}
|
||||
${OrIf} $0 != "true"
|
||||
StrCpy $CheckboxInstallMaintSvc "0"
|
||||
${Else}
|
||||
DeleteRegValue HKLM "Software\Mozilla" "${BrandShortName}InstallerTest"
|
||||
; Read the registry instead of using ServicesHelper::IsInstalled so the
|
||||
; plugin isn't included in the stub installer to lessen its size.
|
||||
ClearErrors
|
||||
ReadRegStr $0 HKLM "SYSTEM\CurrentControlSet\services\MozillaMaintenance" "ImagePath"
|
||||
${If} ${Errors}
|
||||
${NSD_CreateCheckbox} ${OPTIONS_ITEM_LEFT_DU} 175u 100% 12u "$(INSTALL_MAINT_SERVICE)"
|
||||
Pop $CheckboxInstallMaintSvc
|
||||
SetCtlColors $CheckboxInstallMaintSvc ${CONTROL_TEXT_COLOR} ${OPTIONS_BKGRD_COLOR}
|
||||
SendMessage $CheckboxInstallMaintSvc ${WM_SETFONT} $FontNormal 0
|
||||
${NSD_Check} $CheckboxInstallMaintSvc
|
||||
${EndIf}
|
||||
${EndIf}
|
||||
!endif
|
||||
|
||||
GetDlgItem $0 $HWNDPARENT 1 ; Install button
|
||||
@ -686,7 +720,7 @@ Function createInstall
|
||||
SendMessage $0 ${WM_KILLFOCUS} 0 0
|
||||
|
||||
; Set as default is not supported in the installer for Win8 and above
|
||||
${If} ${AtMostWin7}
|
||||
${If} $CanSetAsDefault == "true"
|
||||
GetDlgItem $0 $HWNDPARENT 10 ; Default browser checkbox
|
||||
SendMessage $0 ${BM_GETCHECK} 0 0 $CheckboxSetAsDefault
|
||||
EnableWindow $0 0
|
||||
|
@ -30,7 +30,7 @@ WARN_WRITE_ACCESS=You don't have access to write to the installation directory.\
|
||||
WARN_DISK_SPACE=You don't have sufficient disk space to install to this location.\n\nClick OK to select a different location.
|
||||
WARN_ROOT_INSTALL=Unable to install to the root of your disk.\n\nClick OK to select a different location.
|
||||
|
||||
ERROR_DOWNLOAD=There was a problem downloading $BrandShortName\n\nClick OK to get the full download.
|
||||
ERROR_DOWNLOAD=Your download was interrupted.\n\nPlease click the OK button to continue.
|
||||
|
||||
INSTALL_BUTTON=&Install
|
||||
UPGRADE_BUTTON=&Upgrade
|
||||
|
Loading…
Reference in New Issue
Block a user