summaryrefslogtreecommitdiffstats
path: root/browser
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2017-12-31 12:34:43 +0100
committerwolfbeast <mcwerewolf@gmail.com>2018-02-18 10:22:51 +0100
commite803a1be814ccffbed19072f77425c7252b5e19e (patch)
treecb5b3a204b49f56253bade507ffbe3b7544778c3 /browser
parent6f5c57ae74045228c2cbe4b797fe228f03274e6c (diff)
downloadUXP-e803a1be814ccffbed19072f77425c7252b5e19e.tar
UXP-e803a1be814ccffbed19072f77425c7252b5e19e.tar.gz
UXP-e803a1be814ccffbed19072f77425c7252b5e19e.tar.lz
UXP-e803a1be814ccffbed19072f77425c7252b5e19e.tar.xz
UXP-e803a1be814ccffbed19072f77425c7252b5e19e.zip
Change format handlers to Basilisk.
Diffstat (limited to 'browser')
-rw-r--r--browser/installer/windows/nsis/oneoff_en-US.nsh12
-rwxr-xr-xbrowser/installer/windows/nsis/shared.nsh100
-rw-r--r--browser/installer/windows/nsis/stub.nsi438
-rwxr-xr-xbrowser/installer/windows/nsis/uninstaller.nsi6
4 files changed, 325 insertions, 231 deletions
diff --git a/browser/installer/windows/nsis/oneoff_en-US.nsh b/browser/installer/windows/nsis/oneoff_en-US.nsh
deleted file mode 100644
index 62d95ade9..000000000
--- a/browser/installer/windows/nsis/oneoff_en-US.nsh
+++ /dev/null
@@ -1,12 +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/.
-
-; Custom strings for en-US. This is not in the locale directory so these strings
-; aren't translated.
-!define INDENT " "
-!define INTRO_BLURB "Thanks for choosing $BrandFullName. We’re not just designed to be different, we’re different by design."
-!define INSTALL_BLURB1 "You're about to enjoy the very latest in speed, flexibility and security so you're always in control."
-!define INSTALL_BLURB2 "And you're joining a global community of users, contributors and developers working to make the best browser in the world."
-!define INSTALL_BLURB3 "You even get a haiku:$\n${INDENT}Proudly non-profit$\n${INDENT}Free to innovate for you$\n${INDENT}And a better Web"
-!undef INDENT
diff --git a/browser/installer/windows/nsis/shared.nsh b/browser/installer/windows/nsis/shared.nsh
index 8d7eea618..fb2239d24 100755
--- a/browser/installer/windows/nsis/shared.nsh
+++ b/browser/installer/windows/nsis/shared.nsh
@@ -10,12 +10,12 @@
System::Call "kernel32::ProcessIdToSessionId(i $0, *i ${NSIS_MAX_STRLEN} r9)"
; Determine if we're the protected UserChoice default or not. If so fix the
- ; start menu tile. In case there are 2 Firefox installations, we only do
+ ; start menu tile. In case there are 2 Basilisk installations, we only do
; this if the application being updated is the default.
ReadRegStr $0 HKCU "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice" "ProgId"
- ${If} $0 == "FirefoxURL"
+ ${If} $0 == "BasiliskURL"
${AndIf} $9 != 0 ; We're not running in session 0
- ReadRegStr $0 HKCU "Software\Classes\FirefoxURL\shell\open\command" ""
+ ReadRegStr $0 HKCU "Software\Classes\BasiliskURL\shell\open\command" ""
${GetPathFromString} "$0" $0
${GetParent} "$0" $0
${If} ${FileExists} "$0"
@@ -327,13 +327,13 @@
ClearErrors
EnumRegKey $7 HKCR "${FILE_TYPE}" 0
${If} ${Errors}
- WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}" "" "FirefoxHTML"
+ WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}" "" "BasiliskHTML"
${EndIf}
- WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}\OpenWithProgids" "FirefoxHTML" ""
+ WriteRegStr SHCTX "SOFTWARE\Classes\${FILE_TYPE}\OpenWithProgids" "BasiliskHTML" ""
!macroend
!define AddAssociationIfNoneExist "!insertmacro AddAssociationIfNoneExist"
-; Adds the protocol and file handler registry entries for making Firefox the
+; Adds the protocol and file handler registry entries for making Basilisk the
; default handler (uses SHCTX).
!macro SetHandlers
${GetLongPath} "$INSTDIR\${FileMainEXE}" $8
@@ -341,30 +341,30 @@
StrCpy $0 "SOFTWARE\Classes"
StrCpy $2 "$\"$8$\" -osint -url $\"%1$\""
- ; Associate the file handlers with FirefoxHTML
+ ; Associate the file handlers with BasiliskHTML
ReadRegStr $6 SHCTX "$0\.htm" ""
- ${If} "$6" != "FirefoxHTML"
- WriteRegStr SHCTX "$0\.htm" "" "FirefoxHTML"
+ ${If} "$6" != "BasiliskHTML"
+ WriteRegStr SHCTX "$0\.htm" "" "BasiliskHTML"
${EndIf}
ReadRegStr $6 SHCTX "$0\.html" ""
- ${If} "$6" != "FirefoxHTML"
- WriteRegStr SHCTX "$0\.html" "" "FirefoxHTML"
+ ${If} "$6" != "BasiliskHTML"
+ WriteRegStr SHCTX "$0\.html" "" "BasiliskHTML"
${EndIf}
ReadRegStr $6 SHCTX "$0\.shtml" ""
- ${If} "$6" != "FirefoxHTML"
- WriteRegStr SHCTX "$0\.shtml" "" "FirefoxHTML"
+ ${If} "$6" != "BasiliskHTML"
+ WriteRegStr SHCTX "$0\.shtml" "" "BasiliskHTML"
${EndIf}
ReadRegStr $6 SHCTX "$0\.xht" ""
- ${If} "$6" != "FirefoxHTML"
- WriteRegStr SHCTX "$0\.xht" "" "FirefoxHTML"
+ ${If} "$6" != "BasiliskHTML"
+ WriteRegStr SHCTX "$0\.xht" "" "BasiliskHTML"
${EndIf}
ReadRegStr $6 SHCTX "$0\.xhtml" ""
- ${If} "$6" != "FirefoxHTML"
- WriteRegStr SHCTX "$0\.xhtml" "" "FirefoxHTML"
+ ${If} "$6" != "BasiliskHTML"
+ WriteRegStr SHCTX "$0\.xhtml" "" "BasiliskHTML"
${EndIf}
${AddAssociationIfNoneExist} ".pdf"
@@ -374,12 +374,12 @@
${AddAssociationIfNoneExist} ".pdf"
${AddAssociationIfNoneExist} ".webm"
- ; An empty string is used for the 5th param because FirefoxHTML is not a
+ ; An empty string is used for the 5th param because BasiliskHTML is not a
; protocol handler
- ${AddDisabledDDEHandlerValues} "FirefoxHTML" "$2" "$8,1" \
+ ${AddDisabledDDEHandlerValues} "BasiliskHTML" "$2" "$8,1" \
"${AppRegName} HTML Document" ""
- ${AddDisabledDDEHandlerValues} "FirefoxURL" "$2" "$8,1" "${AppRegName} URL" \
+ ${AddDisabledDDEHandlerValues} "BasiliskURL" "$2" "$8,1" "${AppRegName} URL" \
"true"
; An empty string is used for the 4th & 5th params because the following
; protocol handlers already have a display name and the additional keys
@@ -449,35 +449,35 @@
WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationIcon" "$8,0"
WriteRegStr ${RegKey} "$0\Capabilities" "ApplicationName" "${BrandShortName}"
- WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".htm" "FirefoxHTML"
- WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".html" "FirefoxHTML"
- WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".shtml" "FirefoxHTML"
- WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xht" "FirefoxHTML"
- WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xhtml" "FirefoxHTML"
+ WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".htm" "BasiliskHTML"
+ WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".html" "BasiliskHTML"
+ WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".shtml" "BasiliskHTML"
+ WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xht" "BasiliskHTML"
+ WriteRegStr ${RegKey} "$0\Capabilities\FileAssociations" ".xhtml" "BasiliskHTML"
WriteRegStr ${RegKey} "$0\Capabilities\StartMenu" "StartMenuInternet" "$R9"
- WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "ftp" "FirefoxURL"
- WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "http" "FirefoxURL"
- WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "https" "FirefoxURL"
+ WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "ftp" "BasiliskURL"
+ WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "http" "BasiliskURL"
+ WriteRegStr ${RegKey} "$0\Capabilities\URLAssociations" "https" "BasiliskURL"
; Vista Registered Application
WriteRegStr ${RegKey} "Software\RegisteredApplications" "${AppRegName}" "$0\Capabilities"
!macroend
!define SetStartMenuInternet "!insertmacro SetStartMenuInternet"
-; The IconHandler reference for FirefoxHTML can end up in an inconsistent state
+; The IconHandler reference for BasiliskHTML can end up in an inconsistent state
; due to changes not being detected by the IconHandler for side by side
; installs (see bug 268512). The symptoms can be either an incorrect icon or no
-; icon being displayed for files associated with Firefox (does not use SHCTX).
+; icon being displayed for files associated with Basilisk (does not use SHCTX).
!macro FixShellIconHandler RegKey
ClearErrors
- ReadRegStr $1 ${RegKey} "Software\Classes\FirefoxHTML\ShellEx\IconHandler" ""
+ ReadRegStr $1 ${RegKey} "Software\Classes\BasiliskHTML\ShellEx\IconHandler" ""
${Unless} ${Errors}
- ReadRegStr $1 ${RegKey} "Software\Classes\FirefoxHTML\DefaultIcon" ""
+ ReadRegStr $1 ${RegKey} "Software\Classes\BasiliskHTML\DefaultIcon" ""
${GetLongPath} "$INSTDIR\${FileMainEXE}" $2
${If} "$1" != "$2,1"
- WriteRegStr ${RegKey} "Software\Classes\FirefoxHTML\DefaultIcon" "" "$2,1"
+ WriteRegStr ${RegKey} "Software\Classes\BasiliskHTML\DefaultIcon" "" "$2,1"
${EndIf}
${EndUnless}
!macroend
@@ -612,7 +612,7 @@
; HKCU Software\Classes keys when associating handlers. The fix uses the merged
; view in HKCR to check for existance of an existing association. This macro
; cleans affected installations by removing the HKLM and HKCU value if it is set
-; to FirefoxHTML when there is a value for PersistentHandler or by removing the
+; to BasiliskHTML when there is a value for PersistentHandler or by removing the
; HKCU value when the HKLM value has a value other than an empty string.
!macro FixBadFileAssociation FILE_TYPE
; Only delete the default value in case the key has values for OpenWithList,
@@ -621,16 +621,16 @@
ReadRegStr $1 HKLM "Software\Classes\${FILE_TYPE}" ""
ReadRegStr $2 HKCR "${FILE_TYPE}\PersistentHandler" ""
${If} "$2" != ""
- ; Since there is a persistent handler remove FirefoxHTML as the default
- ; value from both HKCU and HKLM if it set to FirefoxHTML.
- ${If} "$0" == "FirefoxHTML"
+ ; Since there is a persistent handler remove BasiliskHTML as the default
+ ; value from both HKCU and HKLM if it set to BasiliskHTML.
+ ${If} "$0" == "BasiliskHTML"
DeleteRegValue HKCU "Software\Classes\${FILE_TYPE}" ""
${EndIf}
- ${If} "$1" == "FirefoxHTML"
+ ${If} "$1" == "BasiliskHTML"
DeleteRegValue HKLM "Software\Classes\${FILE_TYPE}" ""
${EndIf}
- ${ElseIf} "$0" == "FirefoxHTML"
- ; Since KHCU is set to FirefoxHTML remove FirefoxHTML as the default value
+ ${ElseIf} "$0" == "BasiliskHTML"
+ ; Since KHCU is set to BasiliskHTML remove BasiliskHTML as the default value
; from HKCU if HKLM is set to a value other than an empty string.
${If} "$1" != ""
DeleteRegValue HKCU "Software\Classes\${FILE_TYPE}" ""
@@ -686,17 +686,17 @@
; Only set the file and protocol handlers if the existing one under HKCR is
; for this install location.
- ${IsHandlerForInstallDir} "FirefoxHTML" $R9
+ ${IsHandlerForInstallDir} "BasiliskHTML" $R9
${If} "$R9" == "true"
- ; An empty string is used for the 5th param because FirefoxHTML is not a
+ ; An empty string is used for the 5th param because BasiliskHTML is not a
; protocol handler.
- ${AddDisabledDDEHandlerValues} "FirefoxHTML" "$2" "$8,1" \
+ ${AddDisabledDDEHandlerValues} "BasiliskHTML" "$2" "$8,1" \
"${AppRegName} HTML Document" ""
${EndIf}
- ${IsHandlerForInstallDir} "FirefoxURL" $R9
+ ${IsHandlerForInstallDir} "BasiliskURL" $R9
${If} "$R9" == "true"
- ${AddDisabledDDEHandlerValues} "FirefoxURL" "$2" "$8,1" \
+ ${AddDisabledDDEHandlerValues} "BasiliskURL" "$2" "$8,1" \
"${AppRegName} URL" "true"
${EndIf}
@@ -780,8 +780,8 @@
${RegCleanAppHandler} "chrome"
; Remove protocol handler registry keys added by the MS shim
- DeleteRegKey HKLM "Software\Classes\Firefox.URL"
- DeleteRegKey HKCU "Software\Classes\Firefox.URL"
+ DeleteRegKey HKLM "Software\Classes\Basilisk.URL"
+ DeleteRegKey HKCU "Software\Classes\Basilisk.URL"
; Delete gopher from Capabilities\URLAssociations if it is present.
${StrFilter} "${FileMainEXE}" "+" "" "" $R9
@@ -792,10 +792,10 @@
DeleteRegValue HKLM "$0\Capabilities\URLAssociations" "gopher"
${EndUnless}
- ; Delete gopher from the user's UrlAssociations if it points to FirefoxURL.
+ ; Delete gopher from the user's UrlAssociations if it points to BasiliskURL.
StrCpy $0 "Software\Microsoft\Windows\Shell\Associations\UrlAssociations\gopher"
ReadRegStr $2 HKCU "$0\UserChoice" "Progid"
- ${If} "$2" == "FirefoxURL"
+ ${If} "$2" == "BasiliskURL"
DeleteRegKey HKCU "$0"
${EndIf}
!macroend
@@ -943,7 +943,7 @@
${If} $AddTaskbarSC == ""
; No need to check the default on Win8 and later
${If} ${AtMostWin2008R2}
- ; Check if the Firefox is the http handler for this user
+ ; Check if the Basilisk is the http handler for this user
SetShellVarContext current ; Set SHCTX to the current user
${IsHandlerForInstallDir} "http" $R9
${If} $TmpVal == "HKLM"
diff --git a/browser/installer/windows/nsis/stub.nsi b/browser/installer/windows/nsis/stub.nsi
index 5c19c10fe..999ffa154 100644
--- a/browser/installer/windows/nsis/stub.nsi
+++ b/browser/installer/windows/nsis/stub.nsi
@@ -35,11 +35,10 @@ Var LabelDownloading
Var LabelInstalling
Var LabelFreeSpace
Var CheckboxSetAsDefault
-Var CheckboxShortcutOnBar ; Used for Quicklaunch or Taskbar as appropriate
-Var CheckboxShortcutInStartMenu
-Var CheckboxShortcutOnDesktop
+Var CheckboxShortcuts
Var CheckboxSendPing
Var CheckboxInstallMaintSvc
+Var DroplistArch
Var DirRequest
Var ButtonBrowse
Var LabelBlurb1
@@ -73,7 +72,6 @@ Var InstallStepSize
Var InstallTotalSteps
Var ProgressCompleted
Var ProgressTotal
-Var TmpVal
Var ExitCode
Var BasiliskLaunchCode
@@ -108,9 +106,13 @@ Var DownloadRetryCount
Var OpenedDownloadPage
Var DownloadServerIP
Var PostSigningData
+Var PreviousInstallDir
+Var PreviousInstallArch
Var ControlHeightPX
Var ControlRightPX
+Var ControlTopAdjustment
+Var OptionsItemWidthPX
; Uncomment the following to prevent pinging the metrics server when testing
; the stub installer
@@ -218,6 +220,9 @@ Var ControlRightPX
!define INVALID_HANDLE_VALUE -1
!endif
+!define DefaultInstDir32bit "$PROGRAMFILES32\${BrandFullName}"
+!define DefaultInstDir64bit "$PROGRAMFILES64\${BrandFullName}"
+
!include "nsDialogs.nsh"
!include "LogicLib.nsh"
!include "FileFunc.nsh"
@@ -230,6 +235,9 @@ Var ControlRightPX
!insertmacro LineFind
!insertmacro StrFilter
+!include "StrFunc.nsh"
+${StrTok}
+
!include "locales.nsi"
!include "branding.nsi"
@@ -243,8 +251,10 @@ Var ControlRightPX
; set the update channel to beta.
!ifdef OFFICIAL
!ifdef BETA_UPDATE_CHANNEL
-!undef URLStubDownload
-!define URLStubDownload "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-beta-latest"
+!undef URLStubDownload32
+!undef URLStubDownload64
+!define URLStubDownload32 "http://download.mozilla.org/?os=win&lang=${AB_CD}&product=firefox-beta-latest"
+!define URLStubDownload64 "http://download.mozilla.org/?os=win64&lang=${AB_CD}&product=firefox-beta-latest"
!undef URLManualDownload
!define URLManualDownload "https://www.mozilla.org/${AB_CD}/firefox/installer-help/?channel=beta&installer_lang=${AB_CD}"
!undef Channel
@@ -275,11 +285,6 @@ icon "setup.ico"
XPStyle on
BrandingText " "
ChangeUI all "nsisui.exe"
-!ifdef HAVE_64BIT_BUILD
- InstallDir "$PROGRAMFILES64\${BrandFullName}\"
-!else
- InstallDir "$PROGRAMFILES32\${BrandFullName}\"
-!endif
!ifdef ${AB_CD}_rtl
LoadLanguageFile "locale-rtl.nlf"
@@ -289,15 +294,10 @@ ChangeUI all "nsisui.exe"
!include "nsisstrings.nlf"
-!if "${AB_CD}" == "en-US"
- ; Custom strings for en-US. This is done here so they aren't translated.
- !include oneoff_en-US.nsh
-!else
- !define INTRO_BLURB "$(INTRO_BLURB1)"
- !define INSTALL_BLURB1 "$(INSTALL_BLURB1)"
- !define INSTALL_BLURB2 "$(INSTALL_BLURB2)"
- !define INSTALL_BLURB3 "$(INSTALL_BLURB3)"
-!endif
+!define INTRO_BLURB "$(INTRO_BLURB1)"
+!define INSTALL_BLURB1 "$(INSTALL_BLURB1)"
+!define INSTALL_BLURB2 "$(INSTALL_BLURB2)"
+!define INSTALL_BLURB3 "$(INSTALL_BLURB3)"
Caption "$(WIN_CAPTION)"
@@ -321,10 +321,8 @@ Function .onInit
; SSE2 instruction set is available.
System::Call "kernel32::IsProcessorFeaturePresent(i 10)i .R7"
-!ifdef HAVE_64BIT_BUILD
- ; Restrict x64 builds from being installed on x86 and pre Win7
- ${Unless} ${RunningX64}
- ${OrUnless} ${AtLeastWin7}
+ ; Windows NT 6.0 (Vista/Server 2008) and lower are not supported.
+ ${Unless} ${AtLeastWin7}
${If} "$R7" == "0"
strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
${Else}
@@ -335,51 +333,20 @@ Function .onInit
Quit
${EndUnless}
- SetRegView 64
-!else
- StrCpy $R8 "0"
- ${If} ${AtMostWin2000}
- StrCpy $R8 "1"
- ${EndIf}
-
- ${If} ${IsWinXP}
- ${AndIf} ${AtMostServicePack} 1
- StrCpy $R8 "1"
- ${EndIf}
-
- ${If} $R8 == "1"
- ; XXX-rstrong - some systems failed the AtLeastWin2000 test that we
- ; used to use for an unknown reason and likely fail the AtMostWin2000
- ; and possibly the IsWinXP test as well. To work around this also
- ; check if the Windows NT registry Key exists and if it does if the
- ; first char in CurrentVersion is equal to 3 (Windows NT 3.5 and
- ; 3.5.1), 4 (Windows NT 4), or 5 (Windows 2000 and Windows XP).
- StrCpy $R8 ""
- ClearErrors
- ReadRegStr $R8 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" "CurrentVersion"
- StrCpy $R8 "$R8" 1
- ${If} ${Errors}
- ${OrIf} "$R8" == "3"
- ${OrIf} "$R8" == "4"
- ${OrIf} "$R8" == "5"
- ${If} "$R7" == "0"
- strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_CPU_MSG)"
- ${Else}
- strCpy $R7 "$(WARN_MIN_SUPPORTED_OSVER_MSG)"
- ${EndIf}
- MessageBox MB_OKCANCEL|MB_ICONSTOP "$R7" IDCANCEL +2
- ExecShell "open" "${URLSystemRequirements}"
- Quit
- ${EndIf}
- ${EndUnless}
-!endif
-
+ ; SSE2 CPU support
${If} "$R7" == "0"
MessageBox MB_OKCANCEL|MB_ICONSTOP "$(WARN_MIN_SUPPORTED_CPU_MSG)" IDCANCEL +2
ExecShell "open" "${URLSystemRequirements}"
Quit
${EndIf}
+ ; Bug 1338583: disable 64-bit as default until Flash issues are resolved
+ ;${If} ${RunningX64}
+ ; StrCpy $INSTDIR "${DefaultInstDir64bit}"
+ ;${Else}
+ StrCpy $INSTDIR "${DefaultInstDir32bit}"
+ ;${EndIf}
+
; Require elevation if the user can elevate
${ElevateUAC}
@@ -391,16 +358,25 @@ Function .onInit
${EndIf}
!endif
+ ; If we have any existing installation, use its location as the default
+ ; path for this install, even if it's not the same architecture.
+ SetRegView 32
SetShellVarContext all ; Set SHCTX to HKLM
${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
${If} "$R9" == "false"
+ ${AndIf} ${RunningX64}
+ SetRegView 64
+ ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
+ ${EndIf}
+
+ ${If} "$R9" == "false"
SetShellVarContext current ; Set SHCTX to HKCU
${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
${If} ${RunningX64}
; In HKCU there is no WOW64 redirection, which means we may have gotten
- ; the path to a 32-bit install even though we're 64-bit, or vice-versa.
+ ; the path to a 32-bit install even though we're 64-bit.
; In that case, just use the default path instead of offering an upgrade.
; But only do that override if the existing install is in Program Files,
; because that's the only place we can be sure is specific
@@ -408,20 +384,36 @@ Function .onInit
; The WordFind syntax below searches for the first occurence of the
; "delimiter" (the Program Files path) in the install path and returns
; anything that appears before that. If nothing appears before that,
- ; then the install is under Program Files (32 or 64).
-!ifdef HAVE_64BIT_BUILD
+ ; then the install is under Program Files.
${WordFind} $R9 $PROGRAMFILES32 "+1{" $0
-!else
- ${WordFind} $R9 $PROGRAMFILES64 "+1{" $0
-!endif
${If} $0 == ""
StrCpy $R9 "false"
${EndIf}
${EndIf}
${EndIf}
+ StrCpy $PreviousInstallDir ""
+ StrCpy $PreviousInstallArch ""
${If} "$R9" != "false"
- StrCpy $INSTDIR "$R9"
+ ; Don't override the default install path with an existing installation
+ ; of a different architecture.
+ System::Call "*(i)p.r0"
+ StrCpy $1 "$R9\${FileMainEXE}"
+ System::Call "Kernel32::GetBinaryTypeW(w r1, p r0)i"
+ System::Call "*$0(i.r2)"
+ System::Free $0
+
+ ${If} $2 == "6" ; 6 == SCS_64BIT_BINARY
+ ${AndIf} ${RunningX64}
+ StrCpy $PreviousInstallDir "$R9"
+ StrCpy $PreviousInstallArch "64"
+ StrCpy $INSTDIR "$PreviousInstallDir"
+ ${ElseIf} $2 == "0" ; 0 == SCS_32BIT_BINARY
+ ${AndIfNot} ${RunningX64}
+ StrCpy $PreviousInstallDir "$R9"
+ StrCpy $PreviousInstallArch "32"
+ StrCpy $INSTDIR "$PreviousInstallDir"
+ ${EndIf}
${EndIf}
; Used to determine if the default installation directory was used.
@@ -458,9 +450,7 @@ Function .onInit
StrCpy $InitialInstallRequirementsCode ""
StrCpy $IsDownloadFinished ""
StrCpy $BasiliskLaunchCode "0"
- StrCpy $CheckboxShortcutOnBar "1"
- StrCpy $CheckboxShortcutInStartMenu "1"
- StrCpy $CheckboxShortcutOnDesktop "1"
+ StrCpy $CheckboxShortcuts "1"
StrCpy $CheckboxSendPing "1"
!ifdef MOZ_MAINTENANCE_SERVICE
StrCpy $CheckboxInstallMaintSvc "1"
@@ -468,6 +458,12 @@ Function .onInit
StrCpy $CheckboxInstallMaintSvc "0"
!endif
StrCpy $WasOptionsButtonClicked "0"
+ ; Bug 1338583: disable 64-bit as default until Flash issues are resolved
+ ;${If} ${RunningX64}
+ ;StrCpy $DroplistArch "$(VERSION_64BIT)"
+ ;${Else}
+ StrCpy $DroplistArch "$(VERSION_32BIT)"
+ ;${EndIf}
StrCpy $0 ""
!ifdef FONT_FILE1
@@ -611,11 +607,11 @@ Function SendPing
; completion of all phases.
${GetSecondsElapsed} "$EndInstallPhaseTickCount" "$EndFinishPhaseTickCount" $4
-!ifdef HAVE_64BIT_BUILD
- StrCpy $R0 "1"
-!else
- StrCpy $R0 "0"
-!endif
+ ${If} $DroplistArch == "$(VERSION_64BIT)"
+ StrCpy $R0 "1"
+ ${Else}
+ StrCpy $R0 "0"
+ ${EndIf}
${If} ${RunningX64}
StrCpy $R1 "1"
@@ -932,6 +928,17 @@ Function createOptions
${EndIf}
StrCpy $ExistingTopDir ""
+ StrCpy $ControlTopAdjustment 0
+
+ ; Convert the options item width to pixels, so we can tell when a text string
+ ; exceeds this width and needs multiple lines.
+ StrCpy $2 "${OPTIONS_ITEM_WIDTH_DU}" -1
+ IntOp $2 $2 - 14 ; subtract approximate width of a checkbox
+ System::Call "*(i r2,i,i,i) p .r3"
+ System::Call "user32::MapDialogRect(p $HWNDPARENT, p r3)"
+ System::Call "*$3(i .s,i,i,i)"
+ Pop $OptionsItemWidthPX
+ System::Free $3
nsDialogs::Create /NOUNLOAD 1018
Pop $Dialog
@@ -939,54 +946,13 @@ Function createOptions
; background colors of the Dialog must also be hardcoded.
SetCtlColors $Dialog ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 18u ${OPTIONS_ITEM_WIDTH_DU} \
- 12u "$(CREATE_SHORTCUTS)"
- Pop $0
- SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $0 ${WM_SETFONT} $FontNormal 0
-
- ${If} ${AtLeastWin7}
- StrCpy $0 "$(ADD_SC_TASKBAR)"
- ${Else}
- StrCpy $0 "$(ADD_SC_QUICKLAUNCHBAR)"
- ${EndIf}
- ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 38u \
- ${OPTIONS_SUBITEM_WIDTH_DU} 12u "$0"
- Pop $CheckboxShortcutOnBar
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutOnBar, w " ", w " ")'
- SetCtlColors $CheckboxShortcutOnBar ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxShortcutOnBar ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxShortcutOnBar
-
- ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 54u ${OPTIONS_SUBITEM_WIDTH_DU} \
- 12u "$(ADD_CheckboxShortcutInStartMenu)"
- Pop $CheckboxShortcutInStartMenu
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutInStartMenu, w " ", w " ")'
- SetCtlColors $CheckboxShortcutInStartMenu ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxShortcutInStartMenu ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxShortcutInStartMenu
-
- ${NSD_CreateCheckbox} ${OPTIONS_SUBITEM_EDGE_DU} 70u ${OPTIONS_SUBITEM_WIDTH_DU} \
- 12u "$(ADD_CheckboxShortcutOnDesktop)"
- Pop $CheckboxShortcutOnDesktop
- ; The uxtheme must be disabled on checkboxes in order to override the system
- ; font color.
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcutOnDesktop, w " ", w " ")'
- SetCtlColors $CheckboxShortcutOnDesktop ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxShortcutOnDesktop ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxShortcutOnDesktop
-
- ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 100u ${OPTIONS_ITEM_WIDTH_DU} \
+ ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} 25u ${OPTIONS_ITEM_WIDTH_DU} \
12u "$(DEST_FOLDER)"
Pop $0
SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
SendMessage $0 ${WM_SETFONT} $FontNormal 0
- ${NSD_CreateDirRequest} ${OPTIONS_SUBITEM_EDGE_DU} 116u 159u 14u "$INSTDIR"
+ ${NSD_CreateDirRequest} ${OPTIONS_SUBITEM_EDGE_DU} 41u 159u 14u "$INSTDIR"
Pop $DirRequest
SetCtlColors $DirRequest ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
SendMessage $DirRequest ${WM_SETFONT} $FontNormal 0
@@ -1002,7 +968,7 @@ Function createOptions
${NSD_AddExStyle} $DirRequest ${WS_EX_LTRREADING}|${WS_EX_LEFT}
!endif
- ${NSD_CreateBrowseButton} 280u 116u 50u 14u "$(BROWSE_BUTTON)"
+ ${NSD_CreateBrowseButton} 280u 41u 50u 14u "$(BROWSE_BUTTON)"
Pop $ButtonBrowse
SetCtlColors $ButtonBrowse "" ${COMMON_BKGRD_COLOR}
${NSD_OnClick} $ButtonBrowse OnClick_ButtonBrowse
@@ -1023,13 +989,13 @@ Function createOptions
IntOp $0 $0 + 8 ; Add padding to the control's width
; Make both controls the same width as the widest control
- ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 134u $0 $ControlHeightPX "$(SPACE_REQUIRED)"
+ ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 59u $0 $ControlHeightPX "$(SPACE_REQUIRED)"
Pop $5
SetCtlColors $5 ${COMMON_TEXT_COLOR_FADED} ${COMMON_BKGRD_COLOR}
SendMessage $5 ${WM_SETFONT} $FontItalic 0
IntOp $2 $2 + 8 ; Add padding to the control's width
- ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 145u $2 $ControlHeightPX "$(SPACE_AVAILABLE)"
+ ${NSD_CreateLabelCenter} ${OPTIONS_SUBITEM_EDGE_DU} 70u $2 $ControlHeightPX "$(SPACE_AVAILABLE)"
Pop $6
SetCtlColors $6 ${COMMON_TEXT_COLOR_FADED} ${COMMON_BKGRD_COLOR}
SendMessage $6 ${WM_SETFONT} $FontItalic 0
@@ -1043,7 +1009,7 @@ Function createOptions
IntOp $ControlRightPX $ControlRightPX + 6
- ${NSD_CreateLabel} $ControlRightPX 134u 100% $ControlHeightPX \
+ ${NSD_CreateLabel} $ControlRightPX 59u 100% $ControlHeightPX \
"${APPROXIMATE_REQUIRED_SPACE_MB} $(MEGA)$(BYTE)"
Pop $7
SetCtlColors $7 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
@@ -1051,15 +1017,54 @@ Function createOptions
; Create the free space label with an empty string and update it by calling
; UpdateFreeSpaceLabel
- ${NSD_CreateLabel} $ControlRightPX 145u 100% $ControlHeightPX " "
+ ${NSD_CreateLabel} $ControlRightPX 70u 100% $ControlHeightPX " "
Pop $LabelFreeSpace
SetCtlColors $LabelFreeSpace ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
SendMessage $LabelFreeSpace ${WM_SETFONT} $FontNormal 0
Call UpdateFreeSpaceLabel
- ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 168u ${OPTIONS_SUBITEM_WIDTH_DU} \
- 12u "$(SEND_PING)"
+ ${If} ${AtLeastWin7}
+ StrCpy $0 "$(ADD_SC_DESKTOP_TASKBAR)"
+ ${Else}
+ StrCpy $0 "$(ADD_SC_DESKTOP_QUICKLAUNCHBAR)"
+ ${EndIf}
+
+ ; In some locales, this string may be too long to fit on one line.
+ ; In that case, we'll need to give the control two lines worth of height.
+ StrCpy $1 12 ; single line height
+ ${GetTextExtent} $0 $FontNormal $R1 $R2
+ ${If} $R1 > $OptionsItemWidthPX
+ ; Add a second line to the control height.
+ IntOp $1 $1 + 12
+ ; The rest of the controls will have to be lower to account for this label
+ ; needing two lines worth of height.
+ IntOp $ControlTopAdjustment $ControlTopAdjustment + 12
+ ${EndIf}
+ ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} 100u \
+ ${OPTIONS_ITEM_WIDTH_DU} "$1u" "$0"
+ Pop $CheckboxShortcuts
+ ; The uxtheme must be disabled on checkboxes in order to override the system
+ ; font color.
+ System::Call 'uxtheme::SetWindowTheme(i $CheckboxShortcuts, w " ", w " ")'
+ SetCtlColors $CheckboxShortcuts ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+ SendMessage $CheckboxShortcuts ${WM_SETFONT} $FontNormal 0
+ ${NSD_Check} $CheckboxShortcuts
+
+ IntOp $0 116 + $ControlTopAdjustment
+ ; In some locales, this string may be too long to fit on one line.
+ ; In that case, we'll need to give the control two lines worth of height.
+ StrCpy $1 12 ; single line height
+ ${GetTextExtent} "$(SEND_PING)" $FontNormal $R1 $R2
+ ${If} $R1 > $OptionsItemWidthPX
+ ; Add a second line to the control height.
+ IntOp $1 $1 + 12
+ ; The rest of the controls will have to be lower to account for this label
+ ; needing two lines worth of height.
+ IntOp $ControlTopAdjustment $ControlTopAdjustment + 12
+ ${EndIf}
+ ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} "$0u" ${OPTIONS_ITEM_WIDTH_DU} \
+ "$1u" "$(SEND_PING)"
Pop $CheckboxSendPing
; The uxtheme must be disabled on checkboxes in order to override the system
; font color.
@@ -1069,6 +1074,7 @@ Function createOptions
${NSD_Check} $CheckboxSendPing
!ifdef MOZ_MAINTENANCE_SERVICE
+ StrCpy $CheckboxInstallMaintSvc "0"
; We can only install the maintenance service if the user is an admin.
Call IsUserAdmin
Pop $0
@@ -1081,31 +1087,105 @@ Function createOptions
StrCpy $0 "false"
${EndIf}
- ; Only show the maintenance service checkbox if we have write access to HKLM
- ClearErrors
- WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
- "Write Test"
- ${If} ${Errors}
- ${OrIf} $0 != "true"
- StrCpy $CheckboxInstallMaintSvc "0"
- ${Else}
+ ${If} $0 == "true"
+ ; Only show the maintenance service checkbox if we have write access to HKLM
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_EDGE_DU} 184u ${OPTIONS_ITEM_WIDTH_DU} \
- 12u "$(INSTALL_MAINT_SERVICE)"
- Pop $CheckboxInstallMaintSvc
- System::Call 'uxtheme::SetWindowTheme(i $CheckboxInstallMaintSvc, w " ", w " ")'
- SetCtlColors $CheckboxInstallMaintSvc ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
- SendMessage $CheckboxInstallMaintSvc ${WM_SETFONT} $FontNormal 0
- ${NSD_Check} $CheckboxInstallMaintSvc
+ WriteRegStr HKLM "Software\Mozilla" "${BrandShortName}InstallerTest" \
+ "Write Test"
+ ${IfNot} ${Errors}
+ 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}
+ IntOp $0 132 + $ControlTopAdjustment
+ ; In some locales, this string may be too long to fit on one line.
+ ; In that case, we'll need to give the control two lines worth of height.
+ StrCpy $1 12 ; single line height
+ ${GetTextExtent} "$(INSTALL_MAINT_SERVICE)" $FontNormal $R1 $R2
+ ${If} $R1 > $OptionsItemWidthPX
+ ; Add a second line to the control height.
+ IntOp $1 $1 + 12
+ ; The rest of the controls will have to be lower to account for this label
+ ; needing two lines worth of height.
+ IntOp $ControlTopAdjustment $ControlTopAdjustment + 12
+ ${EndIf}
+ ${NSD_CreateCheckbox} ${OPTIONS_ITEM_EDGE_DU} "$0u" ${OPTIONS_ITEM_WIDTH_DU} \
+ "$1u" "$(INSTALL_MAINT_SERVICE)"
+ Pop $CheckboxInstallMaintSvc
+ System::Call 'uxtheme::SetWindowTheme(i $CheckboxInstallMaintSvc, w " ", w " ")'
+ SetCtlColors $CheckboxInstallMaintSvc ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+ SendMessage $CheckboxInstallMaintSvc ${WM_SETFONT} $FontNormal 0
+ ${NSD_Check} $CheckboxInstallMaintSvc
+ ; Since we're adding in an optional control, remember the lower the ones
+ ; that come after it.
+ IntOp $ControlTopAdjustment 20 + $ControlTopAdjustment
+ ${EndIf}
${EndIf}
${EndIf}
!endif
+ ${If} ${RunningX64}
+ ; Get the exact pixel width we're going to need for this label.
+ ; The label string has a keyboard accelerator, which is an '&' that's in
+ ; the string but is not rendered, and GetTextExtent doesn't account for
+ ; those, so remove them first. Also handle any escaped &'s ("&&").
+ StrCpy $R0 "$(ARCH_DROPLIST_LABEL)"
+ StrCpy $R1 ""
+ ${Do}
+ ${StrTok} $R2 $R0 "&" 0 0
+ StrCpy $R1 "$R1$R2"
+ StrLen $R3 $R2
+ IntOp $R3 $R3 + 1
+ StrCpy $R0 $R0 "" $R3
+ StrCpy $R4 $R0 1
+ ${If} $R4 == "&"
+ StrCpy $R1 "$R1&"
+ StrCpy $R0 $R0 "" 1
+ ${EndIf}
+ ${LoopUntil} $R0 == ""
+
+ ${GetTextExtent} $R1 $FontNormal $R0 $R1
+ IntOp $0 134 + $ControlTopAdjustment
+ ${NSD_CreateLabel} ${OPTIONS_ITEM_EDGE_DU} "$0u" $R0 $R1 "$(ARCH_DROPLIST_LABEL)"
+ Pop $0
+ SetCtlColors $0 ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+ SendMessage $0 ${WM_SETFONT} $FontNormal 0
+
+ ; Set the dropdown list size to the same as the larger of the two options.
+ ${GetTextExtent} "$(VERSION_32BIT)" $FontNormal $R0 $R1
+ ${GetTextExtent} "$(VERSION_64BIT)" $FontNormal $R2 $R3
+ ${If} $R0 < $R2
+ StrCpy $R0 $R2
+ ${EndIf}
+ ${If} $R1 < $R3
+ StrCpy $R3 $R1
+ ${EndIf}
+ ; Add enough width for the dropdown button. How wide the button is depends
+ ; on he system display scaling setting, which we cannot easily determine,
+ ; so just use a value that works fine for a setting of 200% and adds a
+ ; little too much padding for settings below that.
+ IntOp $R0 $R0 + 56
+
+ ; Put the droplist right after the label, with some padding.
+ ${GetDlgItemEndPX} $0 $ControlRightPX
+ IntOp $ControlRightPX $ControlRightPX + 4
+ IntOp $0 132 + $ControlTopAdjustment
+ ${NSD_CreateDropList} $ControlRightPX "$0u" $R0 $R3 ""
+ Pop $DroplistArch
+ ${NSD_CB_AddString} $DroplistArch "$(VERSION_32BIT)"
+ ${NSD_CB_AddString} $DroplistArch "$(VERSION_64BIT)"
+ ${NSD_OnChange} $DroplistArch OnChange_DroplistArch
+ ; The uxtheme must be disabled in order to override the system colors.
+ System::Call 'uxtheme::SetWindowTheme(i $DroplistArch, w " ", w " ")'
+ SetCtlColors $DroplistArch ${COMMON_TEXT_COLOR_NORMAL} ${COMMON_BKGRD_COLOR}
+ SendMessage $DroplistArch ${WM_SETFONT} $FontNormal 0
+ ; Bug 1338583: disable 64-bit as default until Flash issues are resolved
+ ${NSD_CB_SelectString} $DroplistArch "$(VERSION_32BIT)"
+ ${EndIf}
+
GetDlgItem $0 $HWNDPARENT 1 ; Install button
${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
SendMessage $0 ${WM_SETTEXT} 0 "STR:$(UPGRADE_BUTTON)"
@@ -1173,9 +1253,8 @@ Function leaveOptions
IntOp $OptionsPhaseSeconds $OptionsPhaseSeconds + 1
${EndIf}
- ${NSD_GetState} $CheckboxShortcutOnBar $CheckboxShortcutOnBar
- ${NSD_GetState} $CheckboxShortcutInStartMenu $CheckboxShortcutInStartMenu
- ${NSD_GetState} $CheckboxShortcutOnDesktop $CheckboxShortcutOnDesktop
+ ${NSD_GetState} $CheckboxShortcuts $CheckboxShortcuts
+ ${NSD_GetText} $DroplistArch $DroplistArch
${NSD_GetState} $CheckboxSendPing $CheckboxSendPing
!ifdef MOZ_MAINTENANCE_SERVICE
${NSD_GetState} $CheckboxInstallMaintSvc $CheckboxInstallMaintSvc
@@ -1370,8 +1449,15 @@ FunctionEnd
Function StartDownload
${NSD_KillTimer} StartDownload
- InetBgDL::Get "${URLStubDownload}${URLStubDownloadAppend}" "$PLUGINSDIR\download.exe" \
- /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
+ ${If} $DroplistArch == "$(VERSION_64BIT)"
+ InetBgDL::Get "${URLStubDownload64}${URLStubDownloadAppend}" \
+ "$PLUGINSDIR\download.exe" \
+ /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
+ ${Else}
+ InetBgDL::Get "${URLStubDownload32}${URLStubDownloadAppend}" \
+ "$PLUGINSDIR\download.exe" \
+ /CONNECTTIMEOUT 120 /RECEIVETIMEOUT 120 /END
+ ${EndIf}
StrCpy $4 ""
${NSD_CreateTimer} OnDownload ${DownloadIntervalMS}
${If} ${FileExists} "$INSTDIR\${TO_BE_DELETED}"
@@ -1592,23 +1678,18 @@ Function OnDownload
; Don't create the QuickLaunch or Taskbar shortcut from the launched installer
WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "QuickLaunchShortcut" "false"
- ; Either avoid or force adding a taskbar pin based on the checkbox value:
- ${If} $CheckboxShortcutOnBar == 0
+ ; Always create a start menu shortcut, so the user always has some way
+ ; to access the application.
+ WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "true"
+
+ ; Either avoid or force adding a taskbar pin and desktop shortcut
+ ; based on the checkbox value.
+ ${If} $CheckboxShortcuts == 0
WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "TaskbarShortcut" "false"
+ WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "false"
${Else}
WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "TaskbarShortcut" "true"
- ${EndIf}
-
- ${If} $CheckboxShortcutOnDesktop == 1
WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "true"
- ${Else}
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "DesktopShortcut" "false"
- ${EndIf}
-
- ${If} $CheckboxShortcutInStartMenu == 1
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "true"
- ${Else}
- WriteINIStr "$PLUGINSDIR\${CONFIG_INI}" "Install" "StartMenuShortcuts" "false"
${EndIf}
!ifdef MOZ_MAINTENANCE_SERVICE
@@ -1785,7 +1866,7 @@ Function FinishInstall
${EndIf}
${EndIf}
- ${If} $CheckboxShortcutOnBar == 1
+ ${If} $CheckboxShortcuts == 1
${If} ${AtMostWinVista}
ClearErrors
${GetParameters} $0
@@ -1921,6 +2002,30 @@ Function OnClick_ButtonBrowse
${EndIf}
FunctionEnd
+Function OnChange_DroplistArch
+ ; When the user changes the 32/64-bit setting, change the default install path
+ ; to use the correct version of Program Files. But only do that if the user
+ ; hasn't selected their own install path yet, and if we didn't select our
+ ; default as the location of an existing install.
+ ${If} $INSTDIR == $InitialInstallDir
+ ${NSD_GetText} $DroplistArch $0
+ ${If} $0 == "$(VERSION_32BIT)"
+ ${If} $PreviousInstallArch == 32
+ StrCpy $InitialInstallDir $PreviousInstallDir
+ ${Else}
+ StrCpy $InitialInstallDir "${DefaultInstDir32bit}"
+ ${EndIf}
+ ${Else}
+ ${If} $PreviousInstallArch == 64
+ StrCpy $InitialInstallDir $PreviousInstallDir
+ ${Else}
+ StrCpy $InitialInstallDir "${DefaultInstDir64bit}"
+ ${EndIf}
+ ${EndIf}
+ ${NSD_SetText} $DirRequest $InitialInstallDir
+ ${EndIf}
+FunctionEnd
+
Function CheckSpace
${If} "$ExistingTopDir" != ""
StrLen $0 "$ExistingTopDir"
@@ -1985,6 +2090,7 @@ Function CanWrite
GetTempFileName $2 "$0"
Delete $2
CreateDirectory "$2"
+
${If} ${FileExists} "$2"
${If} ${FileExists} "$INSTDIR"
GetTempFileName $3 "$INSTDIR"
diff --git a/browser/installer/windows/nsis/uninstaller.nsi b/browser/installer/windows/nsis/uninstaller.nsi
index 687bcd6eb..87f4d838a 100755
--- a/browser/installer/windows/nsis/uninstaller.nsi
+++ b/browser/installer/windows/nsis/uninstaller.nsi
@@ -351,7 +351,7 @@ Section "Uninstall"
StrCpy $0 "Software\Microsoft\MediaPlayer\ShimInclusionList\plugin-container.exe"
DeleteRegKey HKLM "$0"
DeleteRegKey HKCU "$0"
- StrCpy $0 "Software\Classes\MIME\Database\Content Type\application/x-xpinstall;app=firefox"
+ StrCpy $0 "Software\Classes\MIME\Database\Content Type\application/x-xpinstall;app=Basilisk"
DeleteRegKey HKLM "$0"
DeleteRegKey HKCU "$0"
${Else}
@@ -419,8 +419,8 @@ Section "Uninstall"
; Remove the installation directory if it is empty
RmDir "$INSTDIR"
- ; If firefox.exe was successfully deleted yet we still need to restart to
- ; remove other files create a dummy firefox.exe.moz-delete to prevent the
+ ; If Basilisk.exe was successfully deleted yet we still need to restart to
+ ; remove other files create a dummy Basilisk.exe.moz-delete to prevent the
; installer from allowing an install without restart when it is required
; to complete an uninstall.
${If} ${RebootFlag}