From c1951b49a6e6f625a4b5894313f98f57443b94c8 Mon Sep 17 00:00:00 2001 From: "coyot@coyot-sager-PC" Date: Thu, 7 Apr 2016 16:04:24 +0100 Subject: SL-321: Changes for VMP Windows Prototype --- indra/newview/installers/windows/installer_template.nsi | 10 +++++----- 1 file changed, 5 insertions(+), 5 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 b8677fd9e4..d833af8742 100755 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -276,7 +276,7 @@ StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico" WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ @@ -294,15 +294,15 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ # Other shortcuts SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico" CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico" CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' -# Create *.bat file to specify lang params on first run from installer - see MAINT-5259 +# Create *.bat file to specify lang params on first run from installer - see MAINT-5259S FileOpen $9 "$INSTDIR\autorun.bat" w -FileWrite $9 'start "$INSTDIR\$INSTEXE" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n' +FileWrite $9 'start "$INSTDIR\$INSTEXE" /d "$INSTDIR" "$INSTDIR\$INSTEXE" $SHORTCUT_LANG_PARAM$\r$\n' FileClose $9 # Write registry -- cgit v1.2.3 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 From 24b4d3c13f15917f8c775d5b4211d213af9309c0 Mon Sep 17 00:00:00 2001 From: "coyot@coyot-sager-PC" Date: Fri, 28 Apr 2017 01:09:14 +0100 Subject: SL-671: make icon point to launcher, not viewer --- indra/newview/installers/windows/installer_template.nsi | 4 ++++ 1 file changed, 4 insertions(+) (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 fe1b35767e..4396a576cc 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -337,6 +337,10 @@ WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$ # URL param must be last item passed to viewer, it ignores subsequent params to avoid parameter injection attacks. WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' +# Only allow Launcher to be the icon +WriteRegStr HKEY_CLASSES_ROOT "Applications" "$INSTEXE" "IsHostApp" +WriteRegStr HKEY_CLASSES_ROOT "Applications" "$VIEWER_EXE" "NoStartPage" + # Write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" -- cgit v1.2.3 From a67d449813a9b6c6198ed15ad15d30535344051e Mon Sep 17 00:00:00 2001 From: "coyot@coyot-sager-PC" Date: Fri, 28 Apr 2017 20:04:32 +0100 Subject: SL-617: pass final_exe from viewer manifest to NSIS as VIEWER_EXE --- 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 4396a576cc..682c37971c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -102,6 +102,7 @@ Page instfiles ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Var INSTPROG Var INSTEXE +Var VIEWER_EXE Var INSTSHORTCUT Var COMMANDLINE # Command line passed to this installer, set in .onInit Var SHORTCUT_LANG_PARAM # "--set InstallLanguage de", Passes language to viewer -- cgit v1.2.3 From b7b07b04148dfc0ef555a6bf6148d982ea671ecc Mon Sep 17 00:00:00 2001 From: "coyot@coyot-sager-PC.hsd1.ca.comcast.net" Date: Mon, 1 May 2017 18:57:06 +0100 Subject: SL-617: fix registry path --- indra/newview/installers/windows/installer_template.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 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 682c37971c..c8c2d49ecb 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -339,8 +339,8 @@ WriteRegStr HKEY_CLASSES_ROOT "x-grid-location-info\DefaultIcon" "" '"$INSTDIR\$ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" '"$INSTDIR\$INSTEXE" -url "%1"' # Only allow Launcher to be the icon -WriteRegStr HKEY_CLASSES_ROOT "Applications" "$INSTEXE" "IsHostApp" -WriteRegStr HKEY_CLASSES_ROOT "Applications" "$VIEWER_EXE" "NoStartPage" +WriteRegStr HKEY_CLASSES_ROOT "Applications\$INSTEXE" "IsHostApp" "" +WriteRegStr HKEY_CLASSES_ROOT "Applications\$VIEWER_EXE" "NoStartPage" "" # Write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" -- cgit v1.2.3 From e1253f1a8c28409834c1ddaf69b24dc02a3551ce Mon Sep 17 00:00:00 2001 From: "coyot@coyot-sager-PC.hsd1.ca.comcast.net" Date: Tue, 2 May 2017 21:18:57 +0100 Subject: SL-617: use the braces, Luke! --- 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 c8c2d49ecb..bb7e15bcf6 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -340,7 +340,7 @@ WriteRegExpandStr HKEY_CLASSES_ROOT "x-grid-location-info\shell\open\command" "" # Only allow Launcher to be the icon WriteRegStr HKEY_CLASSES_ROOT "Applications\$INSTEXE" "IsHostApp" "" -WriteRegStr HKEY_CLASSES_ROOT "Applications\$VIEWER_EXE" "NoStartPage" "" +WriteRegStr HKEY_CLASSES_ROOT "Applications\${VIEWER_EXE}" "NoStartPage" "" # Write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" -- cgit v1.2.3 From a31aecc730733b3f20eac4a6ae18b27e6676afe0 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Wed, 17 May 2017 16:12:18 -0700 Subject: nerf launch from NSIS --- indra/newview/installers/windows/installer_template.nsi | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 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 1377cd7f21..0481c029ac 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -727,15 +727,15 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; After install completes, launch app ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function .onInstSuccess -Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. - Push $R0 # Option value, unused - StrCmp $SKIP_AUTORUN "true" +2; +# Function .onInstSuccess +# Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. +# Push $R0 # Option value, unused# +# StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR - Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"' - Pop $R0 - -FunctionEnd +# Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"' +# Pop $R0 +# +# FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present -- cgit v1.2.3 From faf237e60c66573b1293fd3e9f957ff56cca30ed Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Fri, 23 Jun 2017 09:49:09 -0700 Subject: MAINT-7515: point shortcut icon at viewer exe --- indra/newview/installers/windows/installer_template.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 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 0481c029ac..adc7c96ffc 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -318,9 +318,9 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ # Other shortcuts SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$INSTEXE" CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$INSTEXE" CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' -- cgit v1.2.3 From b3c506bc68ea64d9e296d2be94380cd93b0c49c4 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 26 Jun 2017 09:15:01 -0400 Subject: MAINT-7514: Add (32) or (64) to registry for "install again?" prompt. Specifically, append (32) or (64) to the four-part version number stored in the registry entry used to detect whether this viewer has already been installed. This is injected as a new VERSION_REGISTRY NSIS variable. (It was tempting to simply change the value of VERSION_LONG with the embedded address size. However, there is one other use of VERSION_LONG in the NSIS template. That use is the subject of MAINT-7533.) Synthesize the VERSION_REGISTRY value in viewer_manifest.py and add it to the substitution dict used to populate the NSIS template. ADDRESS_SIZE isn't passed into viewer_manifest.py, but it can be inferred from the existing 'arch' parameter: 'arch' as well as 'platform' is used to select the specific subclass of the ViewerManifest class to instantiate for this run. Add an appropriate address_size attribute to every such subclass. Change a couple existing tests on 'arch' to tests on self.address_size instead -- clearer to the maintainer. Also, given that subclass selection mechanism, the ViewerManifest base class shouldn't need if / elif tests on 'platform'. Make build_data_json_platform a class attribute as well, removing the base-class stanza that dynamically examines 'platform' and 'arch'. Similarly, move platform-specific tweaks to the build_data_dict used to populate build_data.json into a new finish_build_data_dict() method overridden by individual platform subclasses. Encapsulate the logic around running the Windows code-signing tool into a sign() method, and call it as needed. For obtaining environment variables with fallback values, use os.environ.get() instead of os.path.expandvars() with tests on the returned value. --- indra/newview/installers/windows/installer_template.nsi | 6 +++--- 1 file changed, 3 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 0481c029ac..f5b2de4fdc 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -331,7 +331,7 @@ FileClose $9 # Write registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_REGISTRY}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." @@ -340,7 +340,7 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" 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_REGISTRY}" WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB # from FS:Ansariel @@ -458,7 +458,7 @@ FunctionEnd Function CheckIfAlreadyCurrent Push $0 ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" - StrCmp $0 ${VERSION_LONG} 0 continue_install + StrCmp $0 ${VERSION_REGISTRY} 0 continue_install StrCmp $SKIP_DIALOGS "true" continue_install MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install Quit -- cgit v1.2.3 From 263a9e7791f6b6c1ce15dc5c9505bc6b479d8d8b Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Mon, 26 Jun 2017 13:11:20 -0700 Subject: MAINT-7514: remove check if same version is installed --- .../installers/windows/installer_template.nsi | 22 ++-------------------- 1 file changed, 2 insertions(+), 20 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 4dc4d05589..d82783a7ec 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -280,7 +280,6 @@ StrCpy $INSTEXE "${INSTEXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" Call CheckIfAdministrator # Make sure the user can install/uninstall -Call CheckIfAlreadyCurrent # Make sure this version is not already installed Call CloseSecondLife # Make sure Second Life not currently running Call CheckNetworkConnection # Ping secondlife.com Call CheckWillUninstallV2 # Check if Second Life is already installed @@ -331,7 +330,7 @@ FileClose $9 # Write registry WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_REGISTRY}" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." @@ -340,7 +339,7 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "HelpLink" "https://support.secondlife.com/contact-support/" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG" 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_REGISTRY}" +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 @@ -451,23 +450,6 @@ lbl_is_admin: FunctionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Checks to see if the current version has already been installed (according to the registry). -;; If it has, allow user to bail out of install process. -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckIfAlreadyCurrent - Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" - StrCmp $0 ${VERSION_REGISTRY} 0 continue_install - StrCmp $SKIP_DIALOGS "true" continue_install - MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK continue_install - Quit -continue_install: - Pop $0 - Return - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Function CheckWillUninstallV2 ;; -- cgit v1.2.3 From cc85030f7e5d2e218759179a134db0bc60e80615 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 27 Jun 2017 07:57:04 -0700 Subject: Try pointing icon path to actual viewer exe --- indra/newview/installers/windows/installer_template.nsi | 4 ++-- 1 file changed, 2 insertions(+), 2 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 d82783a7ec..69e7e06243 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -317,9 +317,9 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ # Other shortcuts SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$INSTEXE" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$INSTEXE" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' -- cgit v1.2.3 From 3fd2ac14ea6dcbe2a8b6025dac37f6311c5cc319 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Tue, 27 Jun 2017 12:20:55 -0700 Subject: upgrade to VMP package 506923 --- .../newview/installers/windows/installer_template.nsi | 2 +- indra/newview/installers/windows/lang_en-us.nsi | Bin 9096 -> 8734 bytes 2 files 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 69e7e06243..1020702945 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -299,7 +299,7 @@ StrCpy $SHORTCUT_LANG_PARAM "--set InstallLanguage $(LanguageCode)" CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" SetOutPath "$INSTDIR" CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "%%SOURCE%%\icons\release\secondlife.ico" + "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index aa403a961c..00aa47de69 100644 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ -- cgit v1.2.3 From 6eae3c6f4f875bd33835a885700fa3bede53e103 Mon Sep 17 00:00:00 2001 From: coyot Date: Tue, 27 Jun 2017 13:32:34 -0700 Subject: use icon in viewer exe for shortcut --- 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 69e7e06243..809f7367d7 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -277,6 +277,7 @@ SetShellVarContext all # Install for all users (if you change this, change it # Start with some default values. StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" +StrCpy $VIEWER_EXE "${VIEWER_EXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" Call CheckIfAdministrator # Make sure the user can install/uninstall -- cgit v1.2.3 From 5fd1c47bb45f2fac68bfbd643ed3432ef3245573 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Fri, 30 Jun 2017 08:21:29 -0700 Subject: SL-671: uninstall pinning changes --- indra/newview/installers/windows/installer_template.nsi | 2 ++ 1 file changed, 2 insertions(+) (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 aeb92eb15b..6fbbf1f1c6 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -404,6 +404,8 @@ DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" # BUG-2707 Remove entry that disabled SEHOP DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$INSTEXE" +DeleteRegKey HKEY_CLASSES_ROOT "Applications\$INSTEXE" +DeleteRegKey HKEY_CLASSES_ROOT "Applications\${VIEWER_EXE}" # Clean up shortcuts Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" -- cgit v1.2.3 From b46697fcc155d026b5a951256d53581e7af20036 Mon Sep 17 00:00:00 2001 From: Glenn Glazer Date: Thu, 20 Jul 2017 10:38:38 -0700 Subject: MAINT-7529: de-Nerf autolaunch after install --- indra/newview/installers/windows/installer_template.nsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 6fbbf1f1c6..4ca850e30f 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -712,15 +712,15 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; After install completes, launch app ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -# Function .onInstSuccess -# Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. -# Push $R0 # Option value, unused# -# StrCmp $SKIP_AUTORUN "true" +2; +Function .onInstSuccess +Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Push $R0 # Option value, unused# + StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR -# Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"' -# Pop $R0 + Exec '"$WINDIR\explorer.exe" "$INSTDIR\autorun.bat"' + Pop $R0 # -# FunctionEnd +FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Recommend Upgrading to Service Pack 1 for Windows 7, if not present -- cgit v1.2.3 From 1d2ded8c5f1893a246fb1b7d7b5f12f451750827 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 17 Aug 2017 18:48:41 -0400 Subject: MAINT-7661: Make NSIS installer place .winstall marker file. This reduces a timing hole in which one instance of SL_Launcher might place a .winstall marker file in the download directory and run the downloaded installer, but another SL_Launcher instance might discover that marker and try to delete the directory before the NSIS install completes. --- indra/newview/installers/windows/installer_template.nsi | 7 +++++++ 1 file changed, 7 insertions(+) (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 4ca850e30f..ade808e3e2 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -714,6 +714,13 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + ;; $EXEDIR is where we find the installer file + ;; Put a marker file there so VMP will know we're done + ;; and it can delete the download directory next time. + ;; http://nsis.sourceforge.net/Write_text_to_a_file + FileOpen $9 "$EXEDIR\nsis.winstall" w + FileWrite $9 "NSIS done$\n" + FileClose $9 Push $R0 # Option value, unused# StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR -- cgit v1.2.3