Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
63fdeb14
Commit
63fdeb14
authored
13 years ago
by
Brad Payne (Vir Linden)
Browse files
Options
Downloads
Patches
Plain Diff
SH-2515 WIP, STORM-280 WIP - ported over Oz fix for cache overdeletion during uninstall
parent
0fcef13a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/installers/windows/installer_template.nsi
+121
-13
121 additions, 13 deletions
indra/newview/installers/windows/installer_template.nsi
with
121 additions
and
13 deletions
indra/newview/installers/windows/installer_template.nsi
+
121
−
13
View file @
63fdeb14
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; secondlife setup.nsi
;; Copyright 2004-2010, Linden Research, Inc.
;; Copyright 2004-2011, Linden Research, Inc.
;;
;; This library is free software; you can redistribute it and/or
;; modify it under the terms of the GNU Lesser General Public
;; License as published by the Free Software Foundation;
;; version 2.1 of the License only.
;;
;; This library is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
;; Lesser General Public License for more details.
;;
;; You should have received a copy of the GNU Lesser General Public
;; License along with this library; if not, write to the Free Software
;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
;;
;; Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
;;
;; NSIS Unicode 2.38.1 or higher required
;; http://www.scratchpaper.com/
...
...
@@ -293,6 +309,97 @@ Function CheckNetworkConnection
Return
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Save files from cache
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function PreserveCacheFiles
Push $0
Push $1
Push $2
RMDir /r "$TEMP\SecondLifeSettingsBackup"
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 "$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 "$2\Application Data\SecondLife\*" "$TEMP\SecondLifeSettingsBackup\AllUsers\"
Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Restore files from cache
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Function RestoreCacheFiles
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 "$2\Application Data\SecondLifeRestore\"
CreateDirectory "$2\Application Data\SecondLifeRestore\"
CopyFiles "$TEMP\SecondLifeSettingsBackup\$0\*" "$2\Application Data\SecondLifeRestore\"
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 "$2\Application Data\SecondLifeRestore\"
CreateDirectory "$2\Application Data\SecondLifeRestore\"
CopyFiles "$TEMP\SecondLifeSettingsBackup\AllUsers\*" "$2\Application Data\SecondLifeRestore\"
Pop $0
FunctionEnd
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete files in Documents and Settings\<user>\SecondLife\cache
; Delete files in Documents and Settings\All Users\SecondLife\cache
...
...
@@ -503,18 +610,15 @@ Push $2
; Required since ProfileImagePath is of type REG_EXPAND_SZ
ExpandEnvStrings $2 $2
; If uninstalling a normal install remove everything
; Otherwise (preview/dmz etc) just remove cache
MessageBox MB_OK 'RM_ALL points at "$2\Application Data\SecondLife"'
StrCmp $INSTFLAGS "" RM_ALL RM_CACHE
RM_ALL:
RMDir /r "$2\Application Data\SecondLife"
RM_CACHE:
# Local Settings directory is the cache, there is no "cache" subdir
RMDir /r "$2\Local Settings\Application Data\SecondLife"
# Vista version of the same
RMDir /r "$2\AppData\Local\SecondLife"
Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml"
; Remove all cache and settings files but leave any other .txt files to preserve the chat logs
RMDir /r "$2\Application Data\SecondLife\logs"
RMDir /r "$2\Application Data\SecondLife\browser_profile"
RMDir /r "$2\Application Data\SecondLife\user_settings"
Delete "$2\Application Data\SecondLife\*.xml"
Delete "$2\Application Data\SecondLife\*.bmp"
Delete "$2\Application Data\SecondLife\search_history.txt"
Delete "$2\Application Data\SecondLife\plugin_cookies.txt"
Delete "$2\Application Data\SecondLife\typed_locations.txt"
CONTINUE:
IntOp $0 $0 + 1
...
...
@@ -862,6 +966,10 @@ Call CloseSecondLife ; Make sure we're not running
Call CheckNetworkConnection ; ping secondlife.com
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Call PreserveCacheFiles
Call RestoreCacheFiles
;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers.
;Call RemoveCacheFiles ; Installing over removes potentially corrupted
; VFS and cache files.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment