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