summaryrefslogtreecommitdiff
path: root/indra/newview/installers/windows/installer_template.nsi
diff options
context:
space:
mode:
authorTank_Master <tank.master@phoenixviewer.com>2015-02-14 23:09:36 -0800
committerTank_Master <tank.master@phoenixviewer.com>2015-02-14 23:09:36 -0800
commitd2a373a58f001037e2d62c12fe55f7345ed4b19d (patch)
tree53dece6d6265e23b771c5ab8179e3167d5adfa2f /indra/newview/installers/windows/installer_template.nsi
parentbee9166a80c9fd426bea66e1f893bd59aee9d83e (diff)
Don’t delete user's settings with auto install, removing the need to back them up and then restore them later
This saves time and lowers the risk of something going wrong with the file copy process
Diffstat (limited to 'indra/newview/installers/windows/installer_template.nsi')
-rwxr-xr-xindra/newview/installers/windows/installer_template.nsi134
1 files changed, 2 insertions, 132 deletions
diff --git a/indra/newview/installers/windows/installer_template.nsi b/indra/newview/installers/windows/installer_template.nsi
index 49500ab80d..574feb2099 100755
--- a/indra/newview/installers/windows/installer_template.nsi
+++ b/indra/newview/installers/windows/installer_template.nsi
@@ -255,7 +255,6 @@ Call CheckNetworkConnection # Ping secondlife.com
Call CheckWillUninstallV2 # Check if SecondLife is already installed
StrCmp $DO_UNINSTALL_V2 "" PRESERVE_DONE
- Call PreserveUserFiles
PRESERVE_DONE:
Call RemoveProgFilesOnInst # Remove existing files to prevent certain errors when running the new version of the viewer
@@ -325,8 +324,6 @@ StrCmp $DO_UNINSTALL_V2 "" REMOVE_SLV2_DONE
Delete "$PROGRAMFILES\SecondLifeViewer2\uninst.exe" # with _? option above, uninst.exe will be left behind.
RMDir "$PROGRAMFILES\SecondLifeViewer2" # will remove only if empty.
- Call RestoreUserFiles
- Call RemoveTempUserFiles
REMOVE_SLV2_DONE:
SectionEnd
@@ -535,135 +532,6 @@ Function CheckNetworkConnection
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Save user files to temp location
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function PreserveUserFiles
-
-Push $0
-Push $1
-Push $2
-
- RMDir /r "$TEMP\SecondLifeSettingsBackup" # Clear out any old data that might be there
- CreateDirectory "$TEMP\SecondLifeSettingsBackup"
- StrCpy $0 0 # Index number used to iterate via EnumRegKey
-
- LOOP:
- EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0
- StrCmp $1 "" DONE # no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing
-
-# Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\$0"
- CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\$0"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-# 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"
- StrCmp $0 "" +2
- CreateDirectory "$TEMP\SecondLifeSettingsBackup\AllUsers\"
- CopyFiles /SILENT "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Restore user files from temp location
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RestoreUserFiles
-
-Push $0
-Push $1
-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
- StrCmp $1 "" DONE # no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing
-
-# Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- CreateDirectory "$2\Application Data\SecondLife\"
- CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLife\"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-# 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"
- StrCmp $0 "" +2
- CreateDirectory "$2\Application Data\SecondLife\"
- CopyFiles /SILENT "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLife\"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Remove temp directories
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-Function RemoveTempUserFiles
-
-Push $0
-Push $1
-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
- StrCmp $1 "" DONE # no more users
-
- ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath"
- StrCmp $2 "" CONTINUE 0 # "ProfileImagePath" value is missing
-
-# Required since ProfileImagePath is of type REG_EXPAND_SZ
- ExpandEnvStrings $2 $2
-
- RMDir /r "$TEMP\SecondLifeSettingsBackup\$0\*"
-
- CONTINUE:
- IntOp $0 $0 + 1
- Goto LOOP
- DONE:
-
-Pop $2
-Pop $1
-Pop $0
-
-# 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"
- StrCmp $0 "" +2
- RMDir /r "$TEMP\SecondLifeSettingsBackup\AllUsers\*"
-Pop $0
-
-FunctionEnd
-
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Delete files on install if previous isntall exsists to prevent undesiered behavior
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function RemoveProgFilesOnInst
@@ -688,6 +556,8 @@ FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function un.UserSettingsFiles
+StrCmp $DO_UNINSTALL_V2 "" Keep # don't remove user's settings files on auto upgrade
+
# Ask if user wants to keep data files or not
MessageBox MB_YESNO|MB_ICONQUESTION $(RemoveDataFilesMB) IDYES Remove IDNO Keep