From 2081b8a654fa78c4414ec2619522c8ef461a1881 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 12 Sep 2018 12:15:41 -0400 Subject: DRTVWR-474: Make NSIS run new updater.exe after install. But change shortcuts and registry entries and everything else back to the real viewer executable, so that every subsequent run directly launches the viewer. Eliminate SL_Launcher references from viewer_manifest.py. --- .../installers/windows/installer_template.nsi | 41 ++++++++++++++-------- 1 file changed, 27 insertions(+), 14 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 14c8dba39f..c53d7989fc 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" "$INSTDIR\$VIEWER_EXE" + "$INSTDIR\$VIEWER_EXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ @@ -317,9 +317,9 @@ CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ # Other shortcuts SetOutPath "$INSTDIR" CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" + "$INSTDIR\$VIEWER_EXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \ - "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" + "$INSTDIR\$VIEWER_EXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE" CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' @@ -327,7 +327,7 @@ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ 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" "Shortcut" "$INSTSHORTCUT" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" +WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$VIEWER_EXE" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" @@ -338,10 +338,10 @@ WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninst 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"' +WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayIcon" '"$INSTDIR\$VIEWER_EXE"' # 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\$VIEWER_EXE" "DisableExceptionChainValidation" 1 # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" @@ -358,9 +358,8 @@ 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\$VIEWER_EXE" -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\$VIEWER_EXE" "IsHostApp" "" +##WriteRegStr HKEY_CLASSES_ROOT "Applications\${VIEWER_EXE}" "NoStartPage" "" # Write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" @@ -398,8 +397,8 @@ Call un.CloseSecondLife 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_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$VIEWER_EXE" +##DeleteRegKey HKEY_CLASSES_ROOT "Applications\$INSTEXE" DeleteRegKey HKEY_CLASSES_ROOT "Applications\${VIEWER_EXE}" # Clean up shortcuts @@ -537,6 +536,7 @@ 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\$INSTEXE" +Delete "$INSTDIR\$VIEWER_EXE" # Remove old shader files first so fallbacks will work. See DEV-5663 RMDir /r "$INSTDIR\app_settings\shaders" @@ -673,7 +673,7 @@ FunctionEnd ;; After install completes, launch app ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess -Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. Push $R0 Push $0 ;; MAINT-7812: Only write nsis.winstall file with /marker switch @@ -694,8 +694,21 @@ Call CheckWindowsServPack # Warn if not on the latest SP before asking to launc Pop $R0 Push $R0 # Option value, unused# StrCmp $SKIP_AUTORUN "true" +2; -# Assumes SetOutPath $INSTDIR - Exec '"$WINDIR\explorer.exe" "$INSTDIR\$INSTSHORTCUT.lnk"' + # Assumes SetOutPath $INSTDIR + # Run INSTEXE (our updater), passing VIEWER_EXE plus the command-line + # arguments built into our shortcuts. This gives the updater a chance + # to verify that the viewer we just installed is appropriate for the + # running system -- or, if not, to download and install a different + # viewer. For instance, if a user running 32-bit Windows installs a + # 64-bit viewer, it cannot run on this system. But since the updater + # is a 32-bit executable even in the 64-bit viewer package, the + # updater can detect the problem and adapt accordingly. + # Once everything is in order, the updater will run the specified + # viewer with the specified params. + # Quote the updater executable and the viewer executable because each + # must be a distinct command-line token, but DO NOT quote the language + # string because it must decompose into separate command-line tokens. + Exec '"$INSTDIR\$INSTEXE" "$INSTDIR\VIEWER_EXE" $SHORTCUT_LANG_PARAM' Pop $R0 # FunctionEnd -- cgit v1.2.3 From d41245f252442d91432f06b039abea81831cc083 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 12 Sep 2018 20:13:53 -0400 Subject: DRTVWR-474: $VIEWER_EXE, rather than plain VIEWER_EXE --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index c53d7989fc..3117cf6b85 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -708,7 +708,7 @@ Function .onInstSuccess # Quote the updater executable and the viewer executable because each # must be a distinct command-line token, but DO NOT quote the language # string because it must decompose into separate command-line tokens. - Exec '"$INSTDIR\$INSTEXE" "$INSTDIR\VIEWER_EXE" $SHORTCUT_LANG_PARAM' + Exec '"$INSTDIR\$INSTEXE" "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' Pop $R0 # FunctionEnd -- cgit v1.2.3 From 83b40329fd822277ff5b47e6f36a7897c85e6260 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 13 Sep 2018 16:22:38 -0400 Subject: DRTVWR-474: Make NSIS installer invoke updater precheck subcommand. --- indra/newview/installers/windows/installer_template.nsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 3117cf6b85..76187b49a5 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -708,7 +708,7 @@ Function .onInstSuccess # Quote the updater executable and the viewer executable because each # must be a distinct command-line token, but DO NOT quote the language # string because it must decompose into separate command-line tokens. - Exec '"$INSTDIR\$INSTEXE" "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' + Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' Pop $R0 # FunctionEnd -- cgit v1.2.3 From a5f492acf19664593b040a8cdff1e5e251f65dba Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 29 Oct 2018 17:17:26 -0400 Subject: SL-9980: Launch the first-run updater via explorer.exe as we used to run the viewer from the installer. Turns out that the peculiar indirection through explorer.exe was a known trick for an elevated-privileges program to launch a program as the logged-in Windows user. (They could have commented that...) But explorer.exe doesn't pass command-line parameters, so if you want to pass any such to the actual target program, you have to launch a shortcut with those parameters. But this target program (the updater) and its parameters (precheck mumble) are specific to the very first viewer run after installation, so delete it after. Having an additional permanent icon that always runs the updater before the viewer would only confuse matters. --- indra/newview/installers/windows/installer_template.nsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 76187b49a5..adcf8fd0e4 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -705,10 +705,21 @@ Function .onInstSuccess # updater can detect the problem and adapt accordingly. # Once everything is in order, the updater will run the specified # viewer with the specified params. + # 'Exec updater' causes the viewer to inherit elevated Admin privileges. See + # http://mdb-blog.blogspot.com/2013/01/nsis-lunch-program-as-user-from-uac.html + # for workaround: running the updater via explorer.exe. + # Thing is, you can't pass parameters with the explorer.exe trick, so + # you have to create a shortcut or a .bat file. Since we don't want a + # permanent shortcut for the user to relaunch the updater like this + # first time, create it in a temp location and delete it once we've + # used it. # Quote the updater executable and the viewer executable because each # must be a distinct command-line token, but DO NOT quote the language # string because it must decompose into separate command-line tokens. - Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' + CreateShortCut "$TEMP\SLFirst.lnk" "$INSTDIR\$INSTEXE" \ + 'precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' + Exec '"$WINDIR\explorer.exe" "$TEMP\SLFirst.lnk"' + Delete "$TEMP\SLFirst.lnk" Pop $R0 # FunctionEnd -- cgit v1.2.3 From e2ca890898ecb79ff314b1f748bb6a3a9dbf602b Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 30 Oct 2018 10:36:28 -0400 Subject: DRTVWR-447: Copy VIEWER_EXE to local variable (thanks Ansariel) --- indra/newview/installers/windows/installer_template.nsi | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index adcf8fd0e4..f8e9bc4781 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -382,6 +382,7 @@ Section Uninstall # Start with some default values. StrCpy $INSTPROG "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" +StrCpy $VIEWER_EXE "${VIEWER_EXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" # Make sure the user can install/uninstall -- cgit v1.2.3 From a186f9a729e9ae9c834121708177b177f2c26283 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 1 Nov 2018 22:08:44 -0400 Subject: DRTVWR-447: Allow Standard Windows user to install for current user. This should eliminate any confusion due to a Standard user needing to elevate to Admin privileges, since from that point on Windows tells the running program the current user is that Admin. Bypass all that. --- .../installers/windows/installer_template.nsi | 165 ++++++++++----------- indra/newview/installers/windows/lang_da.nsi | Bin 7816 -> 7816 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9850 -> 9854 bytes indra/newview/installers/windows/lang_en-us.nsi | Bin 8734 -> 11342 bytes indra/newview/installers/windows/lang_es.nsi | Bin 9872 -> 9876 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 10258 -> 10262 bytes indra/newview/installers/windows/lang_it.nsi | Bin 9520 -> 9524 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7204 -> 7208 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 8136 -> 8136 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 9864 -> 9864 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 9188 -> 9188 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 9286 -> 9290 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6846 -> 6850 bytes 13 files changed, 79 insertions(+), 86 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index f8e9bc4781..500b35255e 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -32,7 +32,7 @@ SetCompress auto # Compress if saves space SetCompressor /solid lzma # Compress whole installer as one block SetDatablockOptimize off # Only saves us 0.1%, not worth it XPStyle on # Add an XP manifest to the installer -RequestExecutionLevel admin # For when we write to Program Files +RequestExecutionLevel highest # match MULTIUSER_EXECUTIONLEVEL ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Project flags @@ -90,20 +90,43 @@ InstProgressFlags smooth colored # New colored smooth look SetOverwrite on # Overwrite files by default AutoCloseWindow true # After all files install, close window -# 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}" +# Registry key paths, ours and Microsoft's +!define LINDEN_KEY "SOFTWARE\Linden Research, Inc." +!define INSTNAME_KEY "${LINDEN_KEY}\${INSTNAME}" +!define MSCURRVER_KEY "SOFTWARE\Microsoft\Windows\CurrentVersion" +!define MSNTCURRVER_KEY "SOFTWARE\Microsoft\Windows NT\CurrentVersion" +!define MSUNINSTALL_KEY "${MSCURRVER_KEY}\Uninstall\${INSTNAME}" + +# from http://nsis.sourceforge.net/Docs/MultiUser/Readme.html +# Highest level permitted for user: Admin for Admin, Standard for Standard +!define MULTIUSER_EXECUTIONLEVEL Highest +!define MULTIUSER_MUI +# Look for /AllUsers or /CurrentUser switches +!define MULTIUSER_INSTALLMODE_COMMANDLINE +# appended to $PROGRAMFILES, as affected by MULTIUSER_USE_PROGRAMFILES64 +!define MULTIUSER_INSTALLMODE_INSTDIR "${INSTNAME}" +# expands to !define MULTIUSER_USE_PROGRAMFILES64 or nothing +%%PROGRAMFILES%% +# should make MultiUser.nsh initialization read existing INSTDIR from registry +!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${INSTNAME_KEY}" +!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" +# should make MultiUser.nsh initialization write $MultiUser.InstallMode to registry +!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${INSTNAME_KEY}" +!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "InstallMode" +!include MultiUser.nsh +!include MUI2.nsh UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) -Page directory dirPre -Page instfiles +!insertmacro MULTIUSER_PAGE_INSTALLMODE +!define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre +!insertmacro MUI_PAGE_DIRECTORY +!insertmacro MUI_PAGE_INSTFILES ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Variables ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Var INSTPROG +Var INSTNAME Var INSTEXE Var VIEWER_EXE Var INSTSHORTCUT @@ -142,20 +165,13 @@ FunctionEnd ;; entry to the language ID selector below ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInit +!insertmacro MULTIUSER_INIT %%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} +# Setting MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY and +# MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME should +# read the current location of the install for this version into INSTDIR. Call CheckCPUFlags # Make sure we have SSE2 support Call CheckWindowsVersion # Don't install On unsupported systems @@ -181,7 +197,7 @@ Call CheckWindowsVersion # Don't install On unsupported systems lbl_configure_default_lang: # If we currently have a version of SL installed, default to the language of that install # Otherwise don't change $LANGUAGE and it will default to the OS UI language. - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" + ReadRegStr $0 SHELL_CONTEXT "${INSTNAME_KEY}" "InstallerLanguage" IfErrors +2 0 # If error skip the copy instruction StrCpy $LANGUAGE $0 @@ -204,7 +220,7 @@ lbl_build_menu: StrCpy $LANGUAGE $0 # Save language in registry - WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE + WriteRegStr SHELL_CONTEXT "${INSTNAME_KEY}" "InstallerLanguage" $LANGUAGE lbl_return: Pop $0 Return @@ -215,16 +231,20 @@ FunctionEnd ;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit +!insertmacro MULTIUSER_UNINIT %%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" + ReadRegStr $0 SHELL_CONTEXT "${INSTNAME_KEY}" "InstallerLanguage" IfErrors lbl_end StrCpy $LANGUAGE $0 lbl_end: Return + # Does MultiUser.nsh init read back + # MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY into $MultiUser.InstallMode? + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -272,15 +292,14 @@ FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Section "" -SetShellVarContext all # Install for all users (if you change this, change it in the uninstall as well) +# SetShellVarContext is set by MultiUser.nsh initialization. # Start with some default values. -StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTNAME "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" StrCpy $VIEWER_EXE "${VIEWER_EXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" -Call CheckIfAdministrator # Make sure the user can install/uninstall Call CloseSecondLife # Make sure Second Life not currently running Call CheckWillUninstallV2 # Check if Second Life is already installed @@ -324,24 +343,24 @@ CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ '"$INSTDIR\uninst.exe"' '' # 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" "Shortcut" "$INSTSHORTCUT" -WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$VIEWER_EXE" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "Publisher" "Linden Research, Inc." -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLInfoAbout" "http://secondlife.com/whatis/" -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "URLUpdateInfo" "http://secondlife.com/support/downloads/" -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}" -WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "EstimatedSize" "0x0001D500" # ~117 MB +WriteRegStr SHELL_CONTEXT "${INSTNAME_KEY}" "" "$INSTDIR" +WriteRegStr SHELL_CONTEXT "${INSTNAME_KEY}" "Version" "${VERSION_LONG}" +WriteRegStr SHELL_CONTEXT "${INSTNAME_KEY}" "Shortcut" "$INSTSHORTCUT" +WriteRegStr SHELL_CONTEXT "${INSTNAME_KEY}" "Exe" "$VIEWER_EXE" +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "Publisher" "Linden Research, Inc." +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "URLInfoAbout" "http://secondlife.com/whatis/" +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "URLUpdateInfo" "http://secondlife.com/support/downloads/" +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "HelpLink" "https://support.secondlife.com/contact-support/" +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "DisplayName" "$INSTNAME" +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "UninstallString" '"$INSTDIR\uninst.exe"' +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "DisplayVersion" "${VERSION_LONG}" +WriteRegDWORD SHELL_CONTEXT "${MSUNINSTALL_KEY}" "EstimatedSize" "0x0001D500" # ~117 MB # from FS:Ansariel -WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayIcon" '"$INSTDIR\$VIEWER_EXE"' +WriteRegStr SHELL_CONTEXT "${MSUNINSTALL_KEY}" "DisplayIcon" '"$INSTDIR\$VIEWER_EXE"' # BUG-2707 Disable SEHOP for installed viewer. -WriteRegDWORD HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$VIEWER_EXE" "DisableExceptionChainValidation" 1 +WriteRegDWORD SHELL_CONTEXT "${MSNTCURRVER_KEY}\Image File Execution Options\$VIEWER_EXE" "DisableExceptionChainValidation" 1 # Write URL registry info WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" @@ -380,25 +399,29 @@ SectionEnd Section Uninstall # Start with some default values. -StrCpy $INSTPROG "${INSTNAME}" +StrCpy $INSTNAME "${INSTNAME}" StrCpy $INSTEXE "${INSTEXE}" StrCpy $VIEWER_EXE "${VIEWER_EXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" -# Make sure the user can install/uninstall -Call un.CheckIfAdministrator - -# Uninstall for all users (if you change this, change it in the install as well) -SetShellVarContext all +# SetShellVarContext per the mode saved at install time in registry at +# MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY +# MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME +# Couln't get NSIS to expand $MultiUser.InstallMode into the function name at Call time +${If} $MultiUser.InstallMode == 'AllUsers' + Call un.MultiUser.InstallMode.AllUsers +${Else} + Call un.MultiUser.InstallMode.CurrentUser +${EndIf} # Make sure we're not running Call un.CloseSecondLife # Clean up registry keys and subkeys (these should all be !defines somewhere) -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" -DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" +DeleteRegKey SHELL_CONTEXT "${INSTNAME_KEY}" +DeleteRegKey SHELL_CONTEXT "${MSCURRVER_KEY}\Uninstall\$INSTNAME" # BUG-2707 Remove entry that disabled SEHOP -DeleteRegKey HKEY_LOCAL_MACHINE "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\$VIEWER_EXE" +DeleteRegKey SHELL_CONTEXT "${MSNTCURRVER_KEY}\Image File Execution Options\$VIEWER_EXE" ##DeleteRegKey HKEY_CLASSES_ROOT "Applications\$INSTEXE" DeleteRegKey HKEY_CLASSES_ROOT "Applications\${VIEWER_EXE}" @@ -418,36 +441,6 @@ Call un.UserSettingsFiles SectionEnd -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure the user can install -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function CheckIfAdministrator - DetailPrint $(CheckAdministratorInstDP) - UserInfo::GetAccountType - Pop $R0 - StrCmp $R0 "Admin" lbl_is_admin - MessageBox MB_OK $(CheckAdministratorInstMB) - Quit -lbl_is_admin: - Return - -FunctionEnd - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Make sure the user can uninstall -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -Function un.CheckIfAdministrator - DetailPrint $(CheckAdministratorUnInstDP) - UserInfo::GetAccountType - Pop $R0 - StrCmp $R0 "Admin" lbl_is_admin - MessageBox MB_OK $(CheckAdministratorUnInstMB) - Quit -lbl_is_admin: - Return - -FunctionEnd - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Function CheckWillUninstallV2 ;; @@ -571,10 +564,10 @@ Push $2 StrCpy $0 0 # Index number used to iterate via EnumRegKey LOOP: - EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 + EnumRegKey $1 SHELL_CONTEXT "${MSNTCURRVER_KEY}\ProfileList" $0 StrCmp $1 "" DONE # No more users - ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" + ReadRegStr $2 SHELL_CONTEXT "${MSNTCURRVER_KEY}\ProfileList\$1" "ProfileImagePath" StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing # Required since ProfileImagePath is of type REG_EXPAND_SZ @@ -604,7 +597,7 @@ Pop $0 # Delete files in ProgramData\Secondlife Push $0 - ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" + ReadRegStr $0 SHELL_CONTEXT "${MSCURRVER_KEY}\Explorer\Shell Folders" "Common AppData" StrCmp $0 "" +2 RMDir /r "$0\SecondLife" Pop $0 @@ -661,8 +654,8 @@ NOFOLDER: MessageBox MB_YESNO $(DeleteRegistryKeysMB) IDYES DeleteKeys IDNO NoDelete DeleteKeys: - DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\x-grid-location-info" - DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Classes\secondlife" + DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\x-grid-location-info" + DeleteRegKey SHELL_CONTEXT "SOFTWARE\Classes\secondlife" DeleteRegKey HKEY_CLASSES_ROOT "x-grid-location-info" DeleteRegKey HKEY_CLASSES_ROOT "secondlife" @@ -758,10 +751,10 @@ FunctionEnd ; StrCpy $0 0 # Index number used to iterate via EnumRegKey ; ; LOOP: -; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 +; EnumRegKey $1 SHELL_CONTEXT "${MSNTCURRVER_KEY}\ProfileList" $0 ; StrCmp $1 "" DONE # no more users ; -; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" +; ReadRegStr $2 SHELL_CONTEXT "${MSNTCURRVER_KEY}\ProfileList\$1" "ProfileImagePath" ; StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing ; ;# Required since ProfileImagePath is of type REG_EXPAND_SZ @@ -780,7 +773,7 @@ FunctionEnd ; ;# Copy files in Documents and Settings\All Users\SecondLife ;Push $0 -; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" +; ReadRegStr $0 SHELL_CONTEXT "${MSCURRVER_KEY}\Explorer\Shell Folders" "Common AppData" ; StrCmp $0 "" +2 ; RMDir /r "$2\Application Data\SecondLife\" ;Pop $0 diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index 83e1a3ea94..b3b8cf34d5 100644 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index 2a868acc89..7758a3bda6 100644 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index 00aa47de69..1e81c5294a 100644 Binary files a/indra/newview/installers/windows/lang_en-us.nsi and b/indra/newview/installers/windows/lang_en-us.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index 1ecf254ffb..6d4a7495a6 100644 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index bec5835bed..421015fc6b 100644 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index 1d2e150525..df735ba742 100644 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index 1bd6526670..f2cc1f9fde 100644 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index a172f0cdeb..61dc769126 100644 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index 87032fec18..d481434ab2 100644 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 019c66123c..a42c719169 100644 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 1c4e2c2f48..c320764fac 100644 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 355e01a333..8da802df68 100644 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From 75cbe187a6572e904e2f931c6a1902b186eec844 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 2 Nov 2018 07:59:51 -0400 Subject: DRTVWR-447: Back out changeset 69118ad33b45: directly run updater from NSIS installer, instead of via explorer.exe. A recent test run performed the install, then opened an Explorer window on My Documents. --- indra/newview/installers/windows/installer_template.nsi | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index adcf8fd0e4..76187b49a5 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -705,21 +705,10 @@ Function .onInstSuccess # updater can detect the problem and adapt accordingly. # Once everything is in order, the updater will run the specified # viewer with the specified params. - # 'Exec updater' causes the viewer to inherit elevated Admin privileges. See - # http://mdb-blog.blogspot.com/2013/01/nsis-lunch-program-as-user-from-uac.html - # for workaround: running the updater via explorer.exe. - # Thing is, you can't pass parameters with the explorer.exe trick, so - # you have to create a shortcut or a .bat file. Since we don't want a - # permanent shortcut for the user to relaunch the updater like this - # first time, create it in a temp location and delete it once we've - # used it. # Quote the updater executable and the viewer executable because each # must be a distinct command-line token, but DO NOT quote the language # string because it must decompose into separate command-line tokens. - CreateShortCut "$TEMP\SLFirst.lnk" "$INSTDIR\$INSTEXE" \ - 'precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' - Exec '"$WINDIR\explorer.exe" "$TEMP\SLFirst.lnk"' - Delete "$TEMP\SLFirst.lnk" + Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' Pop $R0 # FunctionEnd -- cgit v1.2.3 From e7ce166469dafe815ab002be76c6f80acaaff35c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 2 Nov 2018 08:24:28 -0400 Subject: DRTVWR-447: Fix NSIS installer icons with "Modern UI" mechanism. --- indra/newview/installers/windows/installer_template.nsi | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 219ee2695b..bd290b710b 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -80,9 +80,12 @@ Name ${INSTNAME} SubCaption 0 $(LicenseSubTitleSetup) # Override "license agreement" text +!define MUI_ICON "%%SOURCE%%\installers\windows\install_icon.ico" +!define MUI_UNICON "%%SOURCE%%\installers\windows\uninstall_icon.ico" + BrandingText " " # Bottom of window text -Icon %%SOURCE%%\installers\windows\install_icon.ico -UninstallIcon %%SOURCE%%\installers\windows\uninstall_icon.ico +Icon "${MUI_ICON}" +UninstallIcon "${MUI_UNICON}" WindowIcon on # Show our icon in left corner BGGradient off # No big background window CRCCheck on # Make sure CRC is OK -- cgit v1.2.3 From dd9f6784ccc5d285ef50f0b8693ee92bb872d992 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 15 Nov 2018 12:06:30 -0500 Subject: SL-10010: Use c:\Program Files rather than c:\Program Files (x86) for 64-bit viewers. It seems there's a longstanding bug in NSIS: it fails to use $PROGRAMFILES64 rather than $PROGRAMFILES when performing an all-users install of a 64-bit program. Try to remedy that. Also pick up a few NSIS suggestions from Ansariel Hiller. --- .../installers/windows/installer_template.nsi | 22 ++++++++++++++++++++- indra/newview/installers/windows/lang_en-us.nsi | Bin 11342 -> 11488 bytes 2 files changed, 21 insertions(+), 1 deletion(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index bd290b710b..840203c178 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -46,9 +46,13 @@ RequestExecutionLevel highest # match MULTIUSER_EXECUTIONLEVEL ;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the ;; application directory so we have to add a path to these include files) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Ansariel notes: "Under certain circumstances the installer will fall back +;; to the first defined (aka default) language version. So you want to include +;; en-us as first language file." +!include "%%SOURCE%%\installers\windows\lang_en-us.nsi" + !include "%%SOURCE%%\installers\windows\lang_da.nsi" !include "%%SOURCE%%\installers\windows\lang_de.nsi" -!include "%%SOURCE%%\installers\windows\lang_en-us.nsi" !include "%%SOURCE%%\installers\windows\lang_es.nsi" !include "%%SOURCE%%\installers\windows\lang_fr.nsi" !include "%%SOURCE%%\installers\windows\lang_ja.nsi" @@ -108,8 +112,22 @@ AutoCloseWindow true # After all files install, close window !define MULTIUSER_INSTALLMODE_COMMANDLINE # appended to $PROGRAMFILES, as affected by MULTIUSER_USE_PROGRAMFILES64 !define MULTIUSER_INSTALLMODE_INSTDIR "${INSTNAME}" + # expands to !define MULTIUSER_USE_PROGRAMFILES64 or nothing %%PROGRAMFILES%% +# Bug in MultiUser.nsh?! This reference: +# http://nsis.sourceforge.net/Docs/MultiUser/Readme.html +# says: +# MULTIUSER_USE_PROGRAMFILES64 Use $PROGRAMFILES64 instead of $PROGRAMFILES as the default all users directory. +# Yet as far as I can tell from: +# https://sourceforge.net/p/nsis/mailman/message/22246769/ +# (which contains a patch), that functionality has never been released with +# NSIS. Instead of applying a patch to each developer machine and each +# TeamCity build host, try overwriting $PROGRAMFILES with $PROGRAMFILES64?! +!ifdef MULTIUSER_USE_PROGRAMFILES64 + StrCpy $PROGRAMFILES $PROGRAMFILES64 +!endif + # should make MultiUser.nsh initialization read existing INSTDIR from registry !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${INSTNAME_KEY}" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" @@ -118,6 +136,8 @@ AutoCloseWindow true # After all files install, close window !define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "InstallMode" !include MultiUser.nsh !include MUI2.nsh +!define MUI_BGCOLOR FFFFFF +!insertmacro MUI_FUNCTION_GUIINIT UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi index 1e81c5294a..fd4d340816 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 db2cddf93fd3f39ca0330a8a8b93641377404dd1 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 15 Nov 2018 16:02:47 -0500 Subject: SL-10010: Use trunk NSIS + Unicode attrib, instead of Unicode fork. Back out misguided attempt to overwrite $PROGRAMFILES with $PROGRAMFILES64. --- .../newview/installers/windows/installer_template.nsi | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 840203c178..f62a14d65f 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -18,8 +18,7 @@ ;; ;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA ;; -;; NSIS Unicode 2.46.5 or higher required -;; http://www.scratchpaper.com/ +;; NSIS 3 or higher required for Unicode support ;; ;; Author: James Cook, TankMaster Finesmith, Don Kjer, Callum Prentice ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -27,6 +26,7 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Compiler flags ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Unicode true SetOverwrite on # Overwrite files SetCompress auto # Compress if saves space SetCompressor /solid lzma # Compress whole installer as one block @@ -112,22 +112,8 @@ AutoCloseWindow true # After all files install, close window !define MULTIUSER_INSTALLMODE_COMMANDLINE # appended to $PROGRAMFILES, as affected by MULTIUSER_USE_PROGRAMFILES64 !define MULTIUSER_INSTALLMODE_INSTDIR "${INSTNAME}" - # expands to !define MULTIUSER_USE_PROGRAMFILES64 or nothing %%PROGRAMFILES%% -# Bug in MultiUser.nsh?! This reference: -# http://nsis.sourceforge.net/Docs/MultiUser/Readme.html -# says: -# MULTIUSER_USE_PROGRAMFILES64 Use $PROGRAMFILES64 instead of $PROGRAMFILES as the default all users directory. -# Yet as far as I can tell from: -# https://sourceforge.net/p/nsis/mailman/message/22246769/ -# (which contains a patch), that functionality has never been released with -# NSIS. Instead of applying a patch to each developer machine and each -# TeamCity build host, try overwriting $PROGRAMFILES with $PROGRAMFILES64?! -!ifdef MULTIUSER_USE_PROGRAMFILES64 - StrCpy $PROGRAMFILES $PROGRAMFILES64 -!endif - # should make MultiUser.nsh initialization read existing INSTDIR from registry !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${INSTNAME_KEY}" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" -- cgit v1.2.3 From 8420e20102006b780d6959ec3d0fa6d905a32f16 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Nov 2018 09:53:45 -0500 Subject: DRTVWR-447: Fix syntax error in embedded variable reference. --- indra/newview/installers/windows/lang_ru.nsi | Bin 9188 -> 9186 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index a42c719169..d8990fd955 100644 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ -- cgit v1.2.3 From 24872bea74a9275b388a4306091f940ccbf80270 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Nov 2018 09:55:54 -0500 Subject: DRTVWR-447: Fix longstanding NSIS warning about unused label. --- indra/newview/installers/windows/installer_template.nsi | 1 - 1 file changed, 1 deletion(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index f62a14d65f..355272cd08 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -216,7 +216,6 @@ lbl_configure_default_lang: Goto lbl_return StrCmp $SKIP_DIALOGS "true" lbl_return -lbl_build_menu: Push "" # Use separate file so labels can be UTF-16 but we can still merge changes into this ASCII file. JC !include "%%SOURCE%%\installers\windows\language_menu.nsi" -- cgit v1.2.3 From 7ca89229f86aa8c056b45be1b59d221799e56a84 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 21 Nov 2018 12:07:18 -0500 Subject: SL-10077: Save correct uninstall directory and (un)install mode. Curiously, the value of $INSTDIR is correct before MULTIUSER_UNINIT, but is made incorrect by MULTIUSER_UNINIT. Save and restore the correct value. Saving $MultiUser.InstallMode in the registry (by setting relevant macros examined by MultiUser.nsh) is susceptible to overwriting if the user installs multiple viewers with the same channel name. Instead, write an InstallMode.txt in the install directory, and read it back on uninstall. Of course, add it to the files to be deleted on uninstall. --- .../installers/windows/installer_template.nsi | 48 +++++++++++++++++----- 1 file changed, 38 insertions(+), 10 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 355272cd08..b2d376d0c0 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -117,9 +117,12 @@ AutoCloseWindow true # After all files install, close window # should make MultiUser.nsh initialization read existing INSTDIR from registry !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${INSTNAME_KEY}" !define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" -# should make MultiUser.nsh initialization write $MultiUser.InstallMode to registry -!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY "${INSTNAME_KEY}" -!define MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME "InstallMode" +# Don't set MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY and +# MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME to cause the installer to +# write $MultiUser.InstallMode to the registry, because when the user installs +# multiple viewers with the same channel (same ${INSTNAME}, hence same +# ${INSTNAME_KEY}), the registry entry is overwritten. Instead we'll write a +# little file into the install directory -- see .onInstSuccess and un.onInit. !include MultiUser.nsh !include MUI2.nsh !define MUI_BGCOLOR FFFFFF @@ -239,7 +242,21 @@ FunctionEnd ;; Prep Uninstaller Section ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function un.onInit -!insertmacro MULTIUSER_UNINIT + # Save $INSTDIR -- it appears to have the correct value before + # MULTIUSER_UNINIT, but then gets munged by MULTIUSER_UNINIT?! + Push $INSTDIR + !insertmacro MULTIUSER_UNINIT + Pop $INSTDIR + + # Now read InstallMode.txt from $INSTDIR + Push $0 + ClearErrors + FileOpen $0 "$INSTDIR\InstallMode.txt" r + IfErrors skipread + FileRead $0 $MultiUser.InstallMode + FileClose $0 +skipread: + Pop $0 %%ENGAGEREGISTRY%% @@ -248,10 +265,10 @@ Function un.onInit IfErrors lbl_end StrCpy $LANGUAGE $0 lbl_end: - Return - # Does MultiUser.nsh init read back - # MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY into $MultiUser.InstallMode? +## MessageBox MB_OK "After restoring:$\n$$INSTDIR = '$INSTDIR'$\n$$MultiUser.InstallMode = '$MultiUser.InstallMode'$\n$$LANGUAGE = '$LANGUAGE'" + + Return FunctionEnd @@ -417,8 +434,10 @@ StrCpy $INSTSHORTCUT "${SHORTCUT}" # MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME # Couln't get NSIS to expand $MultiUser.InstallMode into the function name at Call time ${If} $MultiUser.InstallMode == 'AllUsers' +##MessageBox MB_OK "Uninstalling for all users" Call un.MultiUser.InstallMode.AllUsers ${Else} +##MessageBox MB_OK "Uninstalling for current user" Call un.MultiUser.InstallMode.CurrentUser ${EndIf} @@ -626,6 +645,9 @@ Function un.ProgramFiles # This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py %%DELETE_FILES%% +# our InstallMode.txt +Delete "$INSTDIR\InstallMode.txt" + # Optional/obsolete files. Delete won't fail if they don't exist. Delete "$INSTDIR\autorun.bat" Delete "$INSTDIR\dronesettings.ini" @@ -675,7 +697,13 @@ FunctionEnd ;; After install completes, launch app ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Function .onInstSuccess - Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. + Push $0 + FileOpen $0 "$INSTDIR\InstallMode.txt" w + # No newline -- this is for our use, not for users to read. + FileWrite $0 "$MultiUser.InstallMode" + FileClose $0 + Pop $0 + Push $R0 Push $0 ;; MAINT-7812: Only write nsis.winstall file with /marker switch @@ -694,7 +722,8 @@ Function .onInstSuccess ClearErrors Pop $0 Pop $R0 - Push $R0 # Option value, unused# + + Call CheckWindowsServPack # Warn if not on the latest SP before asking to launch. StrCmp $SKIP_AUTORUN "true" +2; # Assumes SetOutPath $INSTDIR # Run INSTEXE (our updater), passing VIEWER_EXE plus the command-line @@ -711,7 +740,6 @@ Function .onInstSuccess # must be a distinct command-line token, but DO NOT quote the language # string because it must decompose into separate command-line tokens. Exec '"$INSTDIR\$INSTEXE" precheck "$INSTDIR\$VIEWER_EXE" $SHORTCUT_LANG_PARAM' - Pop $R0 # FunctionEnd -- cgit v1.2.3 From 63117d291936310b2059f07c79c3ccc87baaa064 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 30 Nov 2018 15:06:27 -0500 Subject: SL-10147: Copy placeholder English text to supported NSIS languages. --- indra/newview/installers/windows/lang_da.nsi | Bin 7816 -> 11760 bytes indra/newview/installers/windows/lang_de.nsi | Bin 9854 -> 12582 bytes indra/newview/installers/windows/lang_es.nsi | Bin 9876 -> 12630 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 10262 -> 12990 bytes indra/newview/installers/windows/lang_it.nsi | Bin 9524 -> 12278 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 7208 -> 9988 bytes indra/newview/installers/windows/lang_pl.nsi | Bin 8136 -> 12080 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 9864 -> 12748 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 9186 -> 11940 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 9290 -> 12044 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 6850 -> 9708 bytes 11 files changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/lang_da.nsi b/indra/newview/installers/windows/lang_da.nsi index b3b8cf34d5..f462c82078 100644 Binary files a/indra/newview/installers/windows/lang_da.nsi and b/indra/newview/installers/windows/lang_da.nsi differ diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi index 7758a3bda6..6abd496849 100644 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index 6d4a7495a6..5daac908c9 100644 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi index 421015fc6b..c437a0bdb4 100644 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi index df735ba742..78be4a3464 100644 Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi index f2cc1f9fde..2eb40e280b 100644 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pl.nsi b/indra/newview/installers/windows/lang_pl.nsi index 61dc769126..05977847b9 100644 Binary files a/indra/newview/installers/windows/lang_pl.nsi and b/indra/newview/installers/windows/lang_pl.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi index d481434ab2..79c2b7b114 100644 Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index d8990fd955..0ef1023d88 100644 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index c320764fac..4bb4e14bfa 100644 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi index 8da802df68..fccf119625 100644 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From 73eadfa12a23ed5e2e47c208f18795061caff6f3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 10 Dec 2018 17:11:40 -0500 Subject: INTL-318: Stop processing Danish and Polish language files. --- indra/newview/installers/windows/installer_template.nsi | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index b2d376d0c0..9a304559e1 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -51,27 +51,28 @@ RequestExecutionLevel highest # match MULTIUSER_EXECUTIONLEVEL ;; en-us as first language file." !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" -!include "%%SOURCE%%\installers\windows\lang_da.nsi" +# Danish and Polish no longer supported by the viewer itself +##!include "%%SOURCE%%\installers\windows\lang_da.nsi" !include "%%SOURCE%%\installers\windows\lang_de.nsi" !include "%%SOURCE%%\installers\windows\lang_es.nsi" !include "%%SOURCE%%\installers\windows\lang_fr.nsi" !include "%%SOURCE%%\installers\windows\lang_ja.nsi" !include "%%SOURCE%%\installers\windows\lang_it.nsi" -!include "%%SOURCE%%\installers\windows\lang_pl.nsi" +##!include "%%SOURCE%%\installers\windows\lang_pl.nsi" !include "%%SOURCE%%\installers\windows\lang_pt-br.nsi" !include "%%SOURCE%%\installers\windows\lang_ru.nsi" !include "%%SOURCE%%\installers\windows\lang_tr.nsi" !include "%%SOURCE%%\installers\windows\lang_zh.nsi" # *TODO: Move these into the language files themselves -LangString LanguageCode ${LANG_DANISH} "da" +##LangString LanguageCode ${LANG_DANISH} "da" LangString LanguageCode ${LANG_GERMAN} "de" LangString LanguageCode ${LANG_ENGLISH} "en" LangString LanguageCode ${LANG_SPANISH} "es" LangString LanguageCode ${LANG_FRENCH} "fr" LangString LanguageCode ${LANG_JAPANESE} "ja" LangString LanguageCode ${LANG_ITALIAN} "it" -LangString LanguageCode ${LANG_POLISH} "pl" +##LangString LanguageCode ${LANG_POLISH} "pl" LangString LanguageCode ${LANG_PORTUGUESEBR} "pt" LangString LanguageCode ${LANG_RUSSIAN} "ru" LangString LanguageCode ${LANG_TURKISH} "tr" -- cgit v1.2.3 From aabca008adb91e28c810d7ed50e1ad86f53b7765 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 2 Feb 2019 13:53:57 -0500 Subject: DRTVWR-447: Comment out Danish and Polish in one more file. --- indra/newview/installers/windows/language_menu.nsi | Bin 1448 -> 1464 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/language_menu.nsi b/indra/newview/installers/windows/language_menu.nsi index 08ad42532f..2f426a0f47 100644 Binary files a/indra/newview/installers/windows/language_menu.nsi and b/indra/newview/installers/windows/language_menu.nsi differ -- cgit v1.2.3 From cfbe33d7c72c7677836d362fa4026f88df4c9f76 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 2 Feb 2019 14:01:39 -0500 Subject: SL-10396: Disable per-user installs: require Admin for all-users. --- .../installers/windows/installer_template.nsi | 46 ++++++++++++++++++---- 1 file changed, 39 insertions(+), 7 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 9a304559e1..4afef4630c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -32,7 +32,7 @@ SetCompress auto # Compress if saves space SetCompressor /solid lzma # Compress whole installer as one block SetDatablockOptimize off # Only saves us 0.1%, not worth it XPStyle on # Add an XP manifest to the installer -RequestExecutionLevel highest # match MULTIUSER_EXECUTIONLEVEL +RequestExecutionLevel admin # For when we write to Program Files ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Project flags @@ -106,11 +106,12 @@ AutoCloseWindow true # After all files install, close window !define MSUNINSTALL_KEY "${MSCURRVER_KEY}\Uninstall\${INSTNAME}" # from http://nsis.sourceforge.net/Docs/MultiUser/Readme.html -# Highest level permitted for user: Admin for Admin, Standard for Standard -!define MULTIUSER_EXECUTIONLEVEL Highest +### Highest level permitted for user: Admin for Admin, Standard for Standard +##!define MULTIUSER_EXECUTIONLEVEL Highest +!define MULTIUSER_EXECUTIONLEVEL Admin !define MULTIUSER_MUI -# Look for /AllUsers or /CurrentUser switches -!define MULTIUSER_INSTALLMODE_COMMANDLINE +### Look for /AllUsers or /CurrentUser switches +##!define MULTIUSER_INSTALLMODE_COMMANDLINE # appended to $PROGRAMFILES, as affected by MULTIUSER_USE_PROGRAMFILES64 !define MULTIUSER_INSTALLMODE_INSTDIR "${INSTNAME}" # expands to !define MULTIUSER_USE_PROGRAMFILES64 or nothing @@ -131,7 +132,7 @@ AutoCloseWindow true # After all files install, close window UninstallText $(UninstallTextMsg) DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) -!insertmacro MULTIUSER_PAGE_INSTALLMODE +##!insertmacro MULTIUSER_PAGE_INSTALLMODE !define MUI_PAGE_CUSTOMFUNCTION_PRE dirPre !insertmacro MUI_PAGE_DIRECTORY !insertmacro MUI_PAGE_INSTFILES @@ -326,6 +327,7 @@ StrCpy $INSTEXE "${INSTEXE}" StrCpy $VIEWER_EXE "${VIEWER_EXE}" StrCpy $INSTSHORTCUT "${SHORTCUT}" +Call CheckIfAdministrator # Make sure the user can install/uninstall Call CloseSecondLife # Make sure Second Life not currently running Call CheckWillUninstallV2 # Check if Second Life is already installed @@ -433,7 +435,7 @@ StrCpy $INSTSHORTCUT "${SHORTCUT}" # SetShellVarContext per the mode saved at install time in registry at # MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY # MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME -# Couln't get NSIS to expand $MultiUser.InstallMode into the function name at Call time +# Couldn't get NSIS to expand $MultiUser.InstallMode into the function name at Call time ${If} $MultiUser.InstallMode == 'AllUsers' ##MessageBox MB_OK "Uninstalling for all users" Call un.MultiUser.InstallMode.AllUsers @@ -469,6 +471,36 @@ Call un.UserSettingsFiles SectionEnd +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Make sure the user can install +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function CheckIfAdministrator + DetailPrint $(CheckAdministratorInstDP) + UserInfo::GetAccountType + Pop $R0 + StrCmp $R0 "Admin" lbl_is_admin + MessageBox MB_OK $(CheckAdministratorInstMB) + Quit +lbl_is_admin: + Return + +FunctionEnd + +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; Make sure the user can uninstall +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +Function un.CheckIfAdministrator + DetailPrint $(CheckAdministratorUnInstDP) + UserInfo::GetAccountType + Pop $R0 + StrCmp $R0 "Admin" lbl_is_admin + MessageBox MB_OK $(CheckAdministratorUnInstMB) + Quit +lbl_is_admin: + Return + +FunctionEnd + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Function CheckWillUninstallV2 ;; -- cgit v1.2.3 From d588660db1a1232731e3fb29eadc1c3951bf5dc3 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 5 Feb 2019 14:35:36 -0500 Subject: SL-10469: Remove any similar shortcuts for old per-user install. --- .../newview/installers/windows/installer_template.nsi | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 4afef4630c..8af0f057ae 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -602,6 +602,24 @@ RMDir /r "$INSTDIR\skins" Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" +# SL-10469: During the brief period when the BugSplat RC supported "current +# user" installs, we might have put a shortcut with this same $INSTSHORTCUT +# name in the Start menu folder for "current user" programs. Even though we're +# about to write our new shortcut to the Start menu folder for "all users," +# apparently Windows 7 only shows one of them. (Windows 10 reportedly shows +# both.) Try temporarily setting "current user," just long enough to delete +# any such old shortcuts. +SetShellVarContext current + +# This stanza should match the $SMPROGRAMS and $DESKTOP deletions in the +# "clean up shortcuts" passage in Section Uninstall. Don't bother with the +# shortcuts in $INSTDIR because we're just about to (over)write those. +Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" +RMDir "$SMPROGRAMS\$INSTSHORTCUT" +Delete "$DESKTOP\$INSTSHORTCUT.lnk" + +SetShellVarContext all + FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From d779a03f0bee51110a30a52eecc352f5074fa30a Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 6 Feb 2019 09:17:06 -0500 Subject: SL-10469: Add diagnostic popup when trying to delete old shortcuts. --- .../installers/windows/installer_template.nsi | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 8af0f057ae..6bf4dba142 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -611,6 +611,32 @@ Delete "$INSTDIR\releasenotes.txt" # any such old shortcuts. SetShellVarContext current +Push $0 # FindFirst context +Push $1 # FindFirst/FindNext filename +Push $2 # cumulative filenames + +StrCpy $2 "Checking $SMPROGRAMS\$INSTSHORTCUT$\nAbout to delete:" + +ClearErrors +FindFirst $0 $1 "$SMPROGRAMS\$INSTSHORTCUT\*.*" +loop: +IfErrors done + StrCpy $2 "$2$\n$SMPROGRAMS\$INSTSHORTCUT\$1" + FindNext $0 $1 + Goto loop +done: +FindClose $0 + +StrCpy $2 "$2$\n$\nChecking $DESKTOP\$INSTSHORTCUT.lnk" +IfFileExists "$DESKTOP\$INSTSHORTCUT.lnk" 0 +2 +StrCpy $2 "$2$\n$DESKTOP\$INSTSHORTCUT.lnk" + +MessageBox MB_OK "$2" + +Pop $2 +Pop $1 +Pop $0 + # This stanza should match the $SMPROGRAMS and $DESKTOP deletions in the # "clean up shortcuts" passage in Section Uninstall. Don't bother with the # shortcuts in $INSTDIR because we're just about to (over)write those. -- cgit v1.2.3 From 5196bab897a2ef5810718409b98919c0642dc97e Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 6 Feb 2019 13:14:17 -0500 Subject: SL-10469: Remove old-shortcut cleanup cruft: only works for Admin. The installer is (once again) running with Admin privilege elevation even for a Standard Windows user, so it can't determine the underlying Standard user. Therefore it can't clean up any per-user shortcuts left over for that Standard user. Moved the kludge to SLVersionChecker. --- .../installers/windows/installer_template.nsi | 44 ---------------------- 1 file changed, 44 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 6bf4dba142..4afef4630c 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -602,50 +602,6 @@ RMDir /r "$INSTDIR\skins" Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" Delete "$INSTDIR\releasenotes.txt" -# SL-10469: During the brief period when the BugSplat RC supported "current -# user" installs, we might have put a shortcut with this same $INSTSHORTCUT -# name in the Start menu folder for "current user" programs. Even though we're -# about to write our new shortcut to the Start menu folder for "all users," -# apparently Windows 7 only shows one of them. (Windows 10 reportedly shows -# both.) Try temporarily setting "current user," just long enough to delete -# any such old shortcuts. -SetShellVarContext current - -Push $0 # FindFirst context -Push $1 # FindFirst/FindNext filename -Push $2 # cumulative filenames - -StrCpy $2 "Checking $SMPROGRAMS\$INSTSHORTCUT$\nAbout to delete:" - -ClearErrors -FindFirst $0 $1 "$SMPROGRAMS\$INSTSHORTCUT\*.*" -loop: -IfErrors done - StrCpy $2 "$2$\n$SMPROGRAMS\$INSTSHORTCUT\$1" - FindNext $0 $1 - Goto loop -done: -FindClose $0 - -StrCpy $2 "$2$\n$\nChecking $DESKTOP\$INSTSHORTCUT.lnk" -IfFileExists "$DESKTOP\$INSTSHORTCUT.lnk" 0 +2 -StrCpy $2 "$2$\n$DESKTOP\$INSTSHORTCUT.lnk" - -MessageBox MB_OK "$2" - -Pop $2 -Pop $1 -Pop $0 - -# This stanza should match the $SMPROGRAMS and $DESKTOP deletions in the -# "clean up shortcuts" passage in Section Uninstall. Don't bother with the -# shortcuts in $INSTDIR because we're just about to (over)write those. -Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" -RMDir "$SMPROGRAMS\$INSTSHORTCUT" -Delete "$DESKTOP\$INSTSHORTCUT.lnk" - -SetShellVarContext all - FunctionEnd ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -- cgit v1.2.3 From 1ff58087a9b4fcc7482079ca88523eace37f264c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Sat, 9 Feb 2019 10:51:00 -0500 Subject: SL-10506: Disregard any previous installation. Start from scratch. --- indra/newview/installers/windows/installer_template.nsi | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index 4afef4630c..ff064b5f1e 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -117,8 +117,9 @@ AutoCloseWindow true # After all files install, close window # expands to !define MULTIUSER_USE_PROGRAMFILES64 or nothing %%PROGRAMFILES%% # should make MultiUser.nsh initialization read existing INSTDIR from registry -!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${INSTNAME_KEY}" -!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" +## SL-10506: don't +##!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY "${INSTNAME_KEY}" +##!define MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME "" # Don't set MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_KEY and # MULTIUSER_INSTALLMODE_DEFAULT_REGISTRY_VALUENAME to cause the installer to # write $MultiUser.InstallMode to the registry, because when the user installs -- cgit v1.2.3 From 3e17a3c84b6b50f729396d227224129781f9b8d7 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Mon, 11 Feb 2019 14:20:02 -0500 Subject: SL-10506: Try again to attain desired behavior. --- indra/newview/installers/windows/installer_template.nsi | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi index ff064b5f1e..4f9a1b7804 100644 --- a/indra/newview/installers/windows/installer_template.nsi +++ b/indra/newview/installers/windows/installer_template.nsi @@ -184,9 +184,20 @@ Function .onInit %%ENGAGEREGISTRY%% -# Setting MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY and +# SL-10506: Setting MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_KEY and # MULTIUSER_INSTALLMODE_INSTDIR_REGISTRY_VALUENAME should # read the current location of the install for this version into INSTDIR. +# However, SL-10506 complains about the resulting behavior, so the logic below +# is adapted from before we introduced MultiUser.nsh. + +# if $0 is empty, this is the first time for this viewer name +ReadRegStr $0 SHELL_CONTEXT "${INSTNAME_KEY}" "" + +# viewer with this name was installed before +${If} $0 != "" + # 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 -- cgit v1.2.3 From df840bde0f83c6ecf3b67c39bedf7f67a71b3dcd Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 21 Feb 2019 19:45:09 -1000 Subject: INTL-318: Add translations for new Windows installer messages. --- indra/newview/installers/windows/lang_de.nsi | Bin 12582 -> 13014 bytes indra/newview/installers/windows/lang_es.nsi | Bin 12630 -> 12744 bytes indra/newview/installers/windows/lang_fr.nsi | Bin 12990 -> 13262 bytes indra/newview/installers/windows/lang_it.nsi | Bin 12278 -> 12480 bytes indra/newview/installers/windows/lang_ja.nsi | Bin 9988 -> 9644 bytes indra/newview/installers/windows/lang_pt-br.nsi | Bin 12748 -> 12892 bytes indra/newview/installers/windows/lang_ru.nsi | Bin 11940 -> 12216 bytes indra/newview/installers/windows/lang_tr.nsi | Bin 12044 -> 12128 bytes indra/newview/installers/windows/lang_zh.nsi | Bin 9708 -> 9082 bytes 9 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/installers/windows/lang_de.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_es.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_fr.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_it.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_ja.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_pt-br.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_ru.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_tr.nsi mode change 100644 => 100755 indra/newview/installers/windows/lang_zh.nsi (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/lang_de.nsi b/indra/newview/installers/windows/lang_de.nsi old mode 100644 new mode 100755 index 6abd496849..8bb20476b3 Binary files a/indra/newview/installers/windows/lang_de.nsi and b/indra/newview/installers/windows/lang_de.nsi differ diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi old mode 100644 new mode 100755 index 5daac908c9..b45f0520c7 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ diff --git a/indra/newview/installers/windows/lang_fr.nsi b/indra/newview/installers/windows/lang_fr.nsi old mode 100644 new mode 100755 index c437a0bdb4..f038c0e419 Binary files a/indra/newview/installers/windows/lang_fr.nsi and b/indra/newview/installers/windows/lang_fr.nsi differ diff --git a/indra/newview/installers/windows/lang_it.nsi b/indra/newview/installers/windows/lang_it.nsi old mode 100644 new mode 100755 index 78be4a3464..bd16d8318f Binary files a/indra/newview/installers/windows/lang_it.nsi and b/indra/newview/installers/windows/lang_it.nsi differ diff --git a/indra/newview/installers/windows/lang_ja.nsi b/indra/newview/installers/windows/lang_ja.nsi old mode 100644 new mode 100755 index 2eb40e280b..71edde1992 Binary files a/indra/newview/installers/windows/lang_ja.nsi and b/indra/newview/installers/windows/lang_ja.nsi differ diff --git a/indra/newview/installers/windows/lang_pt-br.nsi b/indra/newview/installers/windows/lang_pt-br.nsi old mode 100644 new mode 100755 index 79c2b7b114..0e7cbeacda Binary files a/indra/newview/installers/windows/lang_pt-br.nsi and b/indra/newview/installers/windows/lang_pt-br.nsi differ diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi old mode 100644 new mode 100755 index 0ef1023d88..8a362ba02a Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi old mode 100644 new mode 100755 index 4bb4e14bfa..8b8a69a024 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ diff --git a/indra/newview/installers/windows/lang_zh.nsi b/indra/newview/installers/windows/lang_zh.nsi old mode 100644 new mode 100755 index fccf119625..397bd0ac81 Binary files a/indra/newview/installers/windows/lang_zh.nsi and b/indra/newview/installers/windows/lang_zh.nsi differ -- cgit v1.2.3 From f235317cb2c0713530e2459ab6ca9556f2ac9904 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 21 Feb 2019 20:45:18 -1000 Subject: INTL-318: Fix syntax error in lang_es.nsi. --- indra/newview/installers/windows/lang_es.nsi | Bin 12744 -> 12744 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/lang_es.nsi b/indra/newview/installers/windows/lang_es.nsi index b45f0520c7..8a81110069 100755 Binary files a/indra/newview/installers/windows/lang_es.nsi and b/indra/newview/installers/windows/lang_es.nsi differ -- cgit v1.2.3 From c505cf1914110785b94268afbbfa8ecb0505c462 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 22 Feb 2019 05:20:09 -1000 Subject: INTL-318: Fix similar syntax error in lang_ru.nsi. --- indra/newview/installers/windows/lang_ru.nsi | Bin 12216 -> 12216 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/lang_ru.nsi b/indra/newview/installers/windows/lang_ru.nsi index 8a362ba02a..d55aacc971 100755 Binary files a/indra/newview/installers/windows/lang_ru.nsi and b/indra/newview/installers/windows/lang_ru.nsi differ -- cgit v1.2.3 From 765259b20060b51e236e326ae2ebe0a219c80864 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 22 Feb 2019 06:03:32 -1000 Subject: INTL-318: Fix syntax error in lang_tr.nsi. --- indra/newview/installers/windows/lang_tr.nsi | Bin 12128 -> 12126 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'indra/newview/installers') diff --git a/indra/newview/installers/windows/lang_tr.nsi b/indra/newview/installers/windows/lang_tr.nsi index 8b8a69a024..4746f84482 100755 Binary files a/indra/newview/installers/windows/lang_tr.nsi and b/indra/newview/installers/windows/lang_tr.nsi differ -- cgit v1.2.3