summaryrefslogtreecommitdiff
path: root/indra/newview/installers
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/installers')
-rwxr-xr-xindra/newview/installers/darwin/fix_application_icon_position.sh36
-rw-r--r--indra/newview/installers/windows/installer_template.nsi79
-rw-r--r--indra/newview/installers/windows/lang_en-us.nsibin9096 -> 8734 bytes
3 files changed, 69 insertions, 46 deletions
diff --git a/indra/newview/installers/darwin/fix_application_icon_position.sh b/indra/newview/installers/darwin/fix_application_icon_position.sh
index 618e34820c..62abcdd07e 100755
--- a/indra/newview/installers/darwin/fix_application_icon_position.sh
+++ b/indra/newview/installers/darwin/fix_application_icon_position.sh
@@ -1,17 +1,23 @@
-# just run this script each time after you change the installer's name to fix the icon misalignment
#!/bin/bash
-cp -r ../../../../build-darwin-i386/newview/*.dmg ~/Desktop/TempBuild.dmg
-hdid ~/Desktop/TempBuild.dmg
-open -a finder /Volumes/Second\ Life\ Installer
-osascript dmg-cleanup.applescript
-umount /Volumes/Second\ Life\ Installer/
-hdid ~/Desktop/TempBuild.dmg
-open -a finder /Volumes/Second\ Life\ Installer
-#cp /Volumes/Second\ Life\ Installer/.DS_Store ~/Desktop/_DS_Store
+# just run this script each time after you change the installer's name to fix the icon misalignment
+mydir="$(dirname "$0")"
+# If there's more than one DMG in more than one build directory, pick the most
+# recent one.
+dmgfile="$(ls -t "$mydir/../../../../build-darwin-*/newview/*.dmg" | head -n 1)"
+dmgwork="$HOME/Desktop/TempBuild.dmg"
+mounted="/Volumes/Second Life Installer"
+cp -r "$dmgfile" "$dmgwork"
+hdid "$dmgwork"
+open -a finder "$mounted"
+osascript "$mydir/dmg-cleanup.applescript"
+umount "$mounted"/
+hdid "$dmgwork"
+open -a finder "$mounted"
+#cp "$mounted"/.DS_Store ~/Desktop/_DS_Store
#chflags nohidden ~/Desktop/_DS_Store
-#cp ~/Desktop/_DS_Store ./firstlook-dmg/_DS_Store
-#cp ~/Desktop/_DS_Store ./publicnightly-dmg/_DS_Store
-#cp ~/Desktop/_DS_Store ./release-dmg/_DS_Store
-#cp ~/Desktop/_DS_Store ./releasecandidate-dmg/_DS_Store
-#umount /Volumes/Second\ Life\ Installer/
-#rm ~/Desktop/_DS_Store ~/Desktop/TempBuild.dmg
+#cp ~/Desktop/_DS_Store "$mydir/firstlook-dmg/_DS_Store"
+#cp ~/Desktop/_DS_Store "$mydir/publicnightly-dmg/_DS_Store"
+#cp ~/Desktop/_DS_Store "$mydir/release-dmg/_DS_Store"
+#cp ~/Desktop/_DS_Store "$mydir/releasecandidate-dmg/_DS_Store"
+#umount "$mounted"/
+#rm ~/Desktop/_DS_Store "$dmgwork"
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 89317f2793..4ca850e30f 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
@@ -102,6 +105,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
@@ -118,6 +122,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,6 +142,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
@@ -194,6 +215,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
@@ -253,10 +277,10 @@ 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
-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
@@ -276,7 +300,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" "$INSTDIR\$VIEWER_EXE"
WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \
@@ -294,15 +318,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" "$INSTDIR\$VIEWER_EXE"
CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" \
- "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM"
+ "$INSTDIR\$INSTEXE" "$SHORTCUT_LANG_PARAM" "$INSTDIR\$VIEWER_EXE"
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
@@ -318,6 +342,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
@@ -335,6 +363,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"
@@ -372,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\*.*"
@@ -420,23 +454,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_LONG} 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
;;
;; If called through auto-update, need to uninstall any existing V2 installation.
@@ -559,7 +576,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"
@@ -697,12 +714,12 @@ FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
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;
+ 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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
diff --git a/indra/newview/installers/windows/lang_en-us.nsi b/indra/newview/installers/windows/lang_en-us.nsi
index aa403a961c..00aa47de69 100644
--- a/indra/newview/installers/windows/lang_en-us.nsi
+++ b/indra/newview/installers/windows/lang_en-us.nsi
Binary files differ