From 10bcd510b59fe73bf9e948de3dce9cea6d7d8b93 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Fri, 10 Mar 2017 15:11:44 -0800 Subject: MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 89317f2793..42f8e0ce1f 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -90,7 +90,7 @@ InstProgressFlags smooth colored # New colored smooth look SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window -InstallDir "$PROGRAMFILES\${INSTNAME}" +InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) -- cgit v1.2.3 From 1053c5ca407917c3bc842cbcb80786d43206c5b3 Mon Sep 17 00:00:00 2001 From: "callum@lindenlab.com" Date: Sat, 11 Mar 2017 16:15:37 -0800 Subject: Update: (thanks Drake) MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. Added option to engage 32 or 64 bit registry --- indra/newview/installers/windows/installer_template.nsi | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 42f8e0ce1f..7a135fa53c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -91,6 +91,7 @@ SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" +%%REGISTRY%% InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) -- cgit v1.2.3 From 656457e79b47cf1dd7c34bee1e0ab98ec759f634 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Sat, 11 Mar 2017 18:01:43 -0800 Subject: MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. (Update: call to select registry needs to be inside a function) --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 7a135fa53c..a266156a47 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -91,7 +91,6 @@ SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" -%%REGISTRY%% InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) @@ -137,6 +136,7 @@ FunctionEnd ;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit +%%ENGAGEREGISTRY%% Call CheckCPUFlags # Make sure we have SSE2 support Call CheckWindowsVersion # Don't install On unsupported systems Push $0 -- cgit v1.2.3 From 17c8eadb3d89bc78019f0b50eb8b109f25616781 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Sun, 12 Mar 2017 10:09:34 -0700 Subject: MAINT-6998 [Project Alex Ivy] 64bit viewer installs to Program Files (x86) by default. (Update2: evidently the registry set call is needed on un.init() too --- indra/newview/installers/windows/installer_template.nsi | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index a266156a47..eb07b54d8d 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -195,6 +195,7 @@ FunctionEnd ;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit +%%ENGAGEREGISTRY%% # 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" IfErrors lbl_end -- cgit v1.2.3 From 510e101627970c62a479ec01d26a26124c9c7991 Mon Sep 17 00:00:00 2001 From: Callum Prentice Date: Thu, 30 Mar 2017 17:36:33 -0700 Subject: 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 --- .../installers/windows/installer_template.nsi | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'indra/newview/installers/windows') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index eb07b54d8d..71a33a0dc0 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -90,8 +90,11 @@ InstProgressFlags smooth colored # New colored smooth look SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window -InstallDir "%%$PROGRAMFILES%%\${INSTNAME}" -InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" +# initial location of install (default when not already installed) +# 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) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) Page directory dirPre @@ -118,6 +121,8 @@ Var DO_UNINSTALL_V2 # If non-null, path to a previous Viewer 2 installation !insertmacro GetParameters !insertmacro GetOptions !include WinVer.nsh # For OS and SP detection +!include 'LogicLib.nsh' # for value comparison +!include "x64.nsh" # for 64bit detection ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Pre-directory page callback @@ -136,7 +141,21 @@ FunctionEnd ;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit + %%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 CheckWindowsVersion # Don't install On unsupported systems Push $0 @@ -195,7 +214,9 @@ FunctionEnd ;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit + %%ENGAGEREGISTRY%% + # 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" IfErrors lbl_end @@ -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" "DisplayVersion" "${VERSION_LONG}" 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. WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" "DisableExceptionChainValidation" 1 @@ -561,7 +586,7 @@ FunctionEnd Function RemoveProgFilesOnInst # 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 RMDir /r "$INSTDIR\app_settings\shaders" -- cgit v1.2.3