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