diff options
Diffstat (limited to 'linden/indra/newview/installers/windows/installer_template.nsi')
-rw-r--r-- | linden/indra/newview/installers/windows/installer_template.nsi | 473 |
1 files changed, 133 insertions, 340 deletions
diff --git a/linden/indra/newview/installers/windows/installer_template.nsi b/linden/indra/newview/installers/windows/installer_template.nsi index c795507..01bd98f 100644 --- a/linden/indra/newview/installers/windows/installer_template.nsi +++ b/linden/indra/newview/installers/windows/installer_template.nsi | |||
@@ -1,30 +1,22 @@ | |||
1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 1 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
2 | ;; secondlife setup.nsi | 2 | ;; secondlife setup.nsi |
3 | ;; Copyright 2004-2007, Linden Research, Inc. | 3 | ;; Copyright 2004-2008, Linden Research, Inc. |
4 | ;; For info, see http://www.nullsoft.com/free/nsis/ | 4 | ;; |
5 | ;; NSIS Unicode 2.38.1 or higher required | ||
6 | ;; http://www.scratchpaper.com/ | ||
5 | ;; | 7 | ;; |
6 | ;; NSIS 2.22 or higher required | ||
7 | ;; Author: James Cook, Don Kjer, Callum Prentice | 8 | ;; Author: James Cook, Don Kjer, Callum Prentice |
8 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 9 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
9 | 10 | ||
10 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 11 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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 | 12 | ;; Compiler flags |
23 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 13 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
24 | SetOverwrite on ; overwrite files | 14 | SetOverwrite on ; overwrite files |
25 | SetCompress auto ; compress iff saves space | 15 | SetCompress auto ; compress iff saves space |
16 | SetCompressor /solid lzma ; compress whole installer as one block | ||
26 | SetDatablockOptimize off ; only saves us 0.1%, not worth it | 17 | SetDatablockOptimize off ; only saves us 0.1%, not worth it |
27 | XPStyle on ; add an XP manifest to the installer | 18 | XPStyle on ; add an XP manifest to the installer |
19 | RequestExecutionLevel admin ; on Vista we must be admin because we write to Program Files | ||
28 | 20 | ||
29 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 21 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
30 | ;;; Project flags | 22 | ;;; Project flags |
@@ -41,9 +33,22 @@ XPStyle on ; add an XP manifest to the installer | |||
41 | !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" | 33 | !include "%%SOURCE%%\installers\windows\lang_en-us.nsi" |
42 | !include "%%SOURCE%%\installers\windows\lang_ja.nsi" | 34 | !include "%%SOURCE%%\installers\windows\lang_ja.nsi" |
43 | !include "%%SOURCE%%\installers\windows\lang_ko.nsi" | 35 | !include "%%SOURCE%%\installers\windows\lang_ko.nsi" |
36 | !include "%%SOURCE%%\installers\windows\lang_pt-br.nsi" | ||
37 | !include "%%SOURCE%%\installers\windows\lang_fr.nsi" | ||
38 | !include "%%SOURCE%%\installers\windows\lang_es.nsi" | ||
39 | !include "%%SOURCE%%\installers\windows\lang_it.nsi" | ||
40 | !include "%%SOURCE%%\installers\windows\lang_nl.nsi" | ||
41 | !include "%%SOURCE%%\installers\windows\lang_zh.nsi" | ||
44 | 42 | ||
45 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 43 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
46 | ;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py) | 44 | ;; Tweak for different servers/builds (this placeholder is replaced by viewer_manifest.py) |
45 | ;; For example: | ||
46 | ;; !define INSTFLAGS "%(flags)s" | ||
47 | ;; !define INSTNAME "SecondLife%(grid_caps)s" | ||
48 | ;; !define SHORTCUT "Second Life (%(grid_caps)s)" | ||
49 | ;; !define URLNAME "secondlife%(grid)s" | ||
50 | ;; !define UNINSTALL_SETTINGS 1 | ||
51 | |||
47 | %%GRID_VARS%% | 52 | %%GRID_VARS%% |
48 | 53 | ||
49 | Name ${INSTNAME} | 54 | Name ${INSTNAME} |
@@ -63,11 +68,7 @@ AutoCloseWindow true ; after all files install, close window | |||
63 | 68 | ||
64 | InstallDir "$PROGRAMFILES\${INSTNAME}" | 69 | InstallDir "$PROGRAMFILES\${INSTNAME}" |
65 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" | 70 | InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "" |
66 | !ifdef UPDATE | ||
67 | DirText $(DirectoryChooseTitle) $(DirectoryChooseUpdate) | ||
68 | !else | ||
69 | DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) | 71 | DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) |
70 | !endif | ||
71 | 72 | ||
72 | 73 | ||
73 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 74 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
@@ -76,145 +77,41 @@ DirText $(DirectoryChooseTitle) $(DirectoryChooseSetup) | |||
76 | Var INSTPROG | 77 | Var INSTPROG |
77 | Var INSTEXE | 78 | Var INSTEXE |
78 | Var INSTFLAGS | 79 | Var INSTFLAGS |
79 | Var LANGFLAGS | ||
80 | Var INSTSHORTCUT | 80 | Var INSTSHORTCUT |
81 | Var COMMANDLINE ; command line passed to this installer, set in .onInit | ||
81 | 82 | ||
82 | ;;; Function definitions should go before file includes, because the NSIS package | 83 | ;;; Function definitions should go before file includes, because calls to |
83 | ;;; is a single stream of bytecodes + file data. So if your function definitions are at | 84 | ;;; DLLs like LangDLL trigger an implicit file include, so if that call is at |
84 | ;;; the end of the file it has to decompress the whole thing before it can call a function. JC | 85 | ;;; the end of this script NSIS has to decompress the whole installer before |
85 | 86 | ;;; it can call the DLL function. JC | |
86 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
87 | ; PostInstallExe | ||
88 | ; This just runs any post installation scripts. | ||
89 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
90 | Function PostInstallExe | ||
91 | push $0 | ||
92 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "PostInstallExe" | ||
93 | ;MessageBox MB_OK '$0' | ||
94 | ExecWait '$0' | ||
95 | pop $0 | ||
96 | FunctionEnd | ||
97 | 87 | ||
98 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 88 | !include "FileFunc.nsh" ; For GetParameters, GetOptions |
99 | ; CheckStartupParameters | 89 | !insertmacro GetParameters |
100 | ; Sets INSTFLAGS, INSTPROG, and INSTEXE. | 90 | !insertmacro GetOptions |
101 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
102 | Function CheckStartupParams | ||
103 | push $0 | ||
104 | push $R0 | ||
105 | |||
106 | ; Look for a registry entry with info about where to update. | ||
107 | Call GetProgramName | ||
108 | pop $R0 | ||
109 | StrCpy $INSTPROG "$R0" | ||
110 | StrCpy $INSTEXE "$R0.exe" | ||
111 | |||
112 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" | ||
113 | ; If key doesn't exist, skip install | ||
114 | IfErrors ABORT | ||
115 | StrCpy $INSTDIR "$0" | ||
116 | |||
117 | ; We now have a directory to install to. Get the startup parameters and shortcut as well. | ||
118 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" | ||
119 | IfErrors +2 | ||
120 | StrCpy $INSTFLAGS "$0" | ||
121 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" | ||
122 | IfErrors +2 | ||
123 | StrCpy $INSTSHORTCUT "$0" | ||
124 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" | ||
125 | IfErrors +2 | ||
126 | StrCpy $INSTEXE "$0" | ||
127 | Goto FINISHED | ||
128 | |||
129 | ABORT: | ||
130 | MessageBox MB_OK $(CheckStartupParamsMB) | ||
131 | Quit | ||
132 | |||
133 | FINISHED: | ||
134 | ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" | ||
135 | pop $R0 | ||
136 | pop $0 | ||
137 | FunctionEnd | ||
138 | |||
139 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
140 | ;; | ||
141 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
142 | Function un.CheckStartupParams | ||
143 | push $0 | ||
144 | push $R0 | ||
145 | |||
146 | ; Look for a registry entry with info about where to update. | ||
147 | Call un.GetProgramName | ||
148 | pop $R0 | ||
149 | StrCpy $INSTPROG "$R0" | ||
150 | StrCpy $INSTEXE "$R0.exe" | ||
151 | |||
152 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" | ||
153 | ; If key doesn't exist, skip install | ||
154 | IfErrors ABORT | ||
155 | StrCpy $INSTDIR "$0" | ||
156 | |||
157 | ; We now have a directory to install to. Get the startup parameters and shortcut as well. | ||
158 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags" | ||
159 | IfErrors +2 | ||
160 | StrCpy $INSTFLAGS "$0" | ||
161 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" | ||
162 | IfErrors +2 | ||
163 | StrCpy $INSTSHORTCUT "$0" | ||
164 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" | ||
165 | IfErrors +2 | ||
166 | StrCpy $INSTEXE "$0" | ||
167 | Goto FINISHED | ||
168 | |||
169 | ABORT: | ||
170 | MessageBox MB_OK $(CheckStartupParamsMB) | ||
171 | Quit | ||
172 | |||
173 | FINISHED: | ||
174 | ;MessageBox MB_OK "INSTPROG: $INSTPROG, INSTEXE: $INSTEXE, INSTFLAGS: $INSTFLAGS" | ||
175 | pop $R0 | ||
176 | pop $0 | ||
177 | FunctionEnd | ||
178 | 91 | ||
179 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 92 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
180 | ;;; After install completes, offer readme file | 93 | ;;; After install completes, launch app |
181 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 94 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
182 | Function .onInstSuccess | 95 | Function .onInstSuccess |
183 | MessageBox MB_YESNO \ | 96 | Push $R0 # Option value, unused |
184 | $(InstSuccesssQuestion) /SD IDYES IDNO NoReadme | 97 | ${GetOptions} $COMMANDLINE "/AUTOSTART" $R0 |
185 | ; Assumes SetOutPath $INSTDIR | 98 | # If parameter was there (no error) just launch |
186 | Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' | 99 | # Otherwise ask |
187 | NoReadme: | 100 | IfErrors label_ask_launch label_launch |
101 | |||
102 | label_ask_launch: | ||
103 | # Don't launch by default when silent | ||
104 | IfSilent label_no_launch | ||
105 | MessageBox MB_YESNO $(InstSuccesssQuestion) \ | ||
106 | IDYES label_launch IDNO label_no_launch | ||
107 | |||
108 | label_launch: | ||
109 | # Assumes SetOutPath $INSTDIR | ||
110 | Exec '"$INSTDIR\$INSTEXE" $INSTFLAGS' | ||
111 | label_no_launch: | ||
112 | Pop $R0 | ||
188 | FunctionEnd | 113 | FunctionEnd |
189 | 114 | ||
190 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
191 | ; Remove old NSIS version. Modifies no variables. | ||
192 | ; Does NOT delete the LindenWorld directory, or any | ||
193 | ; user files in that directory. | ||
194 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
195 | Function RemoveNSIS | ||
196 | Push $0 | ||
197 | ; Grab the installation directory of the old version | ||
198 | DetailPrint $(RemoveOldNSISVersion) | ||
199 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "" | ||
200 | |||
201 | ; If key doesn't exist, skip uninstall | ||
202 | IfErrors NO_NSIS | ||
203 | |||
204 | ; Clean up legacy beta shortcuts | ||
205 | Delete "$SMPROGRAMS\Second Life Beta.lnk" | ||
206 | Delete "$DESKTOP\Second Life Beta.lnk" | ||
207 | Delete "$SMPROGRAMS\Second Life.lnk" | ||
208 | |||
209 | ; Clean up old newview.exe file | ||
210 | Delete "$INSTDIR\newview.exe" | ||
211 | |||
212 | ; Intentionally don't delete the stuff in | ||
213 | ; Documents and Settings, so we keep the user's settings | ||
214 | |||
215 | NO_NSIS: | ||
216 | Pop $0 | ||
217 | FunctionEnd | ||
218 | 115 | ||
219 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 116 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
220 | ; Make sure we're not on Windows 98 / ME | 117 | ; Make sure we're not on Windows 98 / ME |
@@ -242,28 +139,28 @@ FunctionEnd | |||
242 | ; Make sure the user can install/uninstall | 139 | ; Make sure the user can install/uninstall |
243 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 140 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
244 | Function CheckIfAdministrator | 141 | Function CheckIfAdministrator |
245 | DetailPrint $(CheckAdministratorInstDP) | 142 | DetailPrint $(CheckAdministratorInstDP) |
246 | UserInfo::GetAccountType | 143 | UserInfo::GetAccountType |
247 | Pop $R0 | 144 | Pop $R0 |
248 | StrCmp $R0 "Admin" is_admin | 145 | StrCmp $R0 "Admin" lbl_is_admin |
249 | MessageBox MB_OK $(CheckAdministratorInstMB) | 146 | MessageBox MB_OK $(CheckAdministratorInstMB) |
250 | Quit | 147 | Quit |
251 | is_admin: | 148 | lbl_is_admin: |
252 | Return | 149 | Return |
253 | FunctionEnd | 150 | FunctionEnd |
254 | 151 | ||
255 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 152 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
256 | ;; | 153 | ;; |
257 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 154 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
258 | Function un.CheckIfAdministrator | 155 | Function un.CheckIfAdministrator |
259 | DetailPrint $(CheckAdministratorUnInstDP) | 156 | DetailPrint $(CheckAdministratorUnInstDP) |
260 | UserInfo::GetAccountType | 157 | UserInfo::GetAccountType |
261 | Pop $R0 | 158 | Pop $R0 |
262 | StrCmp $R0 "Admin" is_admin | 159 | StrCmp $R0 "Admin" lbl_is_admin |
263 | MessageBox MB_OK $(CheckAdministratorUnInstMB) | 160 | MessageBox MB_OK $(CheckAdministratorUnInstMB) |
264 | Quit | 161 | Quit |
265 | is_admin: | 162 | lbl_is_admin: |
266 | Return | 163 | Return |
267 | FunctionEnd | 164 | FunctionEnd |
268 | 165 | ||
269 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 166 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
@@ -310,6 +207,33 @@ Function CloseSecondLife | |||
310 | Return | 207 | Return |
311 | FunctionEnd | 208 | FunctionEnd |
312 | 209 | ||
210 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
211 | ; Test our connection to secondlife.com | ||
212 | ; Also allows us to count attempted installs by examining web logs. | ||
213 | ; *TODO: Return current SL version info and have installer check | ||
214 | ; if it is up to date. | ||
215 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
216 | Function CheckNetworkConnection | ||
217 | Push $0 | ||
218 | Push $1 | ||
219 | DetailPrint $(CheckNetworkConnectionDP) | ||
220 | GetTempFileName $0 | ||
221 | !define HTTP_TIMEOUT 5000 ; milliseconds | ||
222 | ; Don't show secondary progress bar, this will be quick. | ||
223 | NSISdl::download_quiet \ | ||
224 | /TIMEOUT=${HTTP_TIMEOUT} \ | ||
225 | "http://join.secondlife.com/installer-check/?v=${VERSION_LONG}" \ | ||
226 | $0 | ||
227 | Pop $1 ; Return value, either "success", "cancel" or an error message | ||
228 | ; MessageBox MB_OK "Download result: $1" | ||
229 | ; Result ignored for now | ||
230 | ; StrCmp $1 "success" +2 | ||
231 | ; DetailPrint "Connection failed: $1" | ||
232 | Delete $0 ; temporary file | ||
233 | Pop $1 | ||
234 | Pop $0 | ||
235 | Return | ||
236 | FunctionEnd | ||
313 | 237 | ||
314 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 238 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
315 | ; Delete files in Documents and Settings\<user>\SecondLife\cache | 239 | ; Delete files in Documents and Settings\<user>\SecondLife\cache |
@@ -577,7 +501,6 @@ StrCpy $INSTFLAGS "" | |||
577 | StrCpy $INSTPROG "${INSTNAME}" | 501 | StrCpy $INSTPROG "${INSTNAME}" |
578 | StrCpy $INSTEXE "${INSTEXE}" | 502 | StrCpy $INSTEXE "${INSTEXE}" |
579 | StrCpy $INSTSHORTCUT "${SHORTCUT}" | 503 | StrCpy $INSTSHORTCUT "${SHORTCUT}" |
580 | Call un.CheckStartupParams ; Figure out where, what and how to uninstall. | ||
581 | Call un.CheckIfAdministrator ; Make sure the user can install/uninstall | 504 | Call un.CheckIfAdministrator ; Make sure the user can install/uninstall |
582 | 505 | ||
583 | ; uninstall for all users (if you change this, change it in the install as well) | 506 | ; uninstall for all users (if you change this, change it in the install as well) |
@@ -586,10 +509,9 @@ SetShellVarContext all | |||
586 | ; Make sure we're not running | 509 | ; Make sure we're not running |
587 | Call un.CloseSecondLife | 510 | Call un.CloseSecondLife |
588 | 511 | ||
589 | ; Clean up registry keys (these should all be !defines somewhere) | 512 | ; Clean up registry keys and subkeys (these should all be !defines somewhere) |
590 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" | 513 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" |
591 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" | 514 | DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" |
592 | DeleteRegKey HKEY_LOCAL_MACHINE "Software\Linden Research, Inc.\Installer Language" | ||
593 | 515 | ||
594 | ; Clean up shortcuts | 516 | ; Clean up shortcuts |
595 | Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" | 517 | Delete "$SMPROGRAMS\$INSTSHORTCUT\*.*" |
@@ -613,123 +535,6 @@ Call un.ProgramFiles | |||
613 | 535 | ||
614 | SectionEnd ; end of uninstall section | 536 | SectionEnd ; end of uninstall section |
615 | 537 | ||
616 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
617 | ; (From the NSIS wiki, DK) | ||
618 | ; GetParameterValue | ||
619 | ; | ||
620 | ; Usage: | ||
621 | ; !insertmacro GetParameterValue "/L=" "1033" | ||
622 | ; pop $R0 | ||
623 | ; | ||
624 | ; Returns on top of stack | ||
625 | ; | ||
626 | ; Example command lines: | ||
627 | ; foo.exe /S /L=1033 /D=C:\Program Files\Foo | ||
628 | ; or: | ||
629 | ; foo.exe /S "/L=1033" /D="C:\Program Files\Foo" | ||
630 | ; gpv "/L=" "1033" | ||
631 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
632 | |||
633 | !macro GetParameterValue SWITCH DEFAULT | ||
634 | Push $0 | ||
635 | Push $1 | ||
636 | Push $2 | ||
637 | Push $3 | ||
638 | Push $4 | ||
639 | |||
640 | ;$CMDLINE='"My Setup\Setup.exe" /L=1033 /S' | ||
641 | Push "$CMDLINE" | ||
642 | Push '${SWITCH}"' | ||
643 | !insertmacro StrStr | ||
644 | Pop $0 | ||
645 | StrCmp "$0" "" gpv_notquoted | ||
646 | ;$0='/L="1033" /S' | ||
647 | StrLen $2 "$0" | ||
648 | Strlen $1 "${SWITCH}" | ||
649 | IntOp $1 $1 + 1 | ||
650 | StrCpy $0 "$0" $2 $1 | ||
651 | ;$0='1033" /S' | ||
652 | Push "$0" | ||
653 | Push '"' | ||
654 | !insertmacro StrStr | ||
655 | Pop $1 | ||
656 | StrLen $2 "$0" | ||
657 | StrLen $3 "$1" | ||
658 | IntOp $4 $2 - $3 | ||
659 | StrCpy $0 $0 $4 0 | ||
660 | Goto gpv_done | ||
661 | |||
662 | gpv_notquoted: | ||
663 | Push "$CMDLINE" | ||
664 | Push "${SWITCH}" | ||
665 | !insertmacro StrStr | ||
666 | Pop $0 | ||
667 | StrCmp "$0" "" gpv_done | ||
668 | ;$0='/L="1033" /S' | ||
669 | StrLen $2 "$0" | ||
670 | Strlen $1 "${SWITCH}" | ||
671 | StrCpy $0 "$0" $2 $1 | ||
672 | ;$0=1033 /S' | ||
673 | Push "$0" | ||
674 | Push ' ' | ||
675 | !insertmacro StrStr | ||
676 | Pop $1 | ||
677 | StrLen $2 "$0" | ||
678 | StrLen $3 "$1" | ||
679 | IntOp $4 $2 - $3 | ||
680 | StrCpy $0 $0 $4 0 | ||
681 | Goto gpv_done | ||
682 | |||
683 | gpv_done: | ||
684 | StrCmp "$0" "" 0 +2 | ||
685 | StrCpy $0 "${DEFAULT}" | ||
686 | |||
687 | Pop $4 | ||
688 | Pop $3 | ||
689 | Pop $2 | ||
690 | Pop $1 | ||
691 | Exch $0 | ||
692 | !macroend | ||
693 | |||
694 | ; And I had to modify StrStr a tiny bit. | ||
695 | ; Possible upgrade switch the goto's to use ${__LINE__} | ||
696 | |||
697 | !macro STRSTR | ||
698 | Exch $R1 ; st=haystack,old$R1, $R1=needle | ||
699 | Exch ; st=old$R1,haystack | ||
700 | Exch $R2 ; st=old$R1,old$R2, $R2=haystack | ||
701 | Push $R3 | ||
702 | Push $R4 | ||
703 | Push $R5 | ||
704 | StrLen $R3 $R1 | ||
705 | StrCpy $R4 0 | ||
706 | ; $R1=needle | ||
707 | ; $R2=haystack | ||
708 | ; $R3=len(needle) | ||
709 | ; $R4=cnt | ||
710 | ; $R5=tmp | ||
711 | ; loop; | ||
712 | StrCpy $R5 $R2 $R3 $R4 | ||
713 | StrCmp $R5 $R1 +4 | ||
714 | StrCmp $R5 "" +3 | ||
715 | IntOp $R4 $R4 + 1 | ||
716 | Goto -4 | ||
717 | ; done; | ||
718 | StrCpy $R1 $R2 "" $R4 | ||
719 | Pop $R5 | ||
720 | Pop $R4 | ||
721 | Pop $R3 | ||
722 | Pop $R2 | ||
723 | Exch $R1 | ||
724 | !macroend | ||
725 | |||
726 | Function GetProgramName | ||
727 | !insertmacro GetParameterValue "/P=" "SecondLife" | ||
728 | FunctionEnd | ||
729 | |||
730 | Function un.GetProgramName | ||
731 | !insertmacro GetParameterValue "/P=" "SecondLife" | ||
732 | FunctionEnd | ||
733 | 538 | ||
734 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 539 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
735 | ; (From the NSIS documentation, JC) | 540 | ; (From the NSIS documentation, JC) |
@@ -827,42 +632,59 @@ FunctionEnd | |||
827 | ;; entry to the language ID selector below | 632 | ;; entry to the language ID selector below |
828 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 633 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
829 | Function .onInit | 634 | Function .onInit |
830 | 635 | Push $0 | |
831 | ; read the language from registry (ok if not there) and set langauge menu | 636 | ${GetParameters} $COMMANDLINE ; get our command line |
637 | ${GetOptions} $COMMANDLINE "/LANGID=" $0 ; /LANGID=1033 implies US English | ||
638 | ; If no language (error), then proceed | ||
639 | IfErrors lbl_check_silent | ||
640 | ; No error means we got a language, so use it | ||
641 | StrCpy $LANGUAGE $0 | ||
642 | Goto lbl_return | ||
643 | |||
644 | lbl_check_silent: | ||
645 | ; For silent installs, no language prompt, use default | ||
646 | IfSilent lbl_return | ||
647 | |||
648 | ; If we currently have a version of SL installed, default to the language of that install | ||
649 | ; Otherwise don't change $LANGUAGE and it will default to the OS UI language. | ||
832 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" | 650 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" |
651 | IfErrors lbl_build_menu | ||
833 | StrCpy $LANGUAGE $0 | 652 | StrCpy $LANGUAGE $0 |
834 | 653 | ||
654 | lbl_build_menu: | ||
835 | Push "" | 655 | Push "" |
836 | Push ${LANG_ENGLISH} | 656 | # Use separate file so labels can be UTF-16 but we can still merge changes |
837 | Push English | 657 | # into this ASCII file. JC |
838 | Push ${LANG_GERMAN} | 658 | !include "%%SOURCE%%\installers\windows\language_menu.nsi" |
839 | Push German | 659 | |
840 | Push ${LANG_JAPANESE} | ||
841 | Push Japanese | ||
842 | Push ${LANG_KOREAN} | ||
843 | Push Korean | ||
844 | Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain | 660 | Push A ; A means auto count languages for the auto count to work the first empty push (Push "") must remain |
845 | LangDLL::LangDialog "Installer Language" "Please select the language of the installer" | 661 | LangDLL::LangDialog $(InstallerLanguageTitle) $(SelectInstallerLanguage) |
846 | Pop $LANGUAGE | 662 | Pop $0 |
847 | StrCmp $LANGUAGE "cancel" 0 +2 | 663 | StrCmp $0 "cancel" 0 +2 |
848 | Abort | 664 | Abort |
665 | StrCpy $LANGUAGE $0 | ||
849 | 666 | ||
850 | ; save language in registry | 667 | ; save language in registry |
851 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE | 668 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" $LANGUAGE |
669 | lbl_return: | ||
670 | Pop $0 | ||
671 | Return | ||
852 | FunctionEnd | 672 | FunctionEnd |
853 | 673 | ||
854 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 674 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
855 | Function un.onInit | 675 | Function un.onInit |
856 | 676 | ; read language from registry and set for uninstaller | |
857 | ; read language from registry and set for ininstaller | 677 | ; Key will be removed on successful uninstall |
858 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" | 678 | ReadRegStr $0 HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\${INSTNAME}" "InstallerLanguage" |
679 | IfErrors lbl_end | ||
859 | StrCpy $LANGUAGE $0 | 680 | StrCpy $LANGUAGE $0 |
860 | 681 | lbl_end: | |
682 | Return | ||
861 | FunctionEnd | 683 | FunctionEnd |
862 | 684 | ||
863 | 685 | ||
864 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 686 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
865 | ;;; Sections | 687 | ;;; MAIN SECTION |
866 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 688 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
867 | Section "" ; (default section) | 689 | Section "" ; (default section) |
868 | 690 | ||
@@ -874,15 +696,11 @@ StrCpy $INSTPROG "${INSTNAME}" | |||
874 | StrCpy $INSTEXE "${INSTEXE}" | 696 | StrCpy $INSTEXE "${INSTEXE}" |
875 | StrCpy $INSTSHORTCUT "${SHORTCUT}" | 697 | StrCpy $INSTSHORTCUT "${SHORTCUT}" |
876 | 698 | ||
877 | IfSilent +2 | ||
878 | Goto NOT_SILENT | ||
879 | Call CheckStartupParams ; Figure out where, what and how to install. | ||
880 | NOT_SILENT: | ||
881 | Call CheckWindowsVersion ; warn if on Windows 98/ME | 699 | Call CheckWindowsVersion ; warn if on Windows 98/ME |
882 | Call CheckIfAdministrator ; Make sure the user can install/uninstall | 700 | Call CheckIfAdministrator ; Make sure the user can install/uninstall |
883 | Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version | 701 | Call CheckIfAlreadyCurrent ; Make sure that we haven't already installed this version |
884 | Call CloseSecondLife ; Make sure we're not running | 702 | Call CloseSecondLife ; Make sure we're not running |
885 | Call RemoveNSIS ; Check for old NSIS install to remove | 703 | Call CheckNetworkConnection ; ping secondlife.com |
886 | 704 | ||
887 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 705 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
888 | ;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers. | 706 | ;;; Don't remove cache files during a regular install, removing the inventory cache on upgrades results in lots of damage to the servers. |
@@ -907,9 +725,6 @@ Call RemoveOldReleaseNotes | |||
907 | ;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py | 725 | ;; This placeholder is replaced by the complete list of all the files in the installer, by viewer_manifest.py |
908 | %%INSTALL_FILES%% | 726 | %%INSTALL_FILES%% |
909 | 727 | ||
910 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | ||
911 | ; If this is a silent update, we don't need to re-create these shortcuts or registry entries. | ||
912 | IfSilent POST_INSTALL | ||
913 | 728 | ||
914 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 729 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
915 | ; Shortcuts in start menu | 730 | ; Shortcuts in start menu |
@@ -918,25 +733,18 @@ SetOutPath "$INSTDIR" | |||
918 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ | 733 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT.lnk" \ |
919 | "$INSTDIR\$INSTEXE" "$INSTFLAGS" | 734 | "$INSTDIR\$INSTEXE" "$INSTFLAGS" |
920 | 735 | ||
921 | !ifdef MUSEUM | ||
922 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum.lnk" \ | ||
923 | 736 | ||
924 | "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" | 737 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Account.url" \ |
925 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\$INSTSHORTCUT Museum Spanish.lnk" \ | ||
926 | |||
927 | "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" | ||
928 | !endif | ||
929 | |||
930 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Create Trial Account.url" \ | ||
931 | "InternetShortcut" "URL" \ | 738 | "InternetShortcut" "URL" \ |
932 | "http://www.secondlife.com/registration/" | 739 | "http://www.secondlife.com/registration/" |
933 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ | 740 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Your Account.url" \ |
934 | "InternetShortcut" "URL" \ | 741 | "InternetShortcut" "URL" \ |
935 | "http://www.secondlife.com/account/" | 742 | "http://www.secondlife.com/account/" |
936 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.lnk" \ | 743 | WriteINIStr "$SMPROGRAMS\$INSTSHORTCUT\SL Scripting Language Help.url" \ |
937 | "$INSTDIR\lsl_guide.html" | 744 | "InternetShortcut" "URL" \ |
745 | "http://wiki.secondlife.com/wiki/LSL_Portal" | ||
938 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ | 746 | CreateShortCut "$SMPROGRAMS\$INSTSHORTCUT\Uninstall $INSTSHORTCUT.lnk" \ |
939 | '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' | 747 | '"$INSTDIR\uninst.exe"' '' |
940 | 748 | ||
941 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 749 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
942 | ; Other shortcuts | 750 | ; Other shortcuts |
@@ -944,18 +752,8 @@ SetOutPath "$INSTDIR" | |||
944 | CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" | 752 | CreateShortCut "$DESKTOP\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" |
945 | CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" | 753 | CreateShortCut "$INSTDIR\$INSTSHORTCUT.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS" |
946 | CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ | 754 | CreateShortCut "$INSTDIR\Uninstall $INSTSHORTCUT.lnk" \ |
947 | '"$INSTDIR\uninst.exe"' '/P="$INSTPROG"' | 755 | '"$INSTDIR\uninst.exe"' '' |
948 | |||
949 | !ifdef MUSEUM | ||
950 | CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" | ||
951 | 756 | ||
952 | CreateShortCut "$DESKTOP\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" | ||
953 | |||
954 | CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple" | ||
955 | |||
956 | CreateShortCut "$INSTDIR\$INSTSHORTCUT Museum Spanish.lnk" "$INSTDIR\$INSTEXE" "$INSTFLAGS -simple -spanish" | ||
957 | |||
958 | !endif | ||
959 | 757 | ||
960 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 758 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
961 | ; Write registry | 759 | ; Write registry |
@@ -965,22 +763,17 @@ WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Flags | |||
965 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" | 763 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Shortcut" "$INSTSHORTCUT" |
966 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" | 764 | WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\Linden Research, Inc.\$INSTPROG" "Exe" "$INSTEXE" |
967 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" | 765 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "DisplayName" "$INSTPROG (remove only)" |
968 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe" /P="$INSTPROG"' | 766 | WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\$INSTPROG" "UninstallString" '"$INSTDIR\uninst.exe"' |
969 | 767 | ||
970 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 768 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
971 | ; Write URL registry info | 769 | ; Write URL registry info |
972 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" | 770 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "(default)" "URL:Second Life" |
973 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" | 771 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}" "URL Protocol" "" |
974 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' | 772 | WriteRegStr HKEY_CLASSES_ROOT "${URLNAME}\DefaultIcon" "" '"$INSTDIR\$INSTEXE"' |
773 | ;; URL param must be last item passed to viewer, it ignores subsequent params | ||
774 | ;; to avoid parameter injection attacks. | ||
975 | WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' | 775 | WriteRegExpandStr HKEY_CLASSES_ROOT "${URLNAME}\shell\open\command" "" '"$INSTDIR\$INSTEXE" $INSTFLAGS -url "%1"' |
976 | 776 | ||
977 | Goto WRITE_UNINST | ||
978 | |||
979 | POST_INSTALL: | ||
980 | ; Run a post-executable script if necessary. | ||
981 | Call PostInstallExe | ||
982 | |||
983 | WRITE_UNINST: | ||
984 | ; write out uninstaller | 777 | ; write out uninstaller |
985 | WriteUninstaller "$INSTDIR\uninst.exe" | 778 | WriteUninstaller "$INSTDIR\uninst.exe" |
986 | 779 | ||