diff options
Diffstat (limited to 'linden/indra/newview/installers/windows/installer_template.nsi')
-rw-r--r-- | linden/indra/newview/installers/windows/installer_template.nsi | 1968 |
1 files changed, 984 insertions, 984 deletions
diff --git a/linden/indra/newview/installers/windows/installer_template.nsi b/linden/indra/newview/installers/windows/installer_template.nsi index ec4fd85..9da45dc 100644 --- a/linden/indra/newview/installers/windows/installer_template.nsi +++ b/linden/indra/newview/installers/windows/installer_template.nsi | |||
@@ -1,984 +1,984 @@ | |||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; secondlife setup.nsi | 2 | ;; imprudence setup.nsi |
3 | ;; Copyright 2004-2007, Linden Research, Inc. | 3 | ;; Copyright 2004-2007, Linden Research, Inc. |
4 | ;; For info, see http://www.nullsoft.com/free/nsis/ | 4 | ;; For info, see http://www.nullsoft.com/free/nsis/ |
5 | ;; | 5 | ;; |
6 | ;; NSIS 2.22 or higher required | 6 | ;; NSIS 2.22 or higher required |
7 | ;; Author: James Cook, Don Kjer, Callum Prentice | 7 | ;; Author: James Cook, Don Kjer, Callum Prentice |
8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
9 | 9 | ||
10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
11 | ;;; Detect NSIS compiler version | 11 | ;;; Detect NSIS compiler version |
12 | !define "NSIS${NSIS_VERSION}" | 12 | !define "NSIS${NSIS_VERSION}" |
13 | !ifdef "NSISv2.02" | "NSISv2.03" | "NSISv2.04" | "NSISv2.05" | "NSISv2.06" | 13 | !ifdef "NSISv2.02" | "NSISv2.03" | "NSISv2.04" | "NSISv2.05" | "NSISv2.06" |
14 | ;; before 2.07 defaulted lzma to solid (whole file) | 14 | ;; before 2.07 defaulted lzma to solid (whole file) |
15 | SetCompressor lzma | 15 | SetCompressor lzma |
16 | !else | 16 | !else |
17 | ;; after 2.07 required /solid for whole file compression | 17 | ;; after 2.07 required /solid for whole file compression |
18 | SetCompressor /solid lzma | 18 | SetCompressor /solid lzma |
19 | !endif | 19 | !endif |
20 | 20 | ||
21 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 21 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
22 | ;; Compiler flags | 22 | ;; Compiler flags |
23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
24 | SetOverwrite on ; overwrite files | 24 | SetOverwrite on ; overwrite files |
25 | SetCompress auto ; compress iff saves space | 25 | SetCompress auto ; compress iff saves space |
26 | SetDatablockOptimize off ; only saves us 0.1%, not worth it | 26 | SetDatablockOptimize off ; only saves us 0.1%, not worth it |
27 | XPStyle on ; add an XP manifest to the installer | 27 | XPStyle on ; add an XP manifest to the installer |
28 | 28 | ||
29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
30 | ;;; Project flags | 30 | ;;; Project flags |
31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 31 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
32 | 32 | ||
33 | %%VERSION%% | 33 | %%VERSION%% |
34 | 34 | ||
35 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 35 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
36 | ;; - language files - one for each language (or flavor thereof) | 36 | ;; - language files - one for each language (or flavor thereof) |
37 | ;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the | 37 | ;; (these files are in the same place as the nsi template but the python script generates a new nsi file in the |
38 | ;; application directory so we have to add a path to these include files) | 38 | ;; application directory so we have to add a path to these include files) |
39 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 39 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
40 | !include "%%SOURCE%%\installers\windows\lang_de.nsi" | 40 | !include "%%SOURCE%%\installers\windows\lang_de.nsi" |
41 | !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" | 41 | !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" |
42 | !include "%%SOURCE%%\installers\windows\lang_ja.nsi" | 42 | !include "%%SOURCE%%\installers\windows\lang_ja.nsi" |
43 | !include "%%SOURCE%%\installers\windows\lang_ko.nsi" | 43 | !include "%%SOURCE%%\installers\windows\lang_ko.nsi" |
44 | 44 | ||
45 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 45 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
46 | ;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py) | 46 | ;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py) |
47 | %%GRID_VARS%% | 47 | %%GRID_VARS%% |
48 | 48 | ||
49 | Name ${INSTNAME} | 49 | Name ${INSTNAME} |
50 | 50 | ||
51 | SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text | 51 | SubCaption 0 $(LicenseSubTitleSetup) ; override "license agreement" text |
52 | 52 | ||
53 | BrandingText " " ; bottom of window text | 53 | BrandingText " " ; bottom of window text |
54 | Icon %%SOURCE%%\res\install_icon.ico ; our custom icon | 54 | Icon %%SOURCE%%\res\install_icon.ico ; our custom icon |
55 | UninstallIcon %%SOURCE%%\res\uninstall_icon.ico ; our custom icon | 55 | UninstallIcon %%SOURCE%%\res\uninstall_icon.ico ; our custom icon |
56 | WindowIcon on ; show our icon in left corner | 56 | WindowIcon on ; show our icon in left corner |
57 | BGGradient off ; no big background window | 57 | BGGradient off ; no big background window |
58 | CRCCheck on ; make sure CRC is OK | 58 | CRCCheck on ; make sure CRC is OK |
59 | InstProgressFlags smooth colored ; new colored smooth look | 59 | InstProgressFlags smooth colored ; new colored smooth look |
60 | ShowInstDetails nevershow ; no details, no "show" button | 60 | ShowInstDetails nevershow ; no details, no "show" button |
61 | SetOverwrite on ; stomp files by default | 61 | SetOverwrite on ; stomp files by default |
62 | AutoCloseWindow true ; after all files install, close window | 62 | AutoCloseWindow true ; after all files install, close window |
63 | 63 | ||
64 | InstallDir "$PROGRAMFILES\${INSTNAME}" | 64 | InstallDir "$PROGRAMFILES\${INSTNAME}" |
65 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" | 65 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" |
66 | !ifdef UPDATE | 66 | !ifdef UPDATE |
67 | DirText $(DirectoryChooseTitle) $(DirectoryChooseUpdate) | 67 | DirText $(DirectoryChooseTitle) $(DirectoryChooseUpdate) |
68 | !else | 68 | !else |
69 | DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) | 69 | DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) |
70 | !endif | 70 | !endif |
71 | 71 | ||
72 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 72 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
73 | ;;; Variables | 73 | ;;; Variables |
74 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 74 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
75 | Var INSTPROG | 75 | Var INSTPROG |
76 | Var INSTEXE | 76 | Var INSTEXE |
77 | Var INSTFLAGS | 77 | Var INSTFLAGS |
78 | Var LANGFLAGS | 78 | Var LANGFLAGS |
79 | Var INSTSHORTCUT | 79 | Var INSTSHORTCUT |
80 | 80 | ||
81 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 81 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
82 | ;;; Sections | 82 | ;;; Sections |
83 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 83 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
84 | Section "" ; (default section) | 84 | Section "" ; (default section) |
85 | 85 | ||
86 | SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well) | 86 | SetShellVarContext all ; install for all users (if you change this, change it in the uninstall as well) |
87 | 87 | ||
88 | ; Start with some default values. | 88 | ; Start with some default values. |
89 | StrCpy $INSTFLAGS "${INSTFLAGS}" | 89 | StrCpy $INSTFLAGS "${INSTFLAGS}" |
90 | StrCpy $INSTPROG "${INSTNAME}" | 90 | StrCpy $INSTPROG "${INSTNAME}" |
91 | StrCpy $INSTEXE "${INSTEXE}" | 91 | StrCpy $INSTEXE "${INSTEXE}" |
92 | StrCpy $INSTSHORTCUT "${SHORTCUT}" | 92 | StrCpy $INSTSHORTCUT "${SHORTCUT}" |
93 | 93 | ||
94 | IfSilent +2 | 94 | IfSilent +2 |
95 | Goto NOT_SILENT | 95 | Goto NOT_SILENT |
96 | Call CheckStartupParams ; Figure out where, what and how to install. | 96 | Call CheckStartupParams ; Figure out where, what and how to install. |
97 | NOT_SILENT: | 97 | NOT_SILENT: |
98 | Call CheckWindowsVersion ; warn if on Windows 98/ME | 98 | Call CheckWindowsVersion ; warn if on Windows 98/ME |
99 | Call CheckIfAdministrator ; Make sure the user can install/uninstall | 99 | Call CheckIfAdministrator ; Make sure the user can install/uninstall |
100 | Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version | 100 | Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version |
101 | Call CloseSecondLife ; Make sure we're not running | 101 | Call CloseSecondLife ; Make sure we're not running |
102 | Call RemoveNSIS ; Check for old NSIS install to remove | 102 | Call RemoveNSIS ; Check for old NSIS install to remove |
103 | 103 | ||
104 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 104 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
105 | ;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers. | 105 | ;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers. |
106 | ;Call RemoveCacheFiles ; Installing over removes potentially corrupted | 106 | ;Call RemoveCacheFiles ; Installing over removes potentially corrupted |
107 | ; VFS and cache files. | 107 | ; VFS and cache files. |
108 | 108 | ||
109 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 109 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
110 | ;;; Need to clean out shader files from previous installs to fix DEV-5663 | 110 | ;;; Need to clean out shader files from previous installs to fix DEV-5663 |
111 | Call RemoveOldShaders | 111 | Call RemoveOldShaders |
112 | 112 | ||
113 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 113 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
114 | ;;; Need to clean out old XUI files that predate skinning | 114 | ;;; Need to clean out old XUI files that predate skinning |
115 | Call RemoveOldXUI | 115 | Call RemoveOldXUI |
116 | 116 | ||
117 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 117 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
118 | ;;; Clear out old releasenotes.txt files. These are now on the public wiki. | 118 | ;;; Clear out old releasenotes.txt files. These are now on the public wiki. |
119 | Call RemoveOldReleaseNotes | 119 | Call RemoveOldReleaseNotes |
120 | 120 | ||
121 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 121 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
122 | ;;; Files | 122 | ;;; Files |
123 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 123 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
124 | ;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py | 124 | ;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py |
125 | %%INSTALL_FILES%% | 125 | %%INSTALL_FILES%% |
126 | 126 | ||
127 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 127 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
128 | ; If this is a silent update, we don't need to re-create these shortcuts or registry entries. | 128 | ; If this is a silent update, we don't need to re-create these shortcuts or registry entries. |
129 | IfSilent POST_INSTALL | 129 | IfSilent POST_INSTALL |
130 | 130 | ||
131 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 131 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
132 | ; Shortcuts in start menu | 132 | ; Shortcuts in start menu |
133 | CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" | 133 | CreateDirectory "$SMPROGRAMS\$INSTSHORTCUT" |
134 | SetOutPath "$INSTDIR" | 134 | SetOutPath "$INSTDIR" |
135 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ | 135 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ |
136 | "$INSTDIR\$INSTEXE" "$INSTFLAGS" | 136 | "$INSTDIR\$INSTEXE" "$INSTFLAGS" |
137 | 137 | ||
138 | !ifdef MUSEUM | 138 | !ifdef MUSEUM |
139 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum.lnk" \ | 139 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum.lnk" \ |
140 | 140 | ||
141 | "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" | 141 | "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" |
142 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum Spanish.lnk" \ | 142 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum Spanish.lnk" \ |
143 | 143 | ||
144 | "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" | 144 | "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" |
145 | !endif | 145 | !endif |
146 | 146 | ||
147 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Trial Account.url" \ | 147 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Trial Account.url" \ |
148 | "InternetShortcut" "URL" \ | 148 | "InternetShortcut" "URL" \ |
149 | "http://www.secondlife.com/registration/" | 149 | "http://www.secondlife.com/registration/" |
150 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ | 150 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ |
151 | "InternetShortcut" "URL" \ | 151 | "InternetShortcut" "URL" \ |
152 | "http://www.secondlife.com/account/" | 152 | "http://www.secondlife.com/account/" |
153 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \ | 153 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \ |
154 | "$INSTDIR\lsl_guide.html" | 154 | "$INSTDIR\lsl_guide.html" |
155 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ | 155 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ |
156 | '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' | 156 | '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' |
157 | 157 | ||
158 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 158 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
159 | ; Other shortcuts | 159 | ; Other shortcuts |
160 | SetOutPath "$INSTDIR" | 160 | SetOutPath "$INSTDIR" |
161 | CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" | 161 | CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" |
162 | CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" | 162 | CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" |
163 | CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ | 163 | CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ |
164 | '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' | 164 | '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' |
165 | 165 | ||
166 | !ifdef MUSEUM | 166 | !ifdef MUSEUM |
167 | CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" | 167 | CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" |
168 | 168 | ||
169 | CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" | 169 | CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" |
170 | 170 | ||
171 | CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" | 171 | CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" |
172 | 172 | ||
173 | CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" | 173 | CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" |
174 | 174 | ||
175 | !endif | 175 | !endif |
176 | 176 | ||
177 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 177 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
178 | ; Write registry | 178 | ; Write registry |
179 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" | 179 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" "$INSTDIR" |
180 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" | 180 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" "${VERSION_LONG}" |
181 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" "$INSTFLAGS" | 181 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" "$INSTFLAGS" |
182 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" | 182 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" |
183 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" | 183 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" |
184 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" | 184 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" |
185 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe" /P="$INSTPROG"' | 185 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe" /P="$INSTPROG"' |
186 | 186 | ||
187 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 187 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
188 | ; Write URL registry info | 188 | ; Write URL registry info |
189 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" | 189 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" |
190 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" | 190 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" |
191 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' | 191 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' |
192 | WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' | 192 | WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' |
193 | 193 | ||
194 | Goto WRITE_UNINST | 194 | Goto WRITE_UNINST |
195 | 195 | ||
196 | POST_INSTALL: | 196 | POST_INSTALL: |
197 | ; Run a post-executable script if necessary. | 197 | ; Run a post-executable script if necessary. |
198 | Call PostInstallExe | 198 | Call PostInstallExe |
199 | 199 | ||
200 | WRITE_UNINST: | 200 | WRITE_UNINST: |
201 | ; write out uninstaller | 201 | ; write out uninstaller |
202 | WriteUninstaller "$INSTDIR\uninst.exe" | 202 | WriteUninstaller "$INSTDIR\uninst.exe" |
203 | 203 | ||
204 | ; end of default section | 204 | ; end of default section |
205 | SectionEnd | 205 | SectionEnd |
206 | 206 | ||
207 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 207 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
208 | ; PostInstallExe | 208 | ; PostInstallExe |
209 | ; This just runs any post installation scripts. | 209 | ; This just runs any post installation scripts. |
210 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 210 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
211 | Function PostInstallExe | 211 | Function PostInstallExe |
212 | push $0 | 212 | push $0 |
213 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "PostInstallExe" | 213 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "PostInstallExe" |
214 | ;MessageBox MB_OK '$0' | 214 | ;MessageBox MB_OK '$0' |
215 | ExecWait '$0' | 215 | ExecWait '$0' |
216 | pop $0 | 216 | pop $0 |
217 | FunctionEnd | 217 | FunctionEnd |
218 | 218 | ||
219 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 219 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
220 | ; CheckStartupParameters | 220 | ; CheckStartupParameters |
221 | ; Sets INSTFLAGS, INSTPROG, and INSTEXE. | 221 | ; Sets INSTFLAGS, INSTPROG, and INSTEXE. |
222 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 222 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
223 | Function CheckStartupParams | 223 | Function CheckStartupParams |
224 | push $0 | 224 | push $0 |
225 | push $R0 | 225 | push $R0 |
226 | 226 | ||
227 | ; Look for a registry entry with info about where to update. | 227 | ; Look for a registry entry with info about where to update. |
228 | Call GetProgramName | 228 | Call GetProgramName |
229 | pop $R0 | 229 | pop $R0 |
230 | StrCpy $INSTPROG "$R0" | 230 | StrCpy $INSTPROG "$R0" |
231 | StrCpy $INSTEXE "$R0.exe" | 231 | StrCpy $INSTEXE "$R0.exe" |
232 | 232 | ||
233 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" | 233 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" |
234 | ; If key doesn't exist, skip install | 234 | ; If key doesn't exist, skip install |
235 | IfErrors ABORT | 235 | IfErrors ABORT |
236 | StrCpy $INSTDIR "$0" | 236 | StrCpy $INSTDIR "$0" |
237 | 237 | ||
238 | ; We now have a directory to install to. Get the startup parameters and shortcut as well. | 238 | ; We now have a directory to install to. Get the startup parameters and shortcut as well. |
239 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" | 239 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" |
240 | IfErrors +2 | 240 | IfErrors +2 |
241 | StrCpy $INSTFLAGS "$0" | 241 | StrCpy $INSTFLAGS "$0" |
242 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" | 242 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" |
243 | IfErrors +2 | 243 | IfErrors +2 |
244 | StrCpy $INSTSHORTCUT "$0" | 244 | StrCpy $INSTSHORTCUT "$0" |
245 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" | 245 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" |
246 | IfErrors +2 | 246 | IfErrors +2 |
247 | StrCpy $INSTEXE "$0" | 247 | StrCpy $INSTEXE "$0" |
248 | Goto FINISHED | 248 | Goto FINISHED |
249 | 249 | ||
250 | ABORT: | 250 | ABORT: |
251 | MessageBox MB_OK $(CheckStartupParamsMB) | 251 | MessageBox MB_OK $(CheckStartupParamsMB) |
252 | Quit | 252 | Quit |
253 | 253 | ||
254 | FINISHED: | 254 | FINISHED: |
255 | ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" | 255 | ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" |
256 | pop $R0 | 256 | pop $R0 |
257 | pop $0 | 257 | pop $0 |
258 | FunctionEnd | 258 | FunctionEnd |
259 | 259 | ||
260 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 260 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
261 | ;; | 261 | ;; |
262 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 262 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
263 | Function un.CheckStartupParams | 263 | Function un.CheckStartupParams |
264 | push $0 | 264 | push $0 |
265 | push $R0 | 265 | push $R0 |
266 | 266 | ||
267 | ; Look for a registry entry with info about where to update. | 267 | ; Look for a registry entry with info about where to update. |
268 | Call un.GetProgramName | 268 | Call un.GetProgramName |
269 | pop $R0 | 269 | pop $R0 |
270 | StrCpy $INSTPROG "$R0" | 270 | StrCpy $INSTPROG "$R0" |
271 | StrCpy $INSTEXE "$R0.exe" | 271 | StrCpy $INSTEXE "$R0.exe" |
272 | 272 | ||
273 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" | 273 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" |
274 | ; If key doesn't exist, skip install | 274 | ; If key doesn't exist, skip install |
275 | IfErrors ABORT | 275 | IfErrors ABORT |
276 | StrCpy $INSTDIR "$0" | 276 | StrCpy $INSTDIR "$0" |
277 | 277 | ||
278 | ; We now have a directory to install to. Get the startup parameters and shortcut as well. | 278 | ; We now have a directory to install to. Get the startup parameters and shortcut as well. |
279 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" | 279 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" |
280 | IfErrors +2 | 280 | IfErrors +2 |
281 | StrCpy $INSTFLAGS "$0" | 281 | StrCpy $INSTFLAGS "$0" |
282 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" | 282 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" |
283 | IfErrors +2 | 283 | IfErrors +2 |
284 | StrCpy $INSTSHORTCUT "$0" | 284 | StrCpy $INSTSHORTCUT "$0" |
285 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" | 285 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" |
286 | IfErrors +2 | 286 | IfErrors +2 |
287 | StrCpy $INSTEXE "$0" | 287 | StrCpy $INSTEXE "$0" |
288 | Goto FINISHED | 288 | Goto FINISHED |
289 | 289 | ||
290 | ABORT: | 290 | ABORT: |
291 | MessageBox MB_OK $(CheckStartupParamsMB) | 291 | MessageBox MB_OK $(CheckStartupParamsMB) |
292 | Quit | 292 | Quit |
293 | 293 | ||
294 | FINISHED: | 294 | FINISHED: |
295 | ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" | 295 | ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" |
296 | pop $R0 | 296 | pop $R0 |
297 | pop $0 | 297 | pop $0 |
298 | FunctionEnd | 298 | FunctionEnd |
299 | 299 | ||
300 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 300 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
301 | ;;; After install completes, offer readme file | 301 | ;;; After install completes, offer readme file |
302 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 302 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
303 | Function .onInstSuccess | 303 | Function .onInstSuccess |
304 | MessageBox MB_YESNO \ | 304 | MessageBox MB_YESNO \ |
305 | $(InstSuccesssQuestion) /SD IDYES IDNO NoReadme | 305 | $(InstSuccesssQuestion) /SD IDYES IDNO NoReadme |
306 | ; Assumes SetOutPath $INSTDIR | 306 | ; Assumes SetOutPath $INSTDIR |
307 | Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' | 307 | Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' |
308 | NoReadme: | 308 | NoReadme: |
309 | FunctionEnd | 309 | FunctionEnd |
310 | 310 | ||
311 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 311 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
312 | ; Remove old NSIS version. Modifies no variables. | 312 | ; Remove old NSIS version. Modifies no variables. |
313 | ; Does NOT delete the LindenWorld directory, or any | 313 | ; Does NOT delete the LindenWorld directory, or any |
314 | ; user files in that directory. | 314 | ; user files in that directory. |
315 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 315 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
316 | Function RemoveNSIS | 316 | Function RemoveNSIS |
317 | Push $0 | 317 | Push $0 |
318 | ; Grab the installation directory of the old version | 318 | ; Grab the installation directory of the old version |
319 | DetailPrint $(RemoveOldNSISVersion) | 319 | DetailPrint $(RemoveOldNSISVersion) |
320 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" | 320 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" |
321 | 321 | ||
322 | ; If key doesn't exist, skip uninstall | 322 | ; If key doesn't exist, skip uninstall |
323 | IfErrors NO_NSIS | 323 | IfErrors NO_NSIS |
324 | 324 | ||
325 | ; Clean up legacy beta shortcuts | 325 | ; Clean up legacy beta shortcuts |
326 | Delete "$SMPROGRAMS\Second Life Beta.lnk" | 326 | Delete "$SMPROGRAMS\Second Life Beta.lnk" |
327 | Delete "$DESKTOP\Second Life Beta.lnk" | 327 | Delete "$DESKTOP\Second Life Beta.lnk" |
328 | Delete "$SMPROGRAMS\Second Life.lnk" | 328 | Delete "$SMPROGRAMS\Second Life.lnk" |
329 | 329 | ||
330 | ; Clean up old newview.exe file | 330 | ; Clean up old newview.exe file |
331 | Delete "$INSTDIR\newview.exe" | 331 | Delete "$INSTDIR\newview.exe" |
332 | 332 | ||
333 | ; Intentionally don't delete the stuff in | 333 | ; Intentionally don't delete the stuff in |
334 | ; Documents and Settings, so we keep the user's settings | 334 | ; Documents and Settings, so we keep the user's settings |
335 | 335 | ||
336 | NO_NSIS: | 336 | NO_NSIS: |
337 | Pop $0 | 337 | Pop $0 |
338 | FunctionEnd | 338 | FunctionEnd |
339 | 339 | ||
340 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 340 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
341 | ; Make sure we're not on Windows 98 / ME | 341 | ; Make sure we're not on Windows 98 / ME |
342 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 342 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
343 | Function CheckWindowsVersion | 343 | Function CheckWindowsVersion |
344 | DetailPrint "Checking Windows version..." | 344 | DetailPrint "Checking Windows version..." |
345 | Call GetWindowsVersion | 345 | Call GetWindowsVersion |
346 | Pop $R0 | 346 | Pop $R0 |
347 | ; Just get first two characters, ignore 4.0 part of "NT 4.0" | 347 | ; Just get first two characters, ignore 4.0 part of "NT 4.0" |
348 | StrCpy $R0 $R0 2 | 348 | StrCpy $R0 $R0 2 |
349 | ; Blacklist certain OS versions | 349 | ; Blacklist certain OS versions |
350 | StrCmp $R0 "95" win_ver_bad | 350 | StrCmp $R0 "95" win_ver_bad |
351 | StrCmp $R0 "98" win_ver_bad | 351 | StrCmp $R0 "98" win_ver_bad |
352 | StrCmp $R0 "ME" win_ver_bad | 352 | StrCmp $R0 "ME" win_ver_bad |
353 | StrCmp $R0 "NT" win_ver_bad | 353 | StrCmp $R0 "NT" win_ver_bad |
354 | Return | 354 | Return |
355 | win_ver_bad: | 355 | win_ver_bad: |
356 | MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort | 356 | MessageBox MB_YESNO $(CheckWindowsVersionMB) IDNO win_ver_abort |
357 | Return | 357 | Return |
358 | win_ver_abort: | 358 | win_ver_abort: |
359 | Quit | 359 | Quit |
360 | FunctionEnd | 360 | FunctionEnd |
361 | 361 | ||
362 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 362 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
363 | ; Make sure the user can install/uninstall | 363 | ; Make sure the user can install/uninstall |
364 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 364 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
365 | Function CheckIfAdministrator | 365 | Function CheckIfAdministrator |
366 | DetailPrint $(CheckAdministratorInstDP) | 366 | DetailPrint $(CheckAdministratorInstDP) |
367 | UserInfo::GetAccountType | 367 | UserInfo::GetAccountType |
368 | Pop $R0 | 368 | Pop $R0 |
369 | StrCmp $R0 "Admin" is_admin | 369 | StrCmp $R0 "Admin" is_admin |
370 | MessageBox MB_OK $(CheckAdministratorInstMB) | 370 | MessageBox MB_OK $(CheckAdministratorInstMB) |
371 | Quit | 371 | Quit |
372 | is_admin: | 372 | is_admin: |
373 | Return | 373 | Return |
374 | FunctionEnd | 374 | FunctionEnd |
375 | 375 | ||
376 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 376 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
377 | ;; | 377 | ;; |
378 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 378 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
379 | Function un.CheckIfAdministrator | 379 | Function un.CheckIfAdministrator |
380 | DetailPrint $(CheckAdministratorUnInstDP) | 380 | DetailPrint $(CheckAdministratorUnInstDP) |
381 | UserInfo::GetAccountType | 381 | UserInfo::GetAccountType |
382 | Pop $R0 | 382 | Pop $R0 |
383 | StrCmp $R0 "Admin" is_admin | 383 | StrCmp $R0 "Admin" is_admin |
384 | MessageBox MB_OK $(CheckAdministratorUnInstMB) | 384 | MessageBox MB_OK $(CheckAdministratorUnInstMB) |
385 | Quit | 385 | Quit |
386 | is_admin: | 386 | is_admin: |
387 | Return | 387 | Return |
388 | FunctionEnd | 388 | FunctionEnd |
389 | 389 | ||
390 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 390 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
391 | ; Checks to see if the current version has already been installed (according to the registry). | 391 | ; Checks to see if the current version has already been installed (according to the registry). |
392 | ; If it has, allow user to bail out of install process. | 392 | ; If it has, allow user to bail out of install process. |
393 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 393 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
394 | Function CheckIfAlreadyCurrent | 394 | Function CheckIfAlreadyCurrent |
395 | Push $0 | 395 | Push $0 |
396 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" | 396 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Version" |
397 | StrCmp $0 ${VERSION_LONG} 0 DONE | 397 | StrCmp $0 ${VERSION_LONG} 0 DONE |
398 | MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK DONE | 398 | MessageBox MB_OKCANCEL $(CheckIfCurrentMB) /SD IDOK IDOK DONE |
399 | Quit | 399 | Quit |
400 | 400 | ||
401 | DONE: | 401 | DONE: |
402 | Pop $0 | 402 | Pop $0 |
403 | Return | 403 | Return |
404 | FunctionEnd | 404 | FunctionEnd |
405 | 405 | ||
406 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 406 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
407 | ; Close the program, if running. Modifies no variables. | 407 | ; Close the program, if running. Modifies no variables. |
408 | ; Allows user to bail out of install process. | 408 | ; Allows user to bail out of install process. |
409 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 409 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
410 | Function CloseSecondLife | 410 | Function CloseSecondLife |
411 | Push $0 | 411 | Push $0 |
412 | FindWindow $0 "Second Life" "" | 412 | FindWindow $0 "Imprudence" "" |
413 | IntCmp $0 0 DONE | 413 | IntCmp $0 0 DONE |
414 | MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL | 414 | MessageBox MB_OKCANCEL $(CloseSecondLifeInstMB) IDOK CLOSE IDCANCEL CANCEL_INSTALL |
415 | 415 | ||
416 | CANCEL_INSTALL: | 416 | CANCEL_INSTALL: |
417 | Quit | 417 | Quit |
418 | 418 | ||
419 | CLOSE: | 419 | CLOSE: |
420 | DetailPrint $(CloseSecondLifeInstDP) | 420 | DetailPrint $(CloseSecondLifeInstDP) |
421 | SendMessage $0 16 0 0 | 421 | SendMessage $0 16 0 0 |
422 | 422 | ||
423 | LOOP: | 423 | LOOP: |
424 | FindWindow $0 "Second Life" "" | 424 | FindWindow $0 "Imprudence" "" |
425 | IntCmp $0 0 DONE | 425 | IntCmp $0 0 DONE |
426 | Sleep 500 | 426 | Sleep 500 |
427 | Goto LOOP | 427 | Goto LOOP |
428 | 428 | ||
429 | DONE: | 429 | DONE: |
430 | Pop $0 | 430 | Pop $0 |
431 | Return | 431 | Return |
432 | FunctionEnd | 432 | FunctionEnd |
433 | 433 | ||
434 | 434 | ||
435 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 435 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
436 | ; Delete files in Documents and Settings\<user>\SecondLife\cache | 436 | ; Delete files in Documents and Settings\<user>\SecondLife\cache |
437 | ; Delete files in Documents and Settings\All Users\SecondLife\cache | 437 | ; Delete files in Documents and Settings\All Users\SecondLife\cache |
438 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 438 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
439 | ;Function RemoveCacheFiles | 439 | ;Function RemoveCacheFiles |
440 | ; | 440 | ; |
441 | ;; Delete files in Documents and Settings\<user>\SecondLife | 441 | ;; Delete files in Documents and Settings\<user>\SecondLife |
442 | ;Push $0 | 442 | ;Push $0 |
443 | ;Push $1 | 443 | ;Push $1 |
444 | ;Push $2 | 444 | ;Push $2 |
445 | ; DetailPrint $(RemoveCacheFilesDP) | 445 | ; DetailPrint $(RemoveCacheFilesDP) |
446 | ; | 446 | ; |
447 | ; StrCpy $0 0 ; Index number used to iterate via EnumRegKey | 447 | ; StrCpy $0 0 ; Index number used to iterate via EnumRegKey |
448 | ; | 448 | ; |
449 | ; LOOP: | 449 | ; LOOP: |
450 | ; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 | 450 | ; EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 |
451 | ; StrCmp $1 "" DONE ; no more users | 451 | ; StrCmp $1 "" DONE ; no more users |
452 | ; | 452 | ; |
453 | ; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" | 453 | ; ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" |
454 | ; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing | 454 | ; StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing |
455 | ; | 455 | ; |
456 | ; ; Required since ProfileImagePath is of type REG_EXPAND_SZ | 456 | ; ; Required since ProfileImagePath is of type REG_EXPAND_SZ |
457 | ; ExpandEnvStrings $2 $2 | 457 | ; ExpandEnvStrings $2 $2 |
458 | ; | 458 | ; |
459 | ; ; When explicitly uninstalling, everything goes away | 459 | ; ; When explicitly uninstalling, everything goes away |
460 | ; RMDir /r "$2\Application Data\SecondLife\cache" | 460 | ; RMDir /r "$2\Application Data\SecondLife\cache" |
461 | ; | 461 | ; |
462 | ; CONTINUE: | 462 | ; CONTINUE: |
463 | ; IntOp $0 $0 + 1 | 463 | ; IntOp $0 $0 + 1 |
464 | ; Goto LOOP | 464 | ; Goto LOOP |
465 | ; DONE: | 465 | ; DONE: |
466 | ;Pop $2 | 466 | ;Pop $2 |
467 | ;Pop $1 | 467 | ;Pop $1 |
468 | ;Pop $0 | 468 | ;Pop $0 |
469 | ; | 469 | ; |
470 | ;; Delete files in Documents and Settings\All Users\SecondLife | 470 | ;; Delete files in Documents and Settings\All Users\SecondLife |
471 | ;Push $0 | 471 | ;Push $0 |
472 | ; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" | 472 | ; ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" |
473 | ; StrCmp $0 "" +2 | 473 | ; StrCmp $0 "" +2 |
474 | ; RMDir /r "$0\SecondLife\cache" | 474 | ; RMDir /r "$0\SecondLife\cache" |
475 | ;Pop $0 | 475 | ;Pop $0 |
476 | ; | 476 | ; |
477 | ;; Delete filse in C:\Windows\Application Data\SecondLife | 477 | ;; Delete filse in C:\Windows\Application Data\SecondLife |
478 | ;; If the user is running on a pre-NT system, Application Data lives here instead of | 478 | ;; If the user is running on a pre-NT system, Application Data lives here instead of |
479 | ;; in Documents and Settings. | 479 | ;; in Documents and Settings. |
480 | ;RMDir /r "$WINDIR\Application Data\SecondLife\cache" | 480 | ;RMDir /r "$WINDIR\Application Data\SecondLife\cache" |
481 | ; | 481 | ; |
482 | ;FunctionEnd | 482 | ;FunctionEnd |
483 | 483 | ||
484 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 484 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
485 | ;;; Delete the installed shader files | 485 | ;;; Delete the installed shader files |
486 | ;;; Since shaders are in active development, we'll likely need to shuffle them | 486 | ;;; Since shaders are in active development, we'll likely need to shuffle them |
487 | ;;; around a bit from build to build. This ensures that shaders that we move | 487 | ;;; around a bit from build to build. This ensures that shaders that we move |
488 | ;;; or rename in the dev tree don't get left behind in the install. | 488 | ;;; or rename in the dev tree don't get left behind in the install. |
489 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 489 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
490 | Function RemoveOldShaders | 490 | Function RemoveOldShaders |
491 | 491 | ||
492 | ;; Remove old shader files first so fallbacks will work. see DEV-5663 | 492 | ;; Remove old shader files first so fallbacks will work. see DEV-5663 |
493 | RMDir /r "$INSTDIR\app_settings\shaders\*" | 493 | RMDir /r "$INSTDIR\app_settings\shaders\*" |
494 | 494 | ||
495 | FunctionEnd | 495 | FunctionEnd |
496 | 496 | ||
497 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 497 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
498 | ;;; Delete the installed XUI files | 498 | ;;; Delete the installed XUI files |
499 | ;;; We've changed the directory hierarchy for skins, putting all XUI and texture | 499 | ;;; We've changed the directory hierarchy for skins, putting all XUI and texture |
500 | ;;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed | 500 | ;;; files under a specific skin directory, i.e. skins/default/xui/en-us as opposed |
501 | ;;; to skins/xui/en-us. Need to clean up the old path when upgrading | 501 | ;;; to skins/xui/en-us. Need to clean up the old path when upgrading |
502 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 502 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
503 | Function RemoveOldXUI | 503 | Function RemoveOldXUI |
504 | 504 | ||
505 | ;; remove old XUI and texture files | 505 | ;; remove old XUI and texture files |
506 | RmDir /r "$INSTDIR\skins\html" | 506 | RmDir /r "$INSTDIR\skins\html" |
507 | RmDir /r "$INSTDIR\skins\xui" | 507 | RmDir /r "$INSTDIR\skins\xui" |
508 | RmDir /r "$INSTDIR\skins\textures" | 508 | RmDir /r "$INSTDIR\skins\textures" |
509 | Delete "$INSTDIR\skins\*.txt" | 509 | Delete "$INSTDIR\skins\*.txt" |
510 | 510 | ||
511 | FunctionEnd | 511 | FunctionEnd |
512 | 512 | ||
513 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 513 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
514 | ;;; Remove any releasenotes files. | 514 | ;;; Remove any releasenotes files. |
515 | ;;; We are no longer including release notes with the viewer. This will delete | 515 | ;;; We are no longer including release notes with the viewer. This will delete |
516 | ;;; any that were left behind by an older installer. Delete will not fail if | 516 | ;;; any that were left behind by an older installer. Delete will not fail if |
517 | ;;; the files do not exist | 517 | ;;; the files do not exist |
518 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 518 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
519 | Function RemoveOldReleaseNotes | 519 | Function RemoveOldReleaseNotes |
520 | 520 | ||
521 | ;; remove releasenotes.txt file from application directory, and the shortcut | 521 | ;; remove releasenotes.txt file from application directory, and the shortcut |
522 | ;; from the start menu. | 522 | ;; from the start menu. |
523 | Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" | 523 | Delete "$SMPROGRAMS\$INSTSHORTCUT\SL Release Notes.lnk" |
524 | Delete "$INSTDIR\releasenotes.txt" | 524 | Delete "$INSTDIR\releasenotes.txt" |
525 | 525 | ||
526 | FunctionEnd | 526 | FunctionEnd |
527 | 527 | ||
528 | 528 | ||
529 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 529 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
530 | ; Delete files in Documents and Settings\<user>\SecondLife | 530 | ; Delete files in Documents and Settings\<user>\SecondLife |
531 | ; Delete files in Documents and Settings\All Users\SecondLife | 531 | ; Delete files in Documents and Settings\All Users\SecondLife |
532 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 532 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
533 | Function un.DocumentsAndSettingsFolder | 533 | Function un.DocumentsAndSettingsFolder |
534 | 534 | ||
535 | ; Delete files in Documents and Settings\<user>\SecondLife | 535 | ; Delete files in Documents and Settings\<user>\SecondLife |
536 | Push $0 | 536 | Push $0 |
537 | Push $1 | 537 | Push $1 |
538 | Push $2 | 538 | Push $2 |
539 | 539 | ||
540 | DetailPrint "Deleting files in Documents and Settings folder" | 540 | DetailPrint "Deleting files in Documents and Settings folder" |
541 | 541 | ||
542 | StrCpy $0 0 ; Index number used to iterate via EnumRegKey | 542 | StrCpy $0 0 ; Index number used to iterate via EnumRegKey |
543 | 543 | ||
544 | LOOP: | 544 | LOOP: |
545 | EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 | 545 | EnumRegKey $1 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList" $0 |
546 | StrCmp $1 "" DONE ; no more users | 546 | StrCmp $1 "" DONE ; no more users |
547 | 547 | ||
548 | ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" | 548 | ReadRegStr $2 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$1" "ProfileImagePath" |
549 | StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing | 549 | StrCmp $2 "" CONTINUE 0 ; "ProfileImagePath" value is missing |
550 | 550 | ||
551 | ; Required since ProfileImagePath is of type REG_EXPAND_SZ | 551 | ; Required since ProfileImagePath is of type REG_EXPAND_SZ |
552 | ExpandEnvStrings $2 $2 | 552 | ExpandEnvStrings $2 $2 |
553 | 553 | ||
554 | ; If uninstalling a normal install remove everything | 554 | ; If uninstalling a normal install remove everything |
555 | ; Otherwise (preview/dmz etc) just remove cache | 555 | ; Otherwise (preview/dmz etc) just remove cache |
556 | StrCmp $INSTFLAGS "" RM_ALL RM_CACHE | 556 | StrCmp $INSTFLAGS "" RM_ALL RM_CACHE |
557 | RM_ALL: | 557 | RM_ALL: |
558 | RMDir /r "$2\Application Data\SecondLife" | 558 | RMDir /r "$2\Application Data\SecondLife" |
559 | GoTo CONTINUE | 559 | GoTo CONTINUE |
560 | RM_CACHE: | 560 | RM_CACHE: |
561 | RMDir /r "$2\Application Data\SecondLife\Cache" | 561 | RMDir /r "$2\Application Data\SecondLife\Cache" |
562 | Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml" | 562 | Delete "$2\Application Data\SecondLife\user_settings\settings_windlight.xml" |
563 | 563 | ||
564 | CONTINUE: | 564 | CONTINUE: |
565 | IntOp $0 $0 + 1 | 565 | IntOp $0 $0 + 1 |
566 | Goto LOOP | 566 | Goto LOOP |
567 | DONE: | 567 | DONE: |
568 | 568 | ||
569 | Pop $2 | 569 | Pop $2 |
570 | Pop $1 | 570 | Pop $1 |
571 | Pop $0 | 571 | Pop $0 |
572 | 572 | ||
573 | ; Delete files in Documents and Settings\All Users\SecondLife | 573 | ; Delete files in Documents and Settings\All Users\SecondLife |
574 | Push $0 | 574 | Push $0 |
575 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" | 575 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" "Common AppData" |
576 | StrCmp $0 "" +2 | 576 | StrCmp $0 "" +2 |
577 | RMDir /r "$0\SecondLife" | 577 | RMDir /r "$0\SecondLife" |
578 | Pop $0 | 578 | Pop $0 |
579 | 579 | ||
580 | ; Delete filse in C:\Windows\Application Data\SecondLife | 580 | ; Delete filse in C:\Windows\Application Data\SecondLife |
581 | ; If the user is running on a pre-NT system, Application Data lives here instead of | 581 | ; If the user is running on a pre-NT system, Application Data lives here instead of |
582 | ; in Documents and Settings. | 582 | ; in Documents and Settings. |
583 | RMDir /r "$WINDIR\Application Data\SecondLife" | 583 | RMDir /r "$WINDIR\Application Data\SecondLife" |
584 | 584 | ||
585 | FunctionEnd | 585 | FunctionEnd |
586 | 586 | ||
587 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 587 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
588 | ; Close the program, if running. Modifies no variables. | 588 | ; Close the program, if running. Modifies no variables. |
589 | ; Allows user to bail out of uninstall process. | 589 | ; Allows user to bail out of uninstall process. |
590 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 590 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
591 | Function un.CloseSecondLife | 591 | Function un.CloseSecondLife |
592 | Push $0 | 592 | Push $0 |
593 | FindWindow $0 "Second Life" "" | 593 | FindWindow $0 "Imprudence" "" |
594 | IntCmp $0 0 DONE | 594 | IntCmp $0 0 DONE |
595 | MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL | 595 | MessageBox MB_OKCANCEL $(CloseSecondLifeUnInstMB) IDOK CLOSE IDCANCEL CANCEL_UNINSTALL |
596 | 596 | ||
597 | CANCEL_UNINSTALL: | 597 | CANCEL_UNINSTALL: |
598 | Quit | 598 | Quit |
599 | 599 | ||
600 | CLOSE: | 600 | CLOSE: |
601 | DetailPrint $(CloseSecondLifeUnInstDP) | 601 | DetailPrint $(CloseSecondLifeUnInstDP) |
602 | SendMessage $0 16 0 0 | 602 | SendMessage $0 16 0 0 |
603 | 603 | ||
604 | LOOP: | 604 | LOOP: |
605 | FindWindow $0 "Second Life" "" | 605 | FindWindow $0 "Imprudence" "" |
606 | IntCmp $0 0 DONE | 606 | IntCmp $0 0 DONE |
607 | Sleep 500 | 607 | Sleep 500 |
608 | Goto LOOP | 608 | Goto LOOP |
609 | 609 | ||
610 | DONE: | 610 | DONE: |
611 | Pop $0 | 611 | Pop $0 |
612 | Return | 612 | Return |
613 | FunctionEnd | 613 | FunctionEnd |
614 | 614 | ||
615 | 615 | ||
616 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 616 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
617 | ; | 617 | ; |
618 | ; Delete the stored password for the current Windows user | 618 | ; Delete the stored password for the current Windows user |
619 | ; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled | 619 | ; DEV-10821 -- Unauthorised user can gain access to an SL account after a real user has uninstalled |
620 | ; | 620 | ; |
621 | Function un.RemovePassword | 621 | Function un.RemovePassword |
622 | 622 | ||
623 | DetailPrint "Removing Second Life password" | 623 | DetailPrint "Removing Second Life password" |
624 | 624 | ||
625 | SetShellVarContext current | 625 | SetShellVarContext current |
626 | Delete "$APPDATA\SecondLife\user_settings\password.dat" | 626 | Delete "$APPDATA\SecondLife\user_settings\password.dat" |
627 | SetShellVarContext all | 627 | SetShellVarContext all |
628 | 628 | ||
629 | FunctionEnd | 629 | FunctionEnd |
630 | 630 | ||
631 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 631 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
632 | ;;; Delete the installed files | 632 | ;;; Delete the installed files |
633 | ;;; This deletes the uninstall executable, but it works | 633 | ;;; This deletes the uninstall executable, but it works |
634 | ;;; because it is copied to temp directory before running | 634 | ;;; because it is copied to temp directory before running |
635 | ;;; | 635 | ;;; |
636 | ;;; Note: You must list all files here, because we only | 636 | ;;; Note: You must list all files here, because we only |
637 | ;;; want to delete our files, not things users left in the | 637 | ;;; want to delete our files, not things users left in the |
638 | ;;; application directories. | 638 | ;;; application directories. |
639 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 639 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
640 | Function un.ProgramFiles | 640 | Function un.ProgramFiles |
641 | 641 | ||
642 | ;; Remove mozilla file first so recursive directory deletion doesn't get hung up | 642 | ;; Remove mozilla file first so recursive directory deletion doesn't get hung up |
643 | Delete "$INSTDIR\app_settings\mozilla\components" | 643 | Delete "$INSTDIR\app_settings\mozilla\components" |
644 | 644 | ||
645 | ;; This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py | 645 | ;; This placeholder is replaced by the complete list of files to uninstall by viewer_manifest.py |
646 | %%DELETE_FILES%% | 646 | %%DELETE_FILES%% |
647 | 647 | ||
648 | ;; Optional/obsolete files. Delete won't fail if they don't exist. | 648 | ;; Optional/obsolete files. Delete won't fail if they don't exist. |
649 | Delete "$INSTDIR\dronesettings.ini" | 649 | Delete "$INSTDIR\dronesettings.ini" |
650 | Delete "$INSTDIR\message_template.msg" | 650 | Delete "$INSTDIR\message_template.msg" |
651 | Delete "$INSTDIR\newview.pdb" | 651 | Delete "$INSTDIR\newview.pdb" |
652 | Delete "$INSTDIR\newview.map" | 652 | Delete "$INSTDIR\newview.map" |
653 | Delete "$INSTDIR\SecondLife.pdb" | 653 | Delete "$INSTDIR\SecondLife.pdb" |
654 | Delete "$INSTDIR\SecondLife.map" | 654 | Delete "$INSTDIR\SecondLife.map" |
655 | Delete "$INSTDIR\comm.dat" | 655 | Delete "$INSTDIR\comm.dat" |
656 | Delete "$INSTDIR\*.glsl" | 656 | Delete "$INSTDIR\*.glsl" |
657 | Delete "$INSTDIR\motions\*.lla" | 657 | Delete "$INSTDIR\motions\*.lla" |
658 | Delete "$INSTDIR\trial\*.html" | 658 | Delete "$INSTDIR\trial\*.html" |
659 | Delete "$INSTDIR\newview.exe" | 659 | Delete "$INSTDIR\newview.exe" |
660 | ;; Remove entire help directory | 660 | ;; Remove entire help directory |
661 | Delete "$INSTDIR\help\Advanced\*" | 661 | Delete "$INSTDIR\help\Advanced\*" |
662 | RMDir "$INSTDIR\help\Advanced" | 662 | RMDir "$INSTDIR\help\Advanced" |
663 | Delete "$INSTDIR\help\basics\*" | 663 | Delete "$INSTDIR\help\basics\*" |
664 | RMDir "$INSTDIR\help\basics" | 664 | RMDir "$INSTDIR\help\basics" |
665 | Delete "$INSTDIR\help\Concepts\*" | 665 | Delete "$INSTDIR\help\Concepts\*" |
666 | RMDir "$INSTDIR\help\Concepts" | 666 | RMDir "$INSTDIR\help\Concepts" |
667 | Delete "$INSTDIR\help\welcome\*" | 667 | Delete "$INSTDIR\help\welcome\*" |
668 | RMDir "$INSTDIR\help\welcome" | 668 | RMDir "$INSTDIR\help\welcome" |
669 | Delete "$INSTDIR\help\*" | 669 | Delete "$INSTDIR\help\*" |
670 | RMDir "$INSTDIR\help" | 670 | RMDir "$INSTDIR\help" |
671 | 671 | ||
672 | Delete "$INSTDIR\uninst.exe" | 672 | Delete "$INSTDIR\uninst.exe" |
673 | RMDir "$INSTDIR" | 673 | RMDir "$INSTDIR" |
674 | 674 | ||
675 | IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER | 675 | IfFileExists "$INSTDIR" FOLDERFOUND NOFOLDER |
676 | 676 | ||
677 | FOLDERFOUND: | 677 | FOLDERFOUND: |
678 | MessageBox MB_YESNO $(DeleteProgramFilesMB) IDNO NOFOLDER | 678 | MessageBox MB_YESNO $(DeleteProgramFilesMB) IDNO NOFOLDER |
679 | RMDir /r "$INSTDIR" | 679 | RMDir /r "$INSTDIR" |
680 | 680 | ||
681 | NOFOLDER: | 681 | NOFOLDER: |
682 | 682 | ||
683 | FunctionEnd | 683 | FunctionEnd |
684 | 684 | ||
685 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 685 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
686 | ;;; Uninstall settings | 686 | ;;; Uninstall settings |
687 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 687 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
688 | UninstallText $(UninstallTextMsg) | 688 | UninstallText $(UninstallTextMsg) |
689 | ShowUninstDetails show | 689 | ShowUninstDetails show |
690 | 690 | ||
691 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 691 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
692 | ;;; Uninstall section | 692 | ;;; Uninstall section |
693 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 693 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
694 | Section Uninstall | 694 | Section Uninstall |
695 | 695 | ||
696 | ; Start with some default values. | 696 | ; Start with some default values. |
697 | StrCpy $INSTFLAGS "" | 697 | StrCpy $INSTFLAGS "" |
698 | StrCpy $INSTPROG "${INSTNAME}" | 698 | StrCpy $INSTPROG "${INSTNAME}" |
699 | StrCpy $INSTEXE "${INSTEXE}" | 699 | StrCpy $INSTEXE "${INSTEXE}" |
700 | StrCpy $INSTSHORTCUT "${SHORTCUT}" | 700 | StrCpy $INSTSHORTCUT "${SHORTCUT}" |
701 | Call un.CheckStartupParams ; Figure out where, what and how to uninstall. | 701 | Call un.CheckStartupParams ; Figure out where, what and how to uninstall. |
702 | Call un.CheckIfAdministrator ; Make sure the user can install/uninstall | 702 | Call un.CheckIfAdministrator ; Make sure the user can install/uninstall |
703 | 703 | ||
704 | ; uninstall for all users (if you change this, change it in the install as well) | 704 | ; uninstall for all users (if you change this, change it in the install as well) |
705 | SetShellVarContext all | 705 | SetShellVarContext all |
706 | 706 | ||
707 | ; Make sure we're not running | 707 | ; Make sure we're not running |
708 | Call un.CloseSecondLife | 708 | Call un.CloseSecondLife |
709 | 709 | ||
710 | ; Clean up registry keys (these should all be !defines somewhere) | 710 | ; Clean up registry keys (these should all be !defines somewhere) |
711 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" | 711 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" |
712 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" | 712 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" |
713 | DeleteRegKey HKEY_LOCAL_MACHINE "Software\Linden Research, Inc.\Installer Language" | 713 | DeleteRegKey HKEY_LOCAL_MACHINE "Software\Linden Research, Inc.\Installer Language" |
714 | 714 | ||
715 | ; Clean up shortcuts | 715 | ; Clean up shortcuts |
716 | Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" | 716 | Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" |
717 | RMDir "$SMPROGRAMS\$INSTSHORTCUT" | 717 | RMDir "$SMPROGRAMS\$INSTSHORTCUT" |
718 | 718 | ||
719 | Delete "$DESKTOP\$INSTSHORTCUT.lnk" | 719 | Delete "$DESKTOP\$INSTSHORTCUT.lnk" |
720 | Delete "$INSTDIR\$INSTSHORTCUT.lnk" | 720 | Delete "$INSTDIR\$INSTSHORTCUT.lnk" |
721 | Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" | 721 | Delete "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" |
722 | 722 | ||
723 | ; Clean up cache and log files. | 723 | ; Clean up cache and log files. |
724 | ; Leave them in-place for non AGNI installs. | 724 | ; Leave them in-place for non AGNI installs. |
725 | 725 | ||
726 | !ifdef UNINSTALL_SETTINGS | 726 | !ifdef UNINSTALL_SETTINGS |
727 | Call un.DocumentsAndSettingsFolder | 727 | Call un.DocumentsAndSettingsFolder |
728 | !endif | 728 | !endif |
729 | 729 | ||
730 | ; remove stored password on uninstall | 730 | ; remove stored password on uninstall |
731 | Call un.RemovePassword | 731 | Call un.RemovePassword |
732 | 732 | ||
733 | Call un.ProgramFiles | 733 | Call un.ProgramFiles |
734 | 734 | ||
735 | SectionEnd ; end of uninstall section | 735 | SectionEnd ; end of uninstall section |
736 | 736 | ||
737 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 737 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
738 | ; (From the NSIS wiki, DK) | 738 | ; (From the NSIS wiki, DK) |
739 | ; GetParameterValue | 739 | ; GetParameterValue |
740 | ; | 740 | ; |
741 | ; Usage: | 741 | ; Usage: |
742 | ; !insertmacro GetParameterValue "/L=" "1033" | 742 | ; !insertmacro GetParameterValue "/L=" "1033" |
743 | ; pop $R0 | 743 | ; pop $R0 |
744 | ; | 744 | ; |
745 | ; Returns on top of stack | 745 | ; Returns on top of stack |
746 | ; | 746 | ; |
747 | ; Example command lines: | 747 | ; Example command lines: |
748 | ; foo.exe /S /L=1033 /D=C:\Program Files\Foo | 748 | ; foo.exe /S /L=1033 /D=C:\Program Files\Foo |
749 | ; or: | 749 | ; or: |
750 | ; foo.exe /S "/L=1033" /D="C:\Program Files\Foo" | 750 | ; foo.exe /S "/L=1033" /D="C:\Program Files\Foo" |
751 | ; gpv "/L=" "1033" | 751 | ; gpv "/L=" "1033" |
752 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 752 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
753 | 753 | ||
754 | !macro GetParameterValue SWITCH DEFAULT | 754 | !macro GetParameterValue SWITCH DEFAULT |
755 | Push $0 | 755 | Push $0 |
756 | Push $1 | 756 | Push $1 |
757 | Push $2 | 757 | Push $2 |
758 | Push $3 | 758 | Push $3 |
759 | Push $4 | 759 | Push $4 |
760 | 760 | ||
761 | ;$CMDLINE='"My Setup\Setup.exe" /L=1033 /S' | 761 | ;$CMDLINE='"My Setup\Setup.exe" /L=1033 /S' |
762 | Push "$CMDLINE" | 762 | Push "$CMDLINE" |
763 | Push '${SWITCH}"' | 763 | Push '${SWITCH}"' |
764 | !insertmacro StrStr | 764 | !insertmacro StrStr |
765 | Pop $0 | 765 | Pop $0 |
766 | StrCmp "$0" "" gpv_notquoted | 766 | StrCmp "$0" "" gpv_notquoted |
767 | ;$0='/L="1033" /S' | 767 | ;$0='/L="1033" /S' |
768 | StrLen $2 "$0" | 768 | StrLen $2 "$0" |
769 | Strlen $1 "${SWITCH}" | 769 | Strlen $1 "${SWITCH}" |
770 | IntOp $1 $1 + 1 | 770 | IntOp $1 $1 + 1 |
771 | StrCpy $0 "$0" $2 $1 | 771 | StrCpy $0 "$0" $2 $1 |
772 | ;$0='1033" /S' | 772 | ;$0='1033" /S' |
773 | Push "$0" | 773 | Push "$0" |
774 | Push '"' | 774 | Push '"' |
775 | !insertmacro StrStr | 775 | !insertmacro StrStr |
776 | Pop $1 | 776 | Pop $1 |
777 | StrLen $2 "$0" | 777 | StrLen $2 "$0" |
778 | StrLen $3 "$1" | 778 | StrLen $3 "$1" |
779 | IntOp $4 $2 - $3 | 779 | IntOp $4 $2 - $3 |
780 | StrCpy $0 $0 $4 0 | 780 | StrCpy $0 $0 $4 0 |
781 | Goto gpv_done | 781 | Goto gpv_done |
782 | 782 | ||
783 | gpv_notquoted: | 783 | gpv_notquoted: |
784 | Push "$CMDLINE" | 784 | Push "$CMDLINE" |
785 | Push "${SWITCH}" | 785 | Push "${SWITCH}" |
786 | !insertmacro StrStr | 786 | !insertmacro StrStr |
787 | Pop $0 | 787 | Pop $0 |
788 | StrCmp "$0" "" gpv_done | 788 | StrCmp "$0" "" gpv_done |
789 | ;$0='/L="1033" /S' | 789 | ;$0='/L="1033" /S' |
790 | StrLen $2 "$0" | 790 | StrLen $2 "$0" |
791 | Strlen $1 "${SWITCH}" | 791 | Strlen $1 "${SWITCH}" |
792 | StrCpy $0 "$0" $2 $1 | 792 | StrCpy $0 "$0" $2 $1 |
793 | ;$0=1033 /S' | 793 | ;$0=1033 /S' |
794 | Push "$0" | 794 | Push "$0" |
795 | Push ' ' | 795 | Push ' ' |
796 | !insertmacro StrStr | 796 | !insertmacro StrStr |
797 | Pop $1 | 797 | Pop $1 |
798 | StrLen $2 "$0" | 798 | StrLen $2 "$0" |
799 | StrLen $3 "$1" | 799 | StrLen $3 "$1" |
800 | IntOp $4 $2 - $3 | 800 | IntOp $4 $2 - $3 |
801 | StrCpy $0 $0 $4 0 | 801 | StrCpy $0 $0 $4 0 |
802 | Goto gpv_done | 802 | Goto gpv_done |
803 | 803 | ||
804 | gpv_done: | 804 | gpv_done: |
805 | StrCmp "$0" "" 0 +2 | 805 | StrCmp "$0" "" 0 +2 |
806 | StrCpy $0 "${DEFAULT}" | 806 | StrCpy $0 "${DEFAULT}" |
807 | 807 | ||
808 | Pop $4 | 808 | Pop $4 |
809 | Pop $3 | 809 | Pop $3 |
810 | Pop $2 | 810 | Pop $2 |
811 | Pop $1 | 811 | Pop $1 |
812 | Exch $0 | 812 | Exch $0 |
813 | !macroend | 813 | !macroend |
814 | 814 | ||
815 | ; And I had to modify StrStr a tiny bit. | 815 | ; And I had to modify StrStr a tiny bit. |
816 | ; Possible upgrade switch the goto's to use ${__LINE__} | 816 | ; Possible upgrade switch the goto's to use ${__LINE__} |
817 | 817 | ||
818 | !macro STRSTR | 818 | !macro STRSTR |
819 | Exch $R1 ; st=haystack,old$R1, $R1=needle | 819 | Exch $R1 ; st=haystack,old$R1, $R1=needle |
820 | Exch ; st=old$R1,haystack | 820 | Exch ; st=old$R1,haystack |
821 | Exch $R2 ; st=old$R1,old$R2, $R2=haystack | 821 | Exch $R2 ; st=old$R1,old$R2, $R2=haystack |
822 | Push $R3 | 822 | Push $R3 |
823 | Push $R4 | 823 | Push $R4 |
824 | Push $R5 | 824 | Push $R5 |
825 | StrLen $R3 $R1 | 825 | StrLen $R3 $R1 |
826 | StrCpy $R4 0 | 826 | StrCpy $R4 0 |
827 | ; $R1=needle | 827 | ; $R1=needle |
828 | ; $R2=haystack | 828 | ; $R2=haystack |
829 | ; $R3=len(needle) | 829 | ; $R3=len(needle) |
830 | ; $R4=cnt | 830 | ; $R4=cnt |
831 | ; $R5=tmp | 831 | ; $R5=tmp |
832 | ; loop; | 832 | ; loop; |
833 | StrCpy $R5 $R2 $R3 $R4 | 833 | StrCpy $R5 $R2 $R3 $R4 |
834 | StrCmp $R5 $R1 +4 | 834 | StrCmp $R5 $R1 +4 |
835 | StrCmp $R5 "" +3 | 835 | StrCmp $R5 "" +3 |
836 | IntOp $R4 $R4 + 1 | 836 | IntOp $R4 $R4 + 1 |
837 | Goto -4 | 837 | Goto -4 |
838 | ; done; | 838 | ; done; |
839 | StrCpy $R1 $R2 "" $R4 | 839 | StrCpy $R1 $R2 "" $R4 |
840 | Pop $R5 | 840 | Pop $R5 |
841 | Pop $R4 | 841 | Pop $R4 |
842 | Pop $R3 | 842 | Pop $R3 |
843 | Pop $R2 | 843 | Pop $R2 |
844 | Exch $R1 | 844 | Exch $R1 |
845 | !macroend | 845 | !macroend |
846 | 846 | ||
847 | Function GetProgramName | 847 | Function GetProgramName |
848 | !insertmacro GetParameterValue "/P=" "SecondLife" | 848 | !insertmacro GetParameterValue "/P=" "Imprudence" |
849 | FunctionEnd | 849 | FunctionEnd |
850 | 850 | ||
851 | Function un.GetProgramName | 851 | Function un.GetProgramName |
852 | !insertmacro GetParameterValue "/P=" "SecondLife" | 852 | !insertmacro GetParameterValue "/P=" "Imprudence" |
853 | FunctionEnd | 853 | FunctionEnd |
854 | 854 | ||
855 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 855 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
856 | ; (From the NSIS documentation, JC) | 856 | ; (From the NSIS documentation, JC) |
857 | ; GetWindowsVersion | 857 | ; GetWindowsVersion |
858 | ; | 858 | ; |
859 | ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ | 859 | ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/ |
860 | ; Updated by Joost Verburg | 860 | ; Updated by Joost Verburg |
861 | ; | 861 | ; |
862 | ; Returns on top of stack | 862 | ; Returns on top of stack |
863 | ; | 863 | ; |
864 | ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003) | 864 | ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003) |
865 | ; or | 865 | ; or |
866 | ; '' (Unknown Windows Version) | 866 | ; '' (Unknown Windows Version) |
867 | ; | 867 | ; |
868 | ; Usage: | 868 | ; Usage: |
869 | ; Call GetWindowsVersion | 869 | ; Call GetWindowsVersion |
870 | ; Pop $R0 | 870 | ; Pop $R0 |
871 | ; ; at this point $R0 is "NT 4.0" or whatnot | 871 | ; ; at this point $R0 is "NT 4.0" or whatnot |
872 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 872 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
873 | Function GetWindowsVersion | 873 | Function GetWindowsVersion |
874 | 874 | ||
875 | Push $R0 | 875 | Push $R0 |
876 | Push $R1 | 876 | Push $R1 |
877 | 877 | ||
878 | ReadRegStr $R0 HKLM \ | 878 | ReadRegStr $R0 HKLM \ |
879 | "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion | 879 | "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion |
880 | 880 | ||
881 | IfErrors 0 lbl_winnt | 881 | IfErrors 0 lbl_winnt |
882 | 882 | ||
883 | ; we are not NT | 883 | ; we are not NT |
884 | ReadRegStr $R0 HKLM \ | 884 | ReadRegStr $R0 HKLM \ |
885 | "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber | 885 | "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber |
886 | 886 | ||
887 | StrCpy $R1 $R0 1 | 887 | StrCpy $R1 $R0 1 |
888 | StrCmp $R1 '4' 0 lbl_error | 888 | StrCmp $R1 '4' 0 lbl_error |
889 | 889 | ||
890 | StrCpy $R1 $R0 3 | 890 | StrCpy $R1 $R0 3 |
891 | 891 | ||
892 | StrCmp $R1 '4.0' lbl_win32_95 | 892 | StrCmp $R1 '4.0' lbl_win32_95 |
893 | StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 | 893 | StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98 |
894 | 894 | ||
895 | lbl_win32_95: | 895 | lbl_win32_95: |
896 | StrCpy $R0 '95' | 896 | StrCpy $R0 '95' |
897 | Goto lbl_done | 897 | Goto lbl_done |
898 | 898 | ||
899 | lbl_win32_98: | 899 | lbl_win32_98: |
900 | StrCpy $R0 '98' | 900 | StrCpy $R0 '98' |
901 | Goto lbl_done | 901 | Goto lbl_done |
902 | 902 | ||
903 | lbl_win32_ME: | 903 | lbl_win32_ME: |
904 | StrCpy $R0 'ME' | 904 | StrCpy $R0 'ME' |
905 | Goto lbl_done | 905 | Goto lbl_done |
906 | 906 | ||
907 | lbl_winnt: | 907 | lbl_winnt: |
908 | 908 | ||
909 | StrCpy $R1 $R0 1 | 909 | StrCpy $R1 $R0 1 |
910 | 910 | ||
911 | StrCmp $R1 '3' lbl_winnt_x | 911 | StrCmp $R1 '3' lbl_winnt_x |
912 | StrCmp $R1 '4' lbl_winnt_x | 912 | StrCmp $R1 '4' lbl_winnt_x |
913 | 913 | ||
914 | StrCpy $R1 $R0 3 | 914 | StrCpy $R1 $R0 3 |
915 | 915 | ||
916 | StrCmp $R1 '5.0' lbl_winnt_2000 | 916 | StrCmp $R1 '5.0' lbl_winnt_2000 |
917 | StrCmp $R1 '5.1' lbl_winnt_XP | 917 | StrCmp $R1 '5.1' lbl_winnt_XP |
918 | StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error | 918 | StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error |
919 | 919 | ||
920 | lbl_winnt_x: | 920 | lbl_winnt_x: |
921 | StrCpy $R0 "NT $R0" 6 | 921 | StrCpy $R0 "NT $R0" 6 |
922 | Goto lbl_done | 922 | Goto lbl_done |
923 | 923 | ||
924 | lbl_winnt_2000: | 924 | lbl_winnt_2000: |
925 | Strcpy $R0 '2000' | 925 | Strcpy $R0 '2000' |
926 | Goto lbl_done | 926 | Goto lbl_done |
927 | 927 | ||
928 | lbl_winnt_XP: | 928 | lbl_winnt_XP: |
929 | Strcpy $R0 'XP' | 929 | Strcpy $R0 'XP' |
930 | Goto lbl_done | 930 | Goto lbl_done |
931 | 931 | ||
932 | lbl_winnt_2003: | 932 | lbl_winnt_2003: |
933 | Strcpy $R0 '2003' | 933 | Strcpy $R0 '2003' |
934 | Goto lbl_done | 934 | Goto lbl_done |
935 | 935 | ||
936 | lbl_error: | 936 | lbl_error: |
937 | Strcpy $R0 '' | 937 | Strcpy $R0 '' |
938 | lbl_done: | 938 | lbl_done: |
939 | 939 | ||
940 | Pop $R1 | 940 | Pop $R1 |
941 | Exch $R0 | 941 | Exch $R0 |
942 | 942 | ||
943 | FunctionEnd | 943 | FunctionEnd |
944 | 944 | ||
945 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 945 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
946 | ;; Note: to add new languages, add a language file include to the list | 946 | ;; Note: to add new languages, add a language file include to the list |
947 | ;; at the top of this file, add an entry to the menu and then add an | 947 | ;; at the top of this file, add an entry to the menu and then add an |
948 | ;; entry to the language ID selector below | 948 | ;; entry to the language ID selector below |
949 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 949 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
950 | Function .onInit | 950 | Function .onInit |
951 | 951 | ||
952 | ; read the language from registry (ok if not there) and set langauge menu | 952 | ; read the language from registry (ok if not there) and set langauge menu |
953 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" | 953 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" |
954 | StrCpy $LANGUAGE $0 | 954 | StrCpy $LANGUAGE $0 |
955 | 955 | ||
956 | Push "" | 956 | Push "" |
957 | Push ${LANG_ENGLISH} | 957 | Push ${LANG_ENGLISH} |
958 | Push English | 958 | Push English |
959 | Push ${LANG_GERMAN} | 959 | Push ${LANG_GERMAN} |
960 | Push German | 960 | Push German |
961 | Push ${LANG_JAPANESE} | 961 | Push ${LANG_JAPANESE} |
962 | Push Japanese | 962 | Push Japanese |
963 | Push ${LANG_KOREAN} | 963 | Push ${LANG_KOREAN} |
964 | Push Korean | 964 | Push Korean |
965 | Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain | 965 | Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain |
966 | LangDLL::LangDialog "Installer Language" "Please select the language of the installer" | 966 | LangDLL::LangDialog "Installer Language" "Please select the language of the installer" |
967 | Pop $LANGUAGE | 967 | Pop $LANGUAGE |
968 | StrCmp $LANGUAGE "cancel" 0 +2 | 968 | StrCmp $LANGUAGE "cancel" 0 +2 |
969 | Abort | 969 | Abort |
970 | 970 | ||
971 | ; save language in registry | 971 | ; save language in registry |
972 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE | 972 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE |
973 | FunctionEnd | 973 | FunctionEnd |
974 | 974 | ||
975 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 975 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
976 | Function un.onInit | 976 | Function un.onInit |
977 | 977 | ||
978 | ; read language from registry and set for ininstaller | 978 | ; read language from registry and set for ininstaller |
979 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" | 979 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" |
980 | StrCpy $LANGUAGE $0 | 980 | StrCpy $LANGUAGE $0 |
981 | 981 | ||
982 | FunctionEnd | 982 | FunctionEnd |
983 | 983 | ||
984 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 984 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; EOF ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |