Skip to content
Snippets Groups Projects
Commit 510e1016 authored by Callum Prentice's avatar Callum Prentice
Browse files

fix for MAINT-6998 64bit viewer installs to Program Files (x86) by default. -...

 fix for MAINT-6998 64bit viewer installs to Program Files (x86) by default. - this change also fixes MAINT-5365 Windows viewer uninstall icon is system default not SL logo
parent cb07ca35
No related branches found
No related tags found
No related merge requests found
...@@ -90,8 +90,11 @@ InstProgressFlags smooth colored # New colored smooth look ...@@ -90,8 +90,11 @@ InstProgressFlags smooth colored # New colored smooth look
SetOverwrite on # Overwrite files by default SetOverwrite on # Overwrite files by default
AutoCloseWindow true # After all files install, close window AutoCloseWindow true # After all files install, close window
InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" # initial location of install (default when not already installed)
InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" # note: Now we defer looking for existing install until onInit when we
# are able to engage the 32/64 registry function
InstallDir "%%PROGRAMFILES%%\${INSTNAME}"
UninstallText $(UninstallTextMsg) UninstallText $(UninstallTextMsg)
DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup)
Page directory dirPre Page directory dirPre
...@@ -118,6 +121,8 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation ...@@ -118,6 +121,8 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation
!insertmacro GetParameters !insertmacro GetParameters
!insertmacro GetOptions !insertmacro GetOptions
!include WinVer.nsh # For OS and SP detection !include WinVer.nsh # For OS and SP detection
!include 'LogicLib.nsh' # for value comparison
!include "x64.nsh" # for 64bit detection
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Pre-directory page callback ;; Pre-directory page callback
...@@ -136,7 +141,21 @@ FunctionEnd ...@@ -136,7 +141,21 @@ FunctionEnd
;; entry to the language ID selector below ;; entry to the language ID selector below
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function .onInit Function .onInit
%%ENGAGEREGISTRY%% %%ENGAGEREGISTRY%%
# read the current location of the install for this version
# if $0 is empty, this is the first time for this viewer name
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\\Linden Research, Inc.\\${INSTNAME}" ""
# viewer with this name not installed before
${If} $0 == ""
# nothing to do here
${Else}
# use the value we got from registry as install location
StrCpy $INSTDIR $0
${EndIf}
Call CheckCPUFlags # Make sure we have SSE2 support Call CheckCPUFlags # Make sure we have SSE2 support
Call CheckWindowsVersion # Don't install On unsupported systems Call CheckWindowsVersion # Don't install On unsupported systems
Push $0 Push $0
...@@ -195,7 +214,9 @@ FunctionEnd ...@@ -195,7 +214,9 @@ FunctionEnd
;; Prep Uninstaller Section ;; Prep Uninstaller Section
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.onInit Function un.onInit
%%ENGAGEREGISTRY%% %%ENGAGEREGISTRY%%
# Read language from registry and set for uninstaller. Key will be removed on successful uninstall # Read language from registry and set for uninstaller. Key will be removed on successful uninstall
ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage"
IfErrors lbl_end IfErrors lbl_end
...@@ -320,6 +341,10 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst ...@@ -320,6 +341,10 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayVersion" "${VERSION_LONG}"
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB
# from FS:Ansariel
WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayIcon" '"$INSTDIR\$INSTEXE"'
# BUG-2707 Disable SEHOP for installed viewer. # BUG-2707 Disable SEHOP for installed viewer.
WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1
...@@ -561,7 +586,7 @@ FunctionEnd ...@@ -561,7 +586,7 @@ FunctionEnd
Function RemoveProgFilesOnInst Function RemoveProgFilesOnInst
# Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575 # Remove old SecondLife.exe to invalidate any old shortcuts to it that may be in non-standard locations. See MAINT-3575
Delete "$INSTDIR\SecondLife.exe" Delete "$INSTDIR\$INSTEXE"
# Remove old shader files first so fallbacks will work. See DEV-5663 # Remove old shader files first so fallbacks will work. See DEV-5663
RMDir /r "$INSTDIR\app_settings\shaders" RMDir /r "$INSTDIR\app_settings\shaders"
......
...@@ -648,7 +648,7 @@ def package_finish(self): ...@@ -648,7 +648,7 @@ def package_finish(self):
"%%SOURCE%%":self.get_src_prefix(), "%%SOURCE%%":self.get_src_prefix(),
"%%INST_VARS%%":inst_vars_template % substitution_strings, "%%INST_VARS%%":inst_vars_template % substitution_strings,
"%%INSTALL_FILES%%":self.nsi_file_commands(True), "%%INSTALL_FILES%%":self.nsi_file_commands(True),
"%%$PROGRAMFILES%%":program_files, "%%PROGRAMFILES%%":program_files,
"%%ENGAGEREGISTRY%%":engage_registry, "%%ENGAGEREGISTRY%%":engage_registry,
"%%DELETE_FILES%%":self.nsi_file_commands(False)}) "%%DELETE_FILES%%":self.nsi_file_commands(False)})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment