1 ;OpenAFS Install Script for NSIS
3 ; Written by Rob Murawski <rsm4@ieee.org>
6 ;NSIS Modern User Interface version 1.63
7 ;MultiLanguage Example Script
8 ;Written by Joost Verburg
10 ; Read in the environment information
11 !include ${INCLUDEDIR}\nsi-includes.nsi
12 ; Define DEBUG if building a DEBUG installer
14 ; This version compiles with NSIS v2.0b3 or NSIS v2.0b4
16 !ifdef v2.0b3 ; v2.0b3
17 !ifndef DEBUG ; !DEBUG
18 !define MUI_PRODUCT "OpenAFS" ;Define your own software name here
19 !else ; DEBUG on v2.0b3
20 !define MUI_PRODUCT "OpenAFS Checked/Debug"
22 !define MUI_VERSION ${AFS_VERSION}
24 !ifndef DEBUG ; !DEBUG on v2.0b4
25 Name "OpenAFS ${AFS_VERSION} ${__DATE__} ${__TIME__}"
26 !else ; DEBUG on v2.0b4
27 Name "OpenAFS ${AFS_VERSION} ${__DATE__} ${__TIME__} Checked/Debug"
28 !endif ; End DEBUG/!DEBUG
29 VIProductVersion "${AFS_VERSION}.00"
30 VIAddVersionKey "ProductName" "OpenAFS"
31 VIAddVersionKey "CompanyName" "OpenAFS.org"
32 VIAddVersionKey "ProductVersion" ${AFS_VERSION}
33 VIAddVersionKey "FileVersion" ${AFS_VERSION}
34 VIAddVersionKey "FileDescription" "OpenAFS for Windows Installer"
35 VIAddVersionKey "LegalCopyright" "(C)2003"
37 VIAddVersionKey "PrivateBuild" "Checked/Debug"
45 ;--------------------------------
50 OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows.exe"
52 OutFile "${AFS_DESTDIR}\WinInstall\OpenAFSforWindows-DEBUG.exe"
56 !define MUI_ICON "..\..\client_config\afs_config.ico"
58 !define MUI_UNICON "${NSISDIR}\Contrib\Icons\normal-uninstall.ico"
60 !define MUI_UNICON "..\..\client_config\afs_config.ico"
62 !define AFS_COMPANY_NAME "OpenAFS"
63 !define AFS_PRODUCT_NAME "OpenAFS"
64 !define AFS_REGKEY_ROOT "Software\TransarcCorporation"
67 ;Folder selection page
68 InstallDir "$PROGRAMFILES\OpenAFS" ; Install to shorter path
70 ;Remember install folder
71 InstallDirRegKey HKCU ${AFS_REGKEY_ROOT} ""
73 ;Remember the installer language
74 !define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
75 !define MUI_LANGDLL_REGISTRY_KEY ${AFS_REGKEY_ROOT}
76 !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
79 !define AFS_CLIENT_BUILDDIR "${AFS_DESTDIR}\root.client\usr\vice\etc"
80 !define AFS_WININSTALL_DIR "${AFS_DESTDIR}\WinInstall\Config"
81 !define AFS_BUILD_INCDIR "${AFS_DESTDIR}\include"
82 !define AFS_CLIENT_LIBDIR "${AFS_DESTDIR}\lib"
83 !define AFS_SERVER_BUILDDIR "${AFS_DESTDIR}\root.server\usr\afs\bin"
84 !define AFS_ETC_BUILDDIR "${AFS_DESTDIR}\etc"
86 ;--------------------------------
87 ;Modern UI Configuration
89 ;!define MUI_LICENSEPAGE
90 !define MUI_CUSTOMPAGECOMMANDS
91 !define MUI_WELCOMEPAGE
92 !define MUI_COMPONENTSPAGE
93 !define MUI_COMPONENTSPAGE_SMALLDESC
94 !define MUI_DIRECTORYPAGE
96 !define MUI_ABORTWARNING
97 !define MUI_FINISHPAGE
99 !define MUI_UNINSTALLER
100 !define MUI_UNCONFIRMPAGE
103 !IFDEF v2.0b3 ; v2.0b3
104 !insertmacro MUI_PAGECOMMAND_WELCOME
105 ;!insertmacro MUI_PAGECOMMAND_LICENSE
106 !insertmacro MUI_PAGECOMMAND_COMPONENTS
107 !insertmacro MUI_PAGECOMMAND_DIRECTORY
108 Page custom AFSPageGetCellServDB
109 Page custom AFSPageGetCellName
110 !insertmacro MUI_PAGECOMMAND_INSTFILES
111 !insertmacro MUI_PAGECOMMAND_FINISH
113 !insertmacro MUI_PAGE_WELCOME
114 !insertmacro MUI_PAGE_COMPONENTS
115 !insertmacro MUI_PAGE_DIRECTORY
116 Page custom AFSPageGetCellServDB
117 Page custom AFSPageGetCellName
118 !insertmacro MUI_PAGE_INSTFILES
119 !insertmacro MUI_PAGE_FINISH
122 ;LicenseData "Licenses.rtf"
123 ;--------------------------------
126 !insertmacro MUI_LANGUAGE "English"
127 ;!insertmacro MUI_LANGUAGE "French"
128 !insertmacro MUI_LANGUAGE "German"
129 !insertmacro MUI_LANGUAGE "Spanish"
130 !insertmacro MUI_LANGUAGE "SimpChinese"
131 !insertmacro MUI_LANGUAGE "TradChinese"
132 !insertmacro MUI_LANGUAGE "Japanese"
134 !insertmacro MUI_LANGUAGE "Korean"
136 ;!insertmacro MUI_LANGUAGE "Italian"
137 ;!insertmacro MUI_LANGUAGE "Dutch"
138 ;!insertmacro MUI_LANGUAGE "Danish"
139 ;!insertmacro MUI_LANGUAGE "Greek"
140 ;!insertmacro MUI_LANGUAGE "Russian"
141 !insertmacro MUI_LANGUAGE "PortugueseBR"
142 ;!insertmacro MUI_LANGUAGE "Polish"
143 ;!insertmacro MUI_LANGUAGE "Ukrainian"
144 ;!insertmacro MUI_LANGUAGE "Czech"
145 ;!insertmacro MUI_LANGUAGE "Slovak"
146 ;!insertmacro MUI_LANGUAGE "Croatian"
147 ;!insertmacro MUI_LANGUAGE "Bulgarian"
148 ;!insertmacro MUI_LANGUAGE "Hungarian"
149 ;!insertmacro MUI_LANGUAGE "Thai"
150 ;!insertmacro MUI_LANGUAGE "Romanian"
151 ;!insertmacro MUI_LANGUAGE "Macedonian"
152 ;!insertmacro MUI_LANGUAGE "Turkish"
154 ;--------------------------------
158 LangString DESC_SecCopyUI ${LANG_ENGLISH} "OpenAFS for Windows: English"
159 ;LangString DESC_SecCopyUI ${LANG_FRENCH} "OpenAFS for Windows: French"
160 LangString DESC_SecCopyUI ${LANG_GERMAN} "OpenAFS for Windows: German"
161 LangString DESC_SecCopyUI ${LANG_SPANISH} "OpenAFS for Windows: Spanish"
162 LangString DESC_SecCopyUI ${LANG_SIMPCHINESE} "OpenAFS for Windows: Simplified Chinese"
163 LangString DESC_SecCopyUI ${LANG_TRADCHINESE} "OpenAFS for Windows: Traditional Chinese description"
164 LangString DESC_SecCopyUI ${LANG_JAPANESE} "OpenAFS for Windows: Japanese description"
166 LangString DESC_SecCopyUI ${LANG_KOREAN} "OpenAFS for Windows: Korean description"
168 ;LangString DESC_SecCopyUI ${LANG_ITALIAN} "OpenAFS for Windows: Italian description"
169 ;LangString DESC_SecCopyUI ${LANG_DUTCH} "OpenAFS for Windows: Dutch description"
170 ;LangString DESC_SecCopyUI ${LANG_DANISH} "OpenAFS for Windows: Danish description"
171 ;LangString DESC_SecCopyUI ${LANG_GREEK} "OpenAFS for Windows: Greek description"
172 ;LangString DESC_SecCopyUI ${LANG_RUSSIAN} "OpenAFS for Windows: Russian description"
173 LangString DESC_SecCopyUI ${LANG_PORTUGUESEBR} "OpenAFS for Windows: Portuguese (Brasil) description"
174 ;LangString DESC_SecCopyUI ${LANG_POLISH} "OpenAFS for Windows: Polish description"
175 ;LangString DESC_SecCopyUI ${LANG_UKRAINIAN} "OpenAFS for Windows: Ukrainian description"
176 ;LangString DESC_SecCopyUI ${LANG_CZECH} "OpenAFS for Windows: Czechian description"
177 ;LangString DESC_SecCopyUI ${LANG_SLOVAK} "OpenAFS for Windows: Slovakian description"
178 ;LangString DESC_SecCopyUI ${LANG_CROATIAN} "OpenAFS for Windows: Slovakian description"
179 ;LangString DESC_SecCopyUI ${LANG_BULGARIAN} "OpenAFS for Windows: Bulgarian description"
180 ;LangString DESC_SecCopyUI ${LANG_HUNGARIAN} "OpenAFS for Windows: Hungarian description"
181 ;LangString DESC_SecCopyUI ${LANG_THAI} "OpenAFS for Windows: Thai description"
182 ;LangString DESC_SecCopyUI ${LANG_ROMANIAN} "OpenAFS for Windows: Romanian description"
183 ;LangString DESC_SecCopyUI ${LANG_MACEDONIAN} "OpenAFS for Windows: Macedonian description"
184 ;LangString DESC_SecCopyUI ${LANG_TURKISH} "OpenAFS for Windows: Turkish description"
186 LangString DESC_secClient ${LANG_ENGLISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
187 LangString DESC_secClient ${LANG_GERMAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
188 LangString DESC_secClient ${LANG_SPANISH} "OpenAFS Client: Allows you to access AFS from your Windows PC."
189 LangString DESC_secClient ${LANG_SIMPCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
190 LangString DESC_secClient ${LANG_TRADCHINESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
191 LangString DESC_secClient ${LANG_JAPANESE} "OpenAFS Client: Allows you to access AFS from your Windows PC."
193 LangString DESC_secClient ${LANG_KOREAN} "OpenAFS Client: Allows you to access AFS from your Windows PC."
195 LangString DESC_secClient ${LANG_PORTUGUESEBR} "OpenAFS Client: Allows you to access AFS from your Windows PC."
197 LangString DESC_secServer ${LANG_ENGLISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
198 LangString DESC_secServer ${LANG_GERMAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
199 LangString DESC_secServer ${LANG_SPANISH} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
200 LangString DESC_secServer ${LANG_SIMPCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
201 LangString DESC_secServer ${LANG_TRADCHINESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
202 LangString DESC_secServer ${LANG_JAPANESE} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
204 LangString DESC_secServer ${LANG_KOREAN} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
206 LangString DESC_secServer ${LANG_PORTUGUESEBR} "OpenAFS Server: Allows you to run an AFS file server. This option requires the AFS Client."
208 LangString DESC_secControl ${LANG_ENGLISH} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
209 LangString DESC_secControl ${LANG_GERMAN} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
210 LangString DESC_secControl ${LANG_SPANISH} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
211 LangString DESC_secControl ${LANG_SIMPCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
212 LangString DESC_secControl ${LANG_TRADCHINESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
213 LangString DESC_secControl ${LANG_JAPANESE} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
215 LangString DESC_secControl ${LANG_KOREAN} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
217 LangString DESC_secControl ${LANG_PORTUGUESEBR} "Control Center: GUI utilities for managing and configuring AFS servers. This option requires the AFS Client."
219 LangString DESC_secDocs ${LANG_ENGLISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
220 LangString DESC_secDocs ${LANG_GERMAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
221 LangString DESC_secDocs ${LANG_SPANISH} "Supplemental Documentation: Additional documentation for using OpenAFS."
222 LangString DESC_secDocs ${LANG_SIMPCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
223 LangString DESC_secDocs ${LANG_TRADCHINESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
224 LangString DESC_secDocs ${LANG_JAPANESE} "Supplemental Documentation: Additional documentation for using OpenAFS."
226 LangString DESC_secDocs ${LANG_KOREAN} "Supplemental Documentation: Additional documentation for using OpenAFS."
228 LangString DESC_secDocs ${LANG_PORTUGUESEBR} "Supplemental Documentation: Additional documentation for using OpenAFS."
230 ; Popup error messages
231 LangString CellError ${LANG_ENGLISH} "You must specify a valid CellServDB file to copy during install"
232 LangString CellError ${LANG_GERMAN} "You must specify a valid CellServDB file to copy during the install"
233 LangString CellError ${LANG_SPANISH} "You must specify a valid CellServDB file to copy during the install"
234 LangString CellError ${LANG_SIMPCHINESE} "You must specify a valid CellServDB file to copy during the install"
235 LangString CellError ${LANG_TRADCHINESE} "You must specify a valid CellServDB file to copy during the install"
236 LangString CellError ${LANG_JAPANESE} "You must specify a valid CellServDB file to copy during the install"
238 LangString CellError ${LANG_KOREAN} "You must specify a valid CellServDB file to copy during the install"
240 LangString CellError ${LANG_PORTUGUESEBR} "You must specify a valid CellServDB file to copy during the install"
242 LangString CellNameError ${LANG_ENGLISH} "You must specify a cell name for your client to use."
243 LangString CellNameError ${LANG_GERMAN} "You must specify a cell name for your client to use."
244 LangString CellNameError ${LANG_SPANISH} "You must specify a cell name for your client to use."
245 LangString CellNameError ${LANG_SIMPCHINESE} "You must specify a cell name for your client to use."
246 LangString CellNameError ${LANG_TRADCHINESE} "You must specify a cell name for your client to use."
247 LangString CellNameError ${LANG_JAPANESE} "You must specify a cell name for your client to use."
249 LangString CellNameError ${LANG_KOREAN} "You must specify a cell name for your client to use."
251 LangString CellNameError ${LANG_PORTUGUESEBR} "You must specify a cell name for your client to use."
253 LangString URLError ${LANG_ENGLISH} "You must specify a URL if you choose the option to download the CellServDB."
254 LangString URLError ${LANG_GERMAN} "You must specify a URL if you choose the option to download the CellServDB."
255 LangString URLError ${LANG_SPANISH} "You must specify a URL if you choose the option to download the CellServDB."
256 LangString URLError ${LANG_SIMPCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
257 LangString URLError ${LANG_TRADCHINESE} "You must specify a URL if you choose the option to download the CellServDB."
258 LangString URLError ${LANG_JAPANESE} "You must specify a URL if you choose the option to download the CellServDB."
260 LangString URLError ${LANG_KOREAN} "You must specify a URL if you choose the option to download the CellServDB."
262 LangString URLError ${LANG_PORTUGUESEBR} "You must specify a URL if you choose the option to download the CellServDB."
265 ; Upgrade/re-install strings
266 LangString UPGRADE_CLIENT ${LANG_ENGLISH} "Upgrade AFS Client"
267 LangString UPGRADE_CLIENT ${LANG_GERMAN} "Upgrade AFS Client"
268 LangString UPGRADE_CLIENT ${LANG_SPANISH} "Upgrade AFS Client"
269 LangString UPGRADE_CLIENT ${LANG_SIMPCHINESE} "Upgrade AFS Client"
270 LangString UPGRADE_CLIENT ${LANG_TRADCHINESE} "Upgrade AFS Client"
271 LangString UPGRADE_CLIENT ${LANG_JAPANESE} "Upgrade AFS Client"
273 LangString UPGRADE_CLIENT ${LANG_KOREAN} "Upgrade AFS Client"
275 LangString UPGRADE_CLIENT ${LANG_PORTUGUESEBR} "Upgrade AFS Client"
277 LangString REINSTALL_CLIENT ${LANG_ENGLISH} "Re-install AFS Client"
278 LangString REINSTALL_CLIENT ${LANG_GERMAN} "Re-install AFS Client"
279 LangString REINSTALL_CLIENT ${LANG_SPANISH} "Re-install AFS Client"
280 LangString REINSTALL_CLIENT ${LANG_SIMPCHINESE} "Re-install AFS Client"
281 LangString REINSTALL_CLIENT ${LANG_TRADCHINESE} "Re-install AFS Client"
282 LangString REINSTALL_CLIENT ${LANG_JAPANESE} "Re-install AFS Client"
284 LangString REINSTALL_CLIENT ${LANG_KOREAN} "Re-install AFS Client"
286 LangString REINSTALL_CLIENT ${LANG_PORTUGUESEBR} "Re-install AFS Client"
288 LangString UPGRADE_SERVER ${LANG_ENGLISH} "Upgrade AFS Server"
289 LangString UPGRADE_SERVER ${LANG_GERMAN} "Upgrade AFS Server"
290 LangString UPGRADE_SERVER ${LANG_SPANISH} "Upgrade AFS Server"
291 LangString UPGRADE_SERVER ${LANG_SIMPCHINESE} "Upgrade AFS Server"
292 LangString UPGRADE_SERVER ${LANG_TRADCHINESE} "Upgrade AFS Server"
293 LangString UPGRADE_SERVER ${LANG_JAPANESE} "Upgrade AFS Server"
295 LangString UPGRADE_SERVER ${LANG_KOREAN} "Upgrade AFS Server"
297 LangString UPGRADE_SERVER ${LANG_PORTUGUESEBR} "Upgrade AFS Server"
299 LangString REINSTALL_SERVER ${LANG_ENGLISH} "Re-install AFS Server"
300 LangString REINSTALL_SERVER ${LANG_GERMAN} "Re-install AFS Server"
301 LangString REINSTALL_SERVER ${LANG_SPANISH} "Re-install AFS Server"
302 LangString REINSTALL_SERVER ${LANG_SIMPCHINESE} "Re-install AFS Server"
303 LangString REINSTALL_SERVER ${LANG_TRADCHINESE} "Re-install AFS Server"
304 LangString REINSTALL_SERVER ${LANG_JAPANESE} "Re-install AFS Server"
306 LangString REINSTALL_SERVER ${LANG_KOREAN} "Re-install AFS Server"
308 LangString REINSTALL_SERVER ${LANG_PORTUGUESEBR} "Re-install AFS Server"
310 ReserveFile "CellServPage.ini"
311 ReserveFile "AFSCell.ini"
312 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS ;InstallOptions plug-in
313 !insertmacro MUI_RESERVEFILE_LANGDLL ;Language selection dialog
314 ;--------------------------------
316 ; Macro - Upgrade DLL File
317 ; Written by Joost Verburg
318 ; ------------------------
321 ; !insertmacro UpgradeDLL "dllname.dll" "$SYSDIR\dllname.dll"
323 ; !define UPGRADEDLL_NOREGISTER if you want to upgrade a DLL which cannot be registered
325 ; Note that this macro sets overwrite to ON (the default) when it has been inserted.
326 ; If you are using another setting, set it again after inserting the macro.
329 !macro UpgradeDLL LOCALFILE DESTFILE
336 ;------------------------
337 ;Check file and version
339 IfFileExists "${DESTFILE}" "" "copy_${LOCALFILE}"
342 GetDLLVersionLocal "${LOCALFILE}" $R0 $R1
343 GetDLLVersion "${DESTFILE}" $R2 $R3
344 IfErrors "upgrade_${LOCALFILE}"
346 IntCmpU $R0 $R2 "" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
347 IntCmpU $R1 $R3 "done_${LOCALFILE}" "done_${LOCALFILE}" "upgrade_${LOCALFILE}"
349 ;------------------------
350 ;Let's upgrade the DLL!
354 "upgrade_${LOCALFILE}:"
355 !ifndef UPGRADEDLL_NOREGISTER
357 UnRegDLL "${DESTFILE}"
360 ;------------------------
361 ;Try to copy the DLL directly
364 StrCpy $R0 "${DESTFILE}"
365 Call ":file_${LOCALFILE}"
366 IfErrors "" "noreboot_${LOCALFILE}"
368 ;------------------------
369 ;DLL is in use. Copy it to a temp file and Rename it on reboot.
372 Call ":file_${LOCALFILE}"
373 Rename /REBOOTOK $R0 "${DESTFILE}"
375 ;------------------------
376 ;Register the DLL on reboot
378 !ifndef UPGRADEDLL_NOREGISTER
379 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\RunOnce" \
380 "Register ${DESTFILE}" '"$SYSDIR\rundll32.exe" "${DESTFILE},DllRegisterServer"'
383 Goto "done_${LOCALFILE}"
385 ;------------------------
386 ;DLL does not exist - just extract
389 StrCpy $R0 "${DESTFILE}"
390 Call ":file_${LOCALFILE}"
392 ;------------------------
395 "noreboot_${LOCALFILE}:"
396 !ifndef UPGRADEDLL_NOREGISTER
400 ;------------------------
410 ;------------------------
413 Goto "end_${LOCALFILE}"
415 ;------------------------
416 ;Called to extract the DLL
419 File /oname=$R0 "${LOCALFILE}"
424 ;------------------------
425 ;Set overwrite to default
426 ;(was set to TRY above)
433 ;--------------------------------
436 ;Things that need to be extracted on first (keep these lines before any File command!)
437 ;Only useful for BZIP2 compression
438 !insertmacro MUI_RESERVEFILE_LANGDLL
441 ;--------------------------------
444 ;----------------------
446 Section "AFS Client" secClient
448 SetShellVarContext all
449 ; Stop any running services or we can't replace the files
450 ; Stop the running processes
452 ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
453 ;nsExec::Exec '$R0 afscreds.exe'
455 ;nsExec::Exec '$R0 krbcc32s.exe'
458 nsExec::Exec "net stop TransarcAFSDaemon"
459 nsExec::Exec "net stop TransarcAFSServer"
461 ; Do client components
462 SetOutPath "$INSTDIR\Client\Program"
463 File "${AFS_CLIENT_BUILDDIR}\afsshare.exe"
464 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
465 File "${AFS_CLIENT_BUILDDIR}\libosi.dll"
466 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
467 File "${AFS_CLIENT_BUILDDIR}\libafsconf.dll"
468 File "${AFS_CLIENT_BUILDDIR}\klog.exe"
469 File "${AFS_CLIENT_BUILDDIR}\tokens.exe"
470 File "${AFS_CLIENT_BUILDDIR}\unlog.exe"
471 File "${AFS_CLIENT_BUILDDIR}\fs.exe"
472 File "${AFS_CLIENT_LIBDIR}\libafsconf.lib"
473 File "${AFS_CLIENT_LIBDIR}\afsauthent.lib"
474 File "${AFS_CLIENT_BUILDDIR}\afscreds.exe"
475 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
476 File "${AFS_BUILD_INCDIR}\afs\auth.h"
477 File "${AFS_CLIENT_BUILDDIR}\afsd_service.exe"
478 File "${AFS_CLIENT_BUILDDIR}\afslogon.dll"
479 File "${AFS_CLIENT_BUILDDIR}\symlink.exe"
480 File "${AFS_DESTDIR}\bin\kpasswd.exe"
481 File "${AFS_SERVER_BUILDDIR}\pts.exe"
482 File "${AFS_SERVER_BUILDDIR}\bos.exe"
483 File "${AFS_SERVER_BUILDDIR}\kas.exe"
484 File "${AFS_SERVER_BUILDDIR}\vos.exe"
485 File "${AFS_SERVER_BUILDDIR}\udebug.exe"
486 File "${AFS_DESTDIR}\bin\translate_et.exe"
487 File "${AFS_DESTDIR}\etc\rxdebug.exe"
488 File "${AFS_DESTDIR}\etc\backup.exe"
491 File "${AFS_CLIENT_BUILDDIR}\afsshare.pdb"
492 File "${AFS_CLIENT_BUILDDIR}\libosi.pdb"
493 File "${AFS_CLIENT_BUILDDIR}\libafsconf.pdb"
494 File "${AFS_CLIENT_BUILDDIR}\klog.pdb"
495 File "${AFS_CLIENT_BUILDDIR}\tokens.pdb"
496 File "${AFS_CLIENT_BUILDDIR}\unlog.pdb"
497 File "${AFS_CLIENT_BUILDDIR}\fs.pdb"
498 File "${AFS_CLIENT_BUILDDIR}\afscreds.pdb"
499 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
500 File "${AFS_CLIENT_BUILDDIR}\afsd_service.pdb"
501 File "${AFS_CLIENT_BUILDDIR}\afslogon.pdb"
502 File "${AFS_CLIENT_BUILDDIR}\symlink.pdb"
503 File "${AFS_DESTDIR}\bin\kpasswd.pdb"
504 ;File "${AFS_SERVER_BUILDDIR}\pts.pdb"
505 File "${AFS_SERVER_BUILDDIR}\bos.pdb"
506 File "${AFS_SERVER_BUILDDIR}\kas.pdb"
507 File "${AFS_SERVER_BUILDDIR}\vos.pdb"
508 File "${AFS_SERVER_BUILDDIR}\udebug.pdb"
509 File "${AFS_DESTDIR}\bin\translate_et.pdb"
510 File "${AFS_DESTDIR}\etc\rxdebug.pdb"
511 File "${AFS_DESTDIR}\etc\backup.pdb"
515 SetOutPath "$INSTDIR\Client\Program\Include"
516 File "${AFS_BUILD_INCDIR}\lock.h"
517 File "${AFS_BUILD_INCDIR}\lwp.h"
518 File "${AFS_BUILD_INCDIR}\preempt.h"
519 File "${AFS_BUILD_INCDIR}\timer.h"
520 File "${AFS_BUILD_INCDIR}\des.h"
521 File "${AFS_BUILD_INCDIR}\des_conf.h"
522 File "${AFS_BUILD_INCDIR}\mit-cpyright.h"
523 ;File "${AFS_BUILD_INCDIR}\des-odd.h"
524 File "${AFS_BUILD_INCDIR}\crypt.h"
525 File "${AFS_BUILD_INCDIR}\pthread.h"
526 File "${AFS_BUILD_INCDIR}\dbrpc.h"
527 File "${AFS_BUILD_INCDIR}\basic.h"
528 File "${AFS_BUILD_INCDIR}\osidebug.h"
529 File "${AFS_BUILD_INCDIR}\osiltype.h"
530 File "${AFS_BUILD_INCDIR}\osistatl.h"
531 File "${AFS_BUILD_INCDIR}\trylock.h"
532 File "${AFS_BUILD_INCDIR}\main.h"
533 File "${AFS_BUILD_INCDIR}\osibasel.h"
534 File "${AFS_BUILD_INCDIR}\osifd.h"
535 File "${AFS_BUILD_INCDIR}\osiqueue.h"
536 File "${AFS_BUILD_INCDIR}\osiutils.h"
537 File "${AFS_BUILD_INCDIR}\osi.h"
538 File "${AFS_BUILD_INCDIR}\osidb.h"
539 File "${AFS_BUILD_INCDIR}\osilog.h"
540 File "${AFS_BUILD_INCDIR}\osisleep.h"
541 File "${AFS_BUILD_INCDIR}\perf.h"
542 File "${AFS_BUILD_INCDIR}\ubik.h"
543 File "${AFS_BUILD_INCDIR}\ubik_int.h"
547 SetOutPath "$INSTDIR\Client\Program\Include\afs"
548 File "${AFS_BUILD_INCDIR}\afs\afs_args.h"
549 File "${AFS_BUILD_INCDIR}\afs\debug.h"
550 File "${AFS_BUILD_INCDIR}\afs\param.h"
551 File "${AFS_BUILD_INCDIR}\afs\afs_sysnames.h"
552 ;File "${AFS_BUILD_INCDIR}\afs\permit_xprt.h"
553 File "${AFS_BUILD_INCDIR}\afs\stds.h"
554 File "${AFS_BUILD_INCDIR}\afs\icl.h"
555 File "${AFS_BUILD_INCDIR}\afs\procmgmt.h"
556 File "${AFS_BUILD_INCDIR}\afs\afsutil.h"
557 File "${AFS_BUILD_INCDIR}\afs\assert.h"
558 File "${AFS_BUILD_INCDIR}\afs\dirent.h"
559 File "${AFS_BUILD_INCDIR}\afs\errors.h"
560 File "${AFS_BUILD_INCDIR}\afs\itc.h"
561 File "${AFS_BUILD_INCDIR}\afs\vice.h"
562 File "${AFS_BUILD_INCDIR}\afs\pthread_glock.h"
563 File "${AFS_BUILD_INCDIR}\afs\errmap_nt.h"
564 File "${AFS_BUILD_INCDIR}\afs\dirpath.h"
565 File "${AFS_BUILD_INCDIR}\afs\ktime.h"
566 File "${AFS_BUILD_INCDIR}\afs\fileutil.h"
567 File "${AFS_BUILD_INCDIR}\afs\secutil_nt.h"
568 File "${AFS_BUILD_INCDIR}\afs\com_err.h"
569 File "${AFS_BUILD_INCDIR}\afs\error_table.h"
570 ;File "${AFS_BUILD_INCDIR}\afs\mit_sipb-cr.h"
571 File "${AFS_BUILD_INCDIR}\afs\cmd.h"
572 File "${AFS_BUILD_INCDIR}\afs\rxgen_consts.h"
573 File "${AFS_BUILD_INCDIR}\afs\afsint.h"
574 File "${AFS_BUILD_INCDIR}\afs\afscbint.h"
575 File "${AFS_BUILD_INCDIR}\afs\audit.h"
576 File "${AFS_BUILD_INCDIR}\afs\acl.h"
577 File "${AFS_BUILD_INCDIR}\afs\prs_fs.h"
578 File "${AFS_BUILD_INCDIR}\afs\afsd.h"
579 File "${AFS_BUILD_INCDIR}\afs\cm.h"
580 File "${AFS_BUILD_INCDIR}\afs\cm_buf.h"
581 File "${AFS_BUILD_INCDIR}\afs\cm_cell.h"
582 File "${AFS_BUILD_INCDIR}\afs\cm_config.h"
583 File "${AFS_BUILD_INCDIR}\afs\cm_conn.h"
584 File "${AFS_BUILD_INCDIR}\afs\cm_ioctl.h"
585 File "${AFS_BUILD_INCDIR}\afs\cm_scache.h"
586 File "${AFS_BUILD_INCDIR}\afs\cm_server.h"
587 File "${AFS_BUILD_INCDIR}\afs\cm_user.h"
588 File "${AFS_BUILD_INCDIR}\afs\cm_utils.h"
589 File "${AFS_BUILD_INCDIR}\afs\fs_utils.h"
590 File "${AFS_BUILD_INCDIR}\afs\krb.h"
591 File "${AFS_BUILD_INCDIR}\afs\krb_prot.h"
592 File "${AFS_BUILD_INCDIR}\afs\smb.h"
593 File "${AFS_BUILD_INCDIR}\afs\smb3.h"
594 File "${AFS_BUILD_INCDIR}\afs\smb_iocons.h"
595 File "${AFS_BUILD_INCDIR}\afs\smb_ioctl.h"
596 File "${AFS_BUILD_INCDIR}\afs\afsrpc.h"
597 File "${AFS_BUILD_INCDIR}\afs\afssyscalls.h"
598 File "${AFS_BUILD_INCDIR}\afs\pioctl_nt.h"
599 File "${AFS_BUILD_INCDIR}\afs\auth.h"
600 File "${AFS_BUILD_INCDIR}\afs\cellconfig.h"
601 File "${AFS_BUILD_INCDIR}\afs\keys.h"
602 File "${AFS_BUILD_INCDIR}\afs\ptserver.h"
603 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
604 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
605 File "${AFS_BUILD_INCDIR}\afs\ptint.h"
606 File "${AFS_BUILD_INCDIR}\afs\pterror.h"
607 File "${AFS_BUILD_INCDIR}\afs\ptclient.h"
608 File "${AFS_BUILD_INCDIR}\afs\prserver.h"
609 File "${AFS_BUILD_INCDIR}\afs\print.h"
610 File "${AFS_BUILD_INCDIR}\afs\prerror.h"
611 File "${AFS_BUILD_INCDIR}\afs\prclient.h"
612 File "${AFS_BUILD_INCDIR}\afs\kautils.h"
613 File "${AFS_BUILD_INCDIR}\afs\kauth.h"
614 File "${AFS_BUILD_INCDIR}\afs\kaport.h"
615 File "${AFS_BUILD_INCDIR}\afs\vl_opcodes.h"
616 File "${AFS_BUILD_INCDIR}\afs\vlserver.h"
617 File "${AFS_BUILD_INCDIR}\afs\vldbint.h"
618 File "${AFS_BUILD_INCDIR}\afs\usd.h"
619 File "${AFS_BUILD_INCDIR}\afs\bubasics.h"
620 File "${AFS_BUILD_INCDIR}\afs\butc.h"
621 File "${AFS_BUILD_INCDIR}\afs\bumon.h"
622 File "${AFS_BUILD_INCDIR}\afs\butm.h"
623 File "${AFS_BUILD_INCDIR}\afs\tcdata.h"
624 File "${AFS_BUILD_INCDIR}\afs\budb.h"
625 ;File "${AFS_BUILD_INCDIR}\afs\budb_errors.h"
626 File "${AFS_BUILD_INCDIR}\afs\budb_client.h"
627 File "${AFS_BUILD_INCDIR}\afs\dir.h"
628 File "${AFS_BUILD_INCDIR}\afs\fssync.h"
629 File "${AFS_BUILD_INCDIR}\afs\ihandle.h"
630 File "${AFS_BUILD_INCDIR}\afs\nfs.h"
631 File "${AFS_BUILD_INCDIR}\afs\ntops.h"
632 File "${AFS_BUILD_INCDIR}\afs\partition.h"
633 File "${AFS_BUILD_INCDIR}\afs\viceinode.h"
634 File "${AFS_BUILD_INCDIR}\afs\vnode.h"
635 File "${AFS_BUILD_INCDIR}\afs\volume.h"
636 File "${AFS_BUILD_INCDIR}\afs\voldefs.h"
637 File "${AFS_BUILD_INCDIR}\afs\volser.h"
638 File "${AFS_BUILD_INCDIR}\afs\volint.h"
639 File "${AFS_BUILD_INCDIR}\afs\fs_stats.h"
640 File "${AFS_BUILD_INCDIR}\afs\bosint.h"
641 File "${AFS_BUILD_INCDIR}\afs\bnode.h"
644 SetOutPath "$INSTDIR\Client\Program\Include\rx"
645 File "${AFS_BUILD_INCDIR}\rx\rx.h"
646 File "${AFS_BUILD_INCDIR}\rx\rx_packet.h"
647 File "${AFS_BUILD_INCDIR}\rx\rx_user.h"
648 File "${AFS_BUILD_INCDIR}\rx\rx_event.h"
649 File "${AFS_BUILD_INCDIR}\rx\rx_queue.h"
650 File "${AFS_BUILD_INCDIR}\rx\rx_globals.h"
651 File "${AFS_BUILD_INCDIR}\rx\rx_clock.h"
652 File "${AFS_BUILD_INCDIR}\rx\rx_misc.h"
653 File "${AFS_BUILD_INCDIR}\rx\rx_multi.h"
654 File "${AFS_BUILD_INCDIR}\rx\rx_null.h"
655 File "${AFS_BUILD_INCDIR}\rx\rx_lwp.h"
656 File "${AFS_BUILD_INCDIR}\rx\rx_pthread.h"
657 File "${AFS_BUILD_INCDIR}\rx\rx_xmit_nt.h"
658 File "${AFS_BUILD_INCDIR}\rx\xdr.h"
659 File "${AFS_BUILD_INCDIR}\rx\rxkad.h"
664 SetOutPath "$INSTDIR\Client\Program\Sample"
665 File "..\..\afsd\sample\token.c"
671 ; Do WINDOWSDIR components
673 ; Do Windows SYSDIR (Control panel)
675 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.cpl"
677 File "${AFS_CLIENT_BUILDDIR}\afs_cpa.pdb"
680 ; Get AFS CellServDB file
681 Call afs.GetCellServDB
682 !ifdef INSTALL_LOOPBACK
683 Call afs.InstallMSLoopback
687 ; Include Kerberos for Windows files in the installer...
688 SetOutPath "$INSTDIR\kfw\bin\"
689 File "${KFW_SOURCE}\bin\*"
690 SetOutPath "$INSTDIR\kfw\doc"
691 File "${KFW_SOURCE}\doc\*"
694 ;Store install folder
695 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\Client" "" $INSTDIR
696 Call AFSCommon.Install
698 ; Write registry entries
699 WriteRegStr HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
700 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "" "AFS Client Shell Extension"
701 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "" "$INSTDIR\Client\Program\afs_shl_ext.dll"
702 WriteRegStr HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32" "ThreadingModel" "Apartment"
703 WriteRegStr HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension" "" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
704 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}" "AFS Client Shell Extension"
707 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
708 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "VersionString" ${AFS_VERSION}
709 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Title" "AFS Client"
710 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Description" "AFS Client"
711 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName" "$INSTDIR\Client\Program"
712 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Software Type" "File System"
713 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
714 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
715 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
716 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
717 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Title" "AFS Client"
718 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Description" "AFS Client"
719 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Software Type" "File System"
720 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PathName" "$INSTDIR\Client\Program"
721 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
722 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
723 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
725 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug" 1
726 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug" 1
728 ; Delete the DEBUG string
729 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "Debug"
730 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Client\${AFS_VERSION}" "Debug"
732 ; Set network settings
733 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled" 0
735 ;Write start menu entries
736 CreateDirectory "$SMPROGRAMS\OpenAFS\Client"
737 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
738 CreateShortCut "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk" "$INSTDIR\Client\Program\afscreds.exe"
739 CreateShortCut "$SMSTARTUP\AFS Credentials.lnk" "$INSTDIR\Client\Program\afscreds.exe"
741 Push "$INSTDIR\Client\Program"
743 Push "$INSTDIR\Common"
747 ; Add kfw to path too
748 Push "$INSTDIR\kfw\bin"
752 ; Create the AFS service
753 SetOutPath "$INSTDIR\Common"
754 File "${AFS_WININSTALL_DIR}\Service.exe"
755 nsExec::Exec "net stop TransarcAFSDaemon"
756 ;IMPORTANT! If we are not refreshing the config files, do NOT remove the service
757 ;Don't re-install because it must be present or we wouldn't have passed the Reg check
759 ReadRegStr $R2 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "Cell"
760 StrCmp $R2 "" +1 skipremove
761 nsExec::Exec '$INSTDIR\Common\Service.exe u TransarcAFSDaemon'
762 nsExec::Exec '$INSTDIR\Common\Service.exe TransarcAFSDaemon "$INSTDIR\Client\Program\afsd_service.exe" "OpenAFS Client Service"'
764 Delete "$INSTDIR\Common\service.exe"
767 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "(Default)" ""
768 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "AuthentProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
769 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Class" 2
770 ReadINIStr $R0 $1 "Field 7" "State"
771 ReadINIStr $R1 $1 "Field 9" "State"
772 ; Complicated way to do $R1 = ($R1 *2) + $R0
775 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonOptions" $R1
776 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "LogonScript" "$INSTDIR\Client\Program\afscreds.exe -:%s -x"
777 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "Name" "OpenAFSDaemon"
778 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\NetworkProvider" "ProviderPath" "$INSTDIR\Client\Program\afslogon.dll"
781 ReadINIStr $R0 $1 "Field 2" "State"
782 WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell" $R0
783 ReadINIStr $R0 $1 "Field 3" "State"
784 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "ShowTrayIcon" 1
785 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "SecurityLevel" $R0
786 ReadINIStr $R0 $1 "Field 5" "State"
787 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "FreelanceClient" $R0
788 WriteRegDWORD HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "UseDNS" 0
791 WriteUninstaller "$INSTDIR\Uninstall.exe"
795 ;------------------------
797 Section "AFS Server" secServer
799 SetShellVarContext all
800 ; Stop any running services or we can't replace the files
801 ; Stop the running processes
803 ;File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe" ; Might not have the MSVCR71.DLL file to run
804 ;nsExec::Exec '$R0 afscreds.exe'
806 ;nsExec::Exec '$R0 krbcc32s.exe'
809 nsExec::Exec "net stop TransarcAFSDaemon"
810 nsExec::Exec "net stop TransarcAFSServer"
812 CreateDirectory "$INSTDIR\Server\usr\afs\etc"
813 CreateDirectory "$INSTDIR\Server\usr\afs\local"
814 CreateDirectory "$INSTDIR\Server\usr\afs\etc\logs"
816 SetOutPath "$INSTDIR\Server\usr\afs\bin"
817 File "${AFS_SERVER_BUILDDIR}\afskill.exe"
818 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.exe"
819 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.exe"
820 File "${AFS_SERVER_BUILDDIR}\bosserver.exe"
821 File "${AFS_SERVER_BUILDDIR}\buserver.exe"
822 File "${AFS_ETC_BUILDDIR}\butc.exe"
823 File "${AFS_SERVER_BUILDDIR}\fileserver.exe"
824 File "${AFS_ETC_BUILDDIR}\fms.exe"
825 File "${AFS_SERVER_BUILDDIR}\kaserver.exe"
826 File "${AFS_SERVER_BUILDDIR}\ptserver.exe"
827 File "${AFS_SERVER_BUILDDIR}\salvager.exe"
828 File "${AFS_SERVER_BUILDDIR}\upclient.exe"
829 File "${AFS_SERVER_BUILDDIR}\upserver.exe"
830 File "${AFS_SERVER_BUILDDIR}\vlserver.exe"
831 File "${AFS_SERVER_BUILDDIR}\volinfo.exe"
832 File "${AFS_SERVER_BUILDDIR}\volserver.exe"
835 File "${AFS_SERVER_BUILDDIR}\afskill.pdb"
836 File "${AFS_SERVER_BUILDDIR}\afssvrcfg.pdb"
837 File "${AFS_SERVER_BUILDDIR}\bosctlsvc.pdb"
838 File "${AFS_SERVER_BUILDDIR}\bosserver.pdb"
839 File "${AFS_SERVER_BUILDDIR}\buserver.pdb"
840 File "${AFS_ETC_BUILDDIR}\butc.pdb"
841 File "${AFS_SERVER_BUILDDIR}\fileserver.pdb"
842 File "${AFS_ETC_BUILDDIR}\fms.pdb"
843 File "${AFS_SERVER_BUILDDIR}\kaserver.pdb"
844 File "${AFS_SERVER_BUILDDIR}\ptserver.pdb"
845 File "${AFS_SERVER_BUILDDIR}\salvager.pdb"
846 File "${AFS_SERVER_BUILDDIR}\upclient.pdb"
847 File "${AFS_SERVER_BUILDDIR}\upserver.pdb"
848 File "${AFS_SERVER_BUILDDIR}\vlserver.pdb"
849 File "${AFS_SERVER_BUILDDIR}\volinfo.pdb"
850 File "${AFS_SERVER_BUILDDIR}\volserver.pdb"
853 ;AFS Server common files
854 SetOutPath "$INSTDIR\Common"
855 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
856 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
857 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
858 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
859 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
862 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
863 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
864 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
865 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
866 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
868 SetOutPath "$INSTDIR\Common"
872 File "${AFS_SERVER_BUILDDIR}\afsserver.cpl"
875 File "${AFS_SERVER_BUILDDIR}\afsserver.pdb"
878 ;Store install folder
879 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Server" "" $INSTDIR
881 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
882 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "VersionString" ${AFS_VERSION}
883 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Title" "AFS Server"
884 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Description" "AFS Server for Windows"
885 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName" "$INSTDIR\Server"
886 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Software Type" "File System"
887 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
888 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
889 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
890 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
891 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Title" "AFS Server"
892 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Description" "AFS Server for Windows"
893 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Software Type" "File System"
894 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PathName" "$INSTDIR\Server"
895 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
896 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
897 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
899 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug" 1
900 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug" 1
902 ; Delete the DEBUG string
903 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "Debug"
904 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Server\${AFS_VERSION}" "Debug"
906 ; Install the service
907 SetOutPath "$INSTDIR\Common"
908 File "${AFS_WININSTALL_DIR}\Service.exe"
910 File "${AFS_WININSTALL_DIR}\Service.pdb"
912 ;Don't want to whack existing settings... Make users un-install and then re-install if they want that
913 ;nsExec::Exec '$INSTDIR\Common\service.exe u TransarcAFSServer'
914 nsExec::Exec '$INSTDIR\Common\service.exe TransarcAFSServer "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe" "OpenAFS AFS Server"'
915 Delete "$INSTDIR\Common\service.exe"
917 CreateDirectory "$SMPROGRAMS\OpenAFS\Server"
918 CreateShortCut "$SMPROGRAMS\OpenAFS\Server\Server Configuration.lnk" "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
920 ; Make the server config wizard auto-start on bootup
921 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce" "AFS Server Wizard" '"$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe" /wizard"'
923 WriteUninstaller "$INSTDIR\Uninstall.exe"
928 ;----------------------------
929 ; OpenAFS Control Center
930 Section "AFS Control Center" secControl
932 SetShellVarContext all
934 SetOutPath "$INSTDIR\Control Center"
935 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.exe"
936 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.exe"
937 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.exe"
940 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager.pdb"
941 File "${AFS_SERVER_BUILDDIR}\TaAfsAdmSvr.pdb"
942 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager.pdb"
945 ;AFS Server common files
946 Call AFSCommon.Install
948 SetOutPath "$INSTDIR\Common"
950 SetOutPath "$INSTDIR\Common"
953 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
954 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
957 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
958 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
960 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
961 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
966 File "${AFS_WININSTALL_DIR}\msvcr71.dll"
969 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
971 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
976 ;Store install folder
977 WriteRegStr HKCU "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName" $INSTDIR
978 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "VersionString" ${AFS_VERSION}
979 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
980 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
981 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
982 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
983 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
984 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
985 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
987 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug" 1
988 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug" 1
990 ; Delete the DEBUG string
991 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "Debug"
992 DeleteRegValue HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\${AFS_VERSION}" "Debug"
995 ;Write start menu entries
996 CreateDirectory "$SMPROGRAMS\OpenAFS\Control Center"
997 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk" "$INSTDIR\Control Center\TaAfsAccountManager.exe"
998 CreateShortCut "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk" "$INSTDIR\Control Center\TaAfsServerManager.exe"
1000 WriteUninstaller "$INSTDIR\Uninstall.exe"
1005 ;----------------------------
1006 ; OpenAFS Supplemental Documentation
1007 Section "Supplemental Documentation" secDocs
1008 SetShellVarContext all
1010 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
1011 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
1012 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
1013 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
1015 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
1017 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
1018 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
1019 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
1023 SetOutPath "$INSTDIR\Documentation\html"
1024 File "..\..\doc\install\Documentation\en_US\html\*"
1025 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1026 File "..\..\doc\install\Documentation\en_US\html\CmdRef\*"
1027 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1028 File "..\..\doc\install\Documentation\en_US\html\InstallGd\*"
1029 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1030 File "..\..\doc\install\Documentation\en_US\html\ReleaseNotes\*"
1031 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1032 File "..\..\doc\install\Documentation\en_US\html\SysAdminGd\*"
1036 SetOutPath "$INSTDIR\Documentation"
1037 File "..\..\doc\install\Documentation\de_DE\README.TXT"
1038 SetOutPath "$INSTDIR\Documentation\html"
1039 File "..\..\doc\install\Documentation\de_DE\html\*"
1040 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1041 ;File "..\..\doc\install\Documentation\de_DE\html\CmdRef\*"
1042 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1043 File "..\..\doc\install\Documentation\de_DE\html\InstallGd\*"
1044 ;SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1045 ;File "..\..\doc\install\Documentation\de_DE\html\ReleaseNotes\*"
1046 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1047 ;File "..\..\doc\install\Documentation\de_DE\html\SysAdminGd\*"
1051 SetOutPath "$INSTDIR\Documentation"
1052 File "..\..\doc\install\Documentation\es_ES\README.TXT"
1053 SetOutPath "$INSTDIR\Documentation\html"
1054 File "..\..\doc\install\Documentation\es_ES\html\*"
1055 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1056 ;File "..\..\doc\install\Documentation\es_ES\html\CmdRef\*"
1057 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1058 ;File "..\..\doc\install\Documentation\es_ES\html\InstallGd\*"
1059 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1060 ;File "..\..\doc\install\Documentation\es_ES\html\ReleaseNotes\*"
1061 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1062 ;File "..\..\doc\install\Documentation\es_ES\html\SysAdminGd\*"
1066 SetOutPath "$INSTDIR\Documentation"
1067 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
1068 SetOutPath "$INSTDIR\Documentation\html"
1069 File "..\..\doc\install\Documentation\ja_JP\html\*"
1070 SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1071 File "..\..\doc\install\Documentation\ja_JP\html\CmdRef\*"
1072 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1073 File "..\..\doc\install\Documentation\ja_JP\html\InstallGd\*"
1074 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1075 ;File "..\..\doc\install\Documentation\ja_JP\html\ReleaseNotes\*"
1076 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1077 ;File "..\..\doc\install\Documentation\ja_JP\html\SysAdminGd\*"
1081 SetOutPath "$INSTDIR\Documentation"
1082 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
1083 SetOutPath "$INSTDIR\Documentation\html"
1084 File "..\..\doc\install\Documentation\ko_KR\html\*"
1085 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1086 ;File "..\..\doc\install\Documentation\ko_KR\html\CmdRef\*"
1087 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1088 File "..\..\doc\install\Documentation\ko_KR\html\InstallGd\*"
1089 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1090 File "..\..\doc\install\Documentation\ko_KR\html\ReleaseNotes\*"
1091 SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1092 File "..\..\doc\install\Documentation\ko_KR\html\SysAdminGd\*"
1096 SetOutPath "$INSTDIR\Documentation"
1097 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
1098 SetOutPath "$INSTDIR\Documentation\html"
1099 File "..\..\doc\install\Documentation\pt_BR\html\*"
1100 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1101 ;File "..\..\doc\install\Documentation\pt_BR\html\CmdRef\*"
1102 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1103 File "..\..\doc\install\Documentation\pt_BR\html\InstallGd\*"
1104 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1105 File "..\..\doc\install\Documentation\pt_BR\html\ReleaseNotes\*"
1106 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1107 ;File "..\..\doc\install\Documentation\pt_BR\html\SysAdminGd\*"
1111 SetOutPath "$INSTDIR\Documentation"
1112 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
1113 SetOutPath "$INSTDIR\Documentation\html"
1114 File "..\..\doc\install\Documentation\zh_CN\html\*"
1115 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1116 ;File "..\..\doc\install\Documentation\zh_CN\html\CmdRef\*"
1117 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1118 File "..\..\doc\install\Documentation\zh_CN\html\InstallGd\*"
1119 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1120 File "..\..\doc\install\Documentation\zh_CN\html\ReleaseNotes\*"
1121 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1122 ;File "..\..\doc\install\Documentation\zh_CN\html\SysAdminGd\*"
1126 SetOutPath "$INSTDIR\Documentation"
1127 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
1128 SetOutPath "$INSTDIR\Documentation\html"
1129 File "..\..\doc\install\Documentation\zh_TW\html\*"
1130 ;SetOutPath "$INSTDIR\Documentation\html\CmdRef"
1131 ;File "..\..\doc\install\Documentation\zh_TW\html\CmdRef\*"
1132 SetOutPath "$INSTDIR\Documentation\html\InstallGd"
1133 File "..\..\doc\install\Documentation\zh_TW\html\InstallGd\*"
1134 SetOutPath "$INSTDIR\Documentation\html\ReleaseNotes"
1135 File "..\..\doc\install\Documentation\zh_TW\html\ReleaseNotes\*"
1136 ;SetOutPath "$INSTDIR\Documentation\html\SysAdminGd"
1137 ;File "..\..\doc\install\Documentation\zh_TW\html\SysAdminGd\*"
1142 ;Store install folder
1143 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation" "" $INSTDIR
1144 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "VersionString" ${AFS_VERSION}
1145 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MajorVersion" ${AFS_MAJORVERSION}
1146 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "MinorVersion" ${AFS_MINORVERSION}
1147 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion" "PatchLevel" ${AFS_PATCHLEVEL}
1148 WriteRegStr HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "VersionString" ${AFS_VERSION}
1149 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MajorVersion" ${AFS_MAJORVERSION}
1150 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "MinorVersion" ${AFS_MINORVERSION}
1151 WriteRegDWORD HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\${AFS_VERSION}" "PatchLevel" ${AFS_PATCHLEVEL}
1153 ; Write start menu shortcut
1154 SetOutPath "$SMPROGRAMS\OpenAFS"
1155 CreateShortCut "$SMPROGRAMS\OpenAFS\Documentation.lnk" "$INSTDIR\Documentation\html\index.htm"
1158 WriteUninstaller "$INSTDIR\Uninstall.exe"
1159 CreateShortCut "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk" "$INSTDIR\Uninstall.exe"
1162 ;Display the Finish header
1163 ;Insert this macro after the sections if you are not using a finish page
1164 ;!insertmacro MUI_SECTIONS_FINISHHEADER
1166 ;--------------------------------
1167 ;Installer Functions
1171 !insertmacro MUI_LANGDLL_DISPLAY
1173 ; Set the default install options
1178 StrCmp $R0 "true" contInstall
1180 MessageBox MB_OK|MB_ICONSTOP|MB_TOPMOST "You must be an administrator of this machine to install this software."
1184 ; Our logic should be like this.
1185 ; 1) If no AFS components are installed, we do a clean install with default options. (Client/Docs)
1186 ; 2) If existing modules are installed, we keep them selected
1187 ; 3) If it is an upgrade, we set the text accordingly, else we mark it as a re-install
1189 Call IsAnyAFSInstalled
1191 StrCmp $R0 "0" DefaultOptions
1193 Call ShouldClientInstall
1196 StrCmp $R2 "0" NoClient
1197 StrCmp $R2 "1" ReinstallClient
1198 StrCmp $R2 "2" UpgradeClient
1199 StrCmp $R3 "3" DowngradeClient
1201 SectionGetFlags ${secClient} $0
1202 IntOp $0 $0 | ${SF_SELECTED}
1203 SectionSetFlags ${secClient} $0
1204 ;# !insertmacro SelectSection ${secClient}
1207 ;StrCpy $1 ${secClient} ; Gotta remember which section we are at now...
1208 SectionGetFlags ${secClient} $0
1209 IntOp $0 $0 & ${SECTION_OFF}
1210 SectionSetFlags ${secClient} $0
1213 SectionGetFlags ${secClient} $0
1214 IntOp $0 $0 | ${SF_SELECTED}
1215 SectionSetFlags ${secClient} $0
1216 SectionSetText ${secClient} $(UPGRADE_CLIENT)
1219 SectionGetFlags ${secClient} $0
1220 IntOp $0 $0 | ${SF_SELECTED}
1221 SectionSetFlags ${secClient} $0
1222 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1225 SectionGetFlags ${secClient} $0
1226 IntOp $0 $0 | ${SF_SELECTED}
1227 SectionSetFlags ${secClient} $0
1228 SectionSetText ${secClient} $(REINSTALL_CLIENT)
1234 Call ShouldServerInstall
1236 StrCmp $R2 "0" NoServer
1237 StrCmp $R2 "1" ReinstallServer
1238 StrCmp $R2 "2" UpgradeServer
1239 StrCmp $R2 "3" DowngradeServer
1241 SectionGetFlags ${secServer} $0
1242 IntOp $0 $0 | ${SF_SELECTED}
1243 SectionSetFlags ${secServer} $0
1244 ;# !insertmacro UnselectSection ${secServer}
1248 SectionGetFlags ${secServer} $0
1249 IntOp $0 $0 | ${SF_SELECTED}
1250 SectionSetFlags ${secServer} $0
1251 SectionSetText ${secServer} $(UPGRADE_SERVER)
1255 SectionGetFlags ${secServer} $0
1256 IntOp $0 $0 | ${SF_SELECTED}
1257 SectionSetFlags ${secServer} $0
1258 SectionSetText ${secServer} $(REINSTALL_SERVER)
1262 SectionGetFlags ${secServer} $0
1263 IntOp $0 $0 | ${SF_SELECTED}
1264 SectionSetFlags ${secServer} $0
1265 SectionSetText ${secServer} $(REINSTALL_SERVER)
1269 SectionGetFlags ${secServer} $0
1270 IntOp $0 $0 & ${SECTION_OFF}
1271 SectionSetFlags ${secServer} $0
1272 ;# !insertmacro UnselectSection ${secServer}
1276 ; Check control center
1277 Call IsControlInstalled
1279 StrCmp $R2 "0" NoControl
1281 SectionGetFlags ${secControl} $0
1282 IntOp $0 $0 | ${SF_SELECTED}
1283 SectionSetFlags ${secControl} $0
1287 SectionGetFlags ${secControl} $0
1288 IntOp $0 $0 & ${SECTION_OFF}
1289 SectionSetFlags ${secControl} $0
1290 ;# !insertmacro UnselectSection ${secControl}
1293 ; Check Documentation
1294 Call IsDocumentationInstalled
1296 StrCmp $R2 "0" NoDocs
1297 SectionGetFlags ${secDocs} $0
1298 IntOp $0 $0 | ${SF_SELECTED}
1299 SectionSetFlags ${secDocs} $0
1303 SectionGetFlags ${secDocs} $0
1304 IntOp $0 $0 & ${SECTION_OFF}
1305 SectionSetFlags ${secDocs} $0
1310 SectionGetFlags ${secClient} $0
1311 IntOp $0 $0 | ${SF_SELECTED}
1312 SectionSetFlags ${secClient} $0
1314 ; Server NOT selected
1315 SectionGetFlags ${secServer} $0
1316 IntOp $0 $0 & ${SECTION_OFF}
1317 SectionSetFlags ${secServer} $0
1319 ; Control Center NOT selected
1320 SectionGetFlags ${secControl} $0
1321 IntOp $0 $0 & ${SECTION_OFF}
1322 SectionSetFlags ${secControl} $0
1323 ;# !insertmacro UnselectSection ${secControl}
1325 ; Documentation selected
1326 SectionGetFlags ${secDocs} $0
1327 IntOp $0 $0 | ${SF_SELECTED}
1328 SectionSetFlags ${secDocs} $0
1329 ;# !insertmacro UnselectSection ${secDocs}
1337 ; See if we can set a default installation path...
1338 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion" "PathName"
1339 StrCmp $R0 "" TryServer
1348 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion" "PathName"
1349 StrCmp $R0 "" TryControl
1357 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion" "PathName"
1365 File /oname=$0 CellServPage.ini
1367 File /oname=$1 AFSCell.ini
1368 ;File /oname=$1 ConfigURL.ini
1376 ;--------------------------------
1377 ; These are our cleanup functions
1378 Function .onInstFailed
1383 Function .onInstSuccess
1389 ;--------------------------------
1393 !insertmacro MUI_FUNCTIONS_DESCRIPTION_BEGIN
1395 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
1397 !insertmacro MUI_DESCRIPTION_TEXT ${secServer} $(DESC_secServer)
1398 !insertmacro MUI_DESCRIPTION_TEXT ${secClient} $(DESC_secClient)
1399 !insertmacro MUI_DESCRIPTION_TEXT ${secControl} $(DESC_secControl)
1400 !insertmacro MUI_DESCRIPTION_TEXT ${secDocs} $(DESC_secDocs)
1402 !insertmacro MUI_FUNCTIONS_DESCRIPTION_END
1404 !insertmacro MUI_FUNCTION_DESCRIPTION_END
1407 ;--------------------------------
1408 ;Uninstaller Section
1411 ; Make sure the user REALLY wants to do this, unless they did a silent uninstall, in which case...let them!
1413 IfSilent StartRemove ; New in v2.0b4
1415 MessageBox MB_YESNO "Are you sure you want to remove OpenAFS from this machine?" IDYES StartRemove
1420 SetShellVarContext all
1421 ; Stop the running processes
1423 File /oname=$R0 "${AFS_WININSTALL_DIR}\Killer.exe"
1424 nsExec::Exec '$R0 afscreds.exe'
1426 nsExec::Exec '$R0 krbcc32s.exe'
1429 ; Delete the AFS service
1431 File /oname=$R0 "${AFS_WININSTALL_DIR}\Service.exe"
1432 nsExec::Exec "net stop TransarcAFSDaemon"
1433 nsExec::Exec "net stop TransarcAFSServer"
1434 nsExec::Exec '$R0 u TransarcAFSDaemon'
1435 ; After we stop the service, but before we delete it, we have to remove the volume data
1436 ; This is because the storage locations are in the registry under the service key.
1437 ; Call un.RemoveAFSVolumes
1438 nsExec::Exec '$R0 u TransarcAFSServer'
1441 Push "$INSTDIR\Client\Program"
1442 Call un.RemoveFromPath
1443 Push "$INSTDIR\Common"
1444 Call un.RemoveFromPath
1446 Push "$INSTDIR\kfw\bin"
1447 Call un.RemoveFromPath
1450 ; Delete documentation
1451 Delete "$INSTDIR\Documentation\README.TXT"
1452 Delete "$INSTDIR\Documentation\html\*"
1453 Delete "$INSTDIR\Documentation\html\CmdRef\*"
1454 Delete "$INSTDIR\Documentation\html\InstallGd\*"
1455 Delete "$INSTDIR\Documentation\html\ReleaseNotes\*"
1456 Delete "$INSTDIR\Documentation\html\SysAdminGd\*"
1458 Delete /REBOOTOK "$INSTDIR\Common\afs_config.exe"
1459 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.dll"
1460 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.dll"
1461 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.dll"
1462 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.dll"
1463 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.dll"
1464 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.dll"
1465 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.dll"
1466 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1467 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.dll"
1468 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.dll"
1469 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.dll"
1470 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.dll"
1471 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.dll"
1472 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.dll"
1475 Delete /REBOOTOK "$INSTDIR\Common\afs_config.pdb"
1476 Delete /REBOOTOK "$INSTDIR\Common\afs_shl_ext.pdb"
1477 Delete /REBOOTOK "$INSTDIR\Common\afsadminutil.pdb"
1478 Delete /REBOOTOK "$INSTDIR\Common\lib\afsauthent.pdb"
1479 Delete /REBOOTOK "$INSTDIR\Common\lib\afspthread.pdb"
1480 Delete /REBOOTOK "$INSTDIR\Common\lib\afsrpc.pdb"
1481 Delete /REBOOTOK "$INSTDIR\Common\afsclientadmin.pdb"
1482 Delete /REBOOTOK "$INSTDIR\Common\afsprocmgmt.pdb"
1483 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1484 Delete /REBOOTOK "$INSTDIR\Common\TaAfsAppLib.pdb"
1485 Delete /REBOOTOK "$INSTDIR\Common\afsvosadmin.pdb"
1486 Delete /REBOOTOK "$INSTDIR\Common\afsbosadmin.pdb"
1487 Delete /REBOOTOK "$INSTDIR\Common\afscfgadmin.pdb"
1488 Delete /REBOOTOK "$INSTDIR\Common\afskasadmin.pdb"
1489 Delete /REBOOTOK "$INSTDIR\Common\afsptsadmin.pdb"
1492 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
1493 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
1495 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
1496 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
1500 Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
1502 Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
1509 StrCmp $R1 "/S" SkipAsk
1513 ; IfFileExists "$WINDIR\afsdcell.ini" CellExists SkipDelAsk
1515 MessageBox MB_YESNO "Would you like to keep your configuration files?" IDYES SkipDel
1517 Delete "$WINDIR\afsdcell.ini"
1519 Delete "$WINDIR\afsdsbmt.ini"
1520 ; Only remove krb5.ini if KfW was installed
1522 Delete "$WINDIR\krb5.ini"
1524 Delete "$WINDIR\afsdns.ini"
1525 Delete "$WINDIR\afs_freelance.ini"
1528 Delete "$WINDIR\afsd_init.log"
1529 Delete "$INSTDIR\Uninstall.exe"
1532 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.exe"
1533 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.exe"
1534 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.exe"
1535 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.exe"
1536 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.exe"
1537 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.exe"
1538 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.exe"
1539 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.exe"
1540 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.exe"
1541 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.exe"
1542 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\salvager.exe"
1543 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.dll"
1544 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upclient.exe"
1545 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\upserver.exe"
1546 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\vlserver.exe"
1547 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volinfo.exe"
1548 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\volserver.exe"
1551 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afskill.pdb"
1552 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\afssvrcfg.pdb"
1553 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosctlsvc.pdb"
1554 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\bosserver.pdb"
1555 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\buserver.pdb"
1556 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\butc.pdb"
1557 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fileserver.pdb"
1558 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\fms.pdb"
1559 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\kaserver.pdb"
1560 Delete /REBOOTOK "$INSTDIR\Server\usr\afs\bin\ptserver.pdb"
1561 Delete "$INSTDIR\Server\usr\afs\bin\salvager.pdb"
1562 Delete "$INSTDIR\Server\usr\afs\bin\ServerUninst.pdb"
1563 Delete "$INSTDIR\Server\usr\afs\bin\upclient.pdb"
1564 Delete "$INSTDIR\Server\usr\afs\bin\upserver.pdb"
1565 Delete "$INSTDIR\Server\usr\afs\bin\vlserver.pdb"
1566 Delete "$INSTDIR\Server\usr\afs\bin\volinfo.pdb"
1567 Delete "$INSTDIR\Server\usr\afs\bin\volserver.pdb"
1570 RMDir /r "$INSTDIR\Server\usr\afs\bin"
1571 RmDir /r "$INSTDIR\Server\usr\afs\etc\logs"
1572 RmDir /r "$INSTDIR\Server\usr\afs\etc"
1573 RmDir /r "$INSTDIR\Server\usr\afs\local"
1574 RMDIR /r "$INSTDIR\Server\usr\afs\logs"
1576 Delete /REBOOTOK "$SYSDIR\afsserver.cpl"
1577 Delete /REBOOTOK "$SYSDIR\afs_cpa.cpl"
1580 Delete /REBOOTOK "$SYSDIR\afsserver.pdb"
1581 Delete /REBOOTOK "$SYSDIR\afs_cpa.pdb"
1584 RMDir /r "$INSTDIR\Documentation\html\CmdRef"
1585 RMDir /r "$INSTDIR\Documentation\html\InstallGd"
1586 RMDir /r "$INSTDIR\Documentation\html\ReleaseNotes"
1587 RMDir /r "$INSTDIR\Documentation\html\SysAdminGd"
1588 RMDIr /r "$INSTDIR\Documentation\html"
1590 RMDir "$INSTDIR\Documentation"
1591 ; Delete DOC short cut
1592 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.exe"
1595 Delete /REBOOTOK "$INSTDIR\Client\Program\afscreds.pdb"
1598 Delete /REBOOTOK "$INSTDIR\Client\Program\*"
1599 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\*"
1600 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\afs\*"
1601 Delete /REBOOTOK "$INSTDIR\Client\Program\Include\rx\*"
1602 Delete /REBOOTOK "$INSTDIR\Client\Program\Sample\*"
1603 RMDir "$INSTDIR\Client\Program\Sample"
1604 RMDir "$INSTDIR\Client\Program\Include\afs"
1605 RMDir "$INSTDIR\Client\Program\Include\rx"
1606 RMDir "$INSTDIR\Client\Program\Include"
1607 RMDir "$INSTDIR\Client\Program"
1608 RMDir "$INSTDIR\Client"
1612 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.dll"
1613 Delete /REBOOTOK "$INSTDIR\Common\msvcr71d.pdb"
1615 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.dll"
1616 Delete /REBOOTOK "$INSTDIR\Common\msvcrtd.pdb"
1620 Delete /REBOOTOK "$INSTDIR\Common\msvcr71.dll"
1622 Delete /REBOOTOK "$INSTDIR\Common\msvcrt.dll"
1625 Delete /REBOOTOK "$INSTDIR\Common\*"
1626 RMDir "$INSTDIR\Common"
1630 Delete /REBOOTOK "$INSTDIR\kfw\bin\*"
1631 RMDIR /r "$INSTDIR\kfw\bin"
1632 Delete /REBOOTOK "$INSTDIR\kfw\doc\*"
1633 RMDIR /r "$INSTDIR\kfw\doc"
1634 RMDIR /r "$INSTDIR\kfw"
1637 Delete "$SMPROGRAMS\OpenAFS\Documentation.lnk"
1639 ; Remove control center
1640 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.exe"
1641 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.exe"
1642 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.exe"
1643 Delete /REBOOTOK "$INSTDIR\Control Center\CCUninst.dll"
1645 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAccountManager.pdb"
1646 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsAdmSvr.pdb"
1647 Delete /REBOOTOK "$INSTDIR\Control Center\TaAfsServerManager.pdb"
1649 RMDir "$INSTDIR\Control Center"
1651 Delete "$SMPROGRAMS\OpenAFS\Uninstall OpenAFS.lnk"
1652 Delete "$SMPROGRAMS\OpenAFS\Client\Authentication.lnk"
1653 Delete "$SMPROGRAMS\OpenAFS\Control Center\Account Manager.lnk"
1654 Delete "$SMPROGRAMS\OpenAFS\Control Center\Server Manager.lnk"
1655 RMDIR "$SMPROGRAMS\OpenAFS\Control Center"
1656 RMDir /r "$SMPROGRAMS\OpenAFS\Client"
1657 RMDir /r "$SMPROGRAMS\OpenAFS"
1658 Delete "$SMSTARTUP\AFS Credentials.lnk"
1660 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon" "CachePath"
1662 Delete "$R0\AFSCache"
1663 Delete "C:\AFSCache"
1665 DeleteRegKey HKCR "*\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1666 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}\InprocServer32"
1667 DeleteRegKey HKCR "CLSID\{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1668 DeleteRegKey HKCR "FOLDER\shellex\ContextMenuHandlers\AFS Client Shell Extension"
1669 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" "{DC515C27-6CAC-11D1-BAE7-00C04FD140D2}"
1671 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client\CurrentVersion"
1672 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Client"
1673 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation\CurrentVersion"
1674 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Supplemental Documentation"
1675 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center\CurrentVersion"
1676 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Control Center"
1677 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server\CurrentVersion"
1678 DeleteRegKey HKLM "${AFS_REGKEY_ROOT}\AFS Server"
1679 DeleteRegKey /ifempty HKLM "${AFS_REGKEY_ROOT}"
1680 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS"
1681 DeleteRegValue HKLM "SYSTEM\CurrentControlSet\Services\NetBT\Parameters" "SmbDeviceEnabled"
1686 ;Display the Finish header
1687 !insertmacro MUI_UNFINISHHEADER
1692 ;--------------------------------
1693 ;Uninstaller Functions
1697 ;Get language from registry
1698 ReadRegStr $LANGUAGE HKCU "Software\OpenAFS\AFS" "Installer Language"
1702 Function un.onUninstSuccess
1704 MessageBox MB_OK "Please reboot your machine to complete uninstallation of the software"
1708 ;------------------------------
1709 ; Get the CellServDB file from the Internet
1711 Function afs.GetCellServDB
1713 ;Check if we should download CellServDB
1714 ReadINIStr $R0 $0 "Field 4" "State"
1715 StrCmp $R0 "1" DoDownload
1717 ;Do nothing if we're keeping the existing file
1718 ReadINIStr $R0 $0 "Field 2" "State"
1721 ReadINIStr $R0 $0 "Field 3" "State"
1722 StrCmp $R0 "1" UsePackaged
1724 ; If none of these, grab file from other location
1728 ReadINIStr $R0 $0 "Field 5" "State"
1729 NSISdl::download $R0 "$WINDIR\afsdcell.ini"
1730 Pop $R0 ;Get the return value
1731 StrCmp $R0 "success" +2
1732 MessageBox MB_OK|MB_ICONSTOP "Download failed: $R0"
1736 SetOutPath "$WINDIR"
1741 ReadINIStr $R0 $0 "Field 7" "State"
1742 StrCmp $R0 "1" +1 done
1743 CopyFiles $R0 "$WINDIR\afsdcell.ini"
1751 ;-------------------------------
1752 ;Do the page to get the CellServDB
1754 Function AFSPageGetCellServDB
1755 ; Skip this page if we are not installing the client
1756 SectionGetFlags ${secClient} $R0
1757 IntOp $R0 $R0 & ${SF_SELECTED}
1760 ; Set the install options here
1763 WriteINIStr $0 "Field 2" "Flags" "DISABLED"
1764 WriteINIStr $0 "Field 3" "State" "1"
1765 WriteINISTR $0 "Field 4" "State" "0"
1766 WriteINIStr $0 "Field 6" "State" "0"
1768 ; If there is an existing afsdcell.ini file, allow the user to choose it and make it default
1769 IfFileExists "$WINDIR\afsdcell.ini" +1 notpresent
1770 WriteINIStr $0 "Field 2" "Flags" "ENABLED"
1771 WriteINIStr $0 "Field 2" "State" "1"
1772 WriteINIStr $0 "Field 3" "State" "0"
1776 !insertmacro MUI_HEADER_TEXT "CellServDB Configuration" "Please choose a method for installing the CellServDB file:"
1777 InstallOptions::dialog $0
1779 StrCmp $R1 "cancel" exit
1780 StrCmp $R1 "back" done
1781 StrCmp $R1 "success" done
1785 ; Check that if a file is set, a valid filename is entered...
1786 ReadINIStr $R0 $0 "Field 6" "State"
1787 StrCmp $R0 "1" CheckFileName
1789 ;Check if a URL is specified, one *IS* specified
1790 ReadINIStr $R0 $0 "Field 4" "State"
1791 StrCmp $R0 "1" CheckURL Skip
1794 ReadINIStr $R0 $0 "Field 5" "State"
1795 StrCmp $R0 "" +1 Skip
1796 MessageBox MB_OK|MB_ICONSTOP $(URLError)
1797 WriteINIStr $0 "Field 4" "State" "0"
1801 ReadINIStr $R0 $0 "Field 7" "State"
1802 IfFileExists $R0 Skip
1804 MessageBox MB_OK|MB_ICONSTOP $(CellError)
1805 WriteINIStr $0 "Field 6" "State" "0"
1813 Function AFSPageGetCellName
1817 StrCmp $R1 "/S" exit
1821 ; Skip this page if we are not installing the client
1822 SectionGetFlags ${secClient} $R0
1823 IntOp $R0 $R0 & ${SF_SELECTED}
1827 ; If this is a server install, we do NOT want to recommend the Freelance client
1828 ; And we do not need to ask for the cell name.
1829 SectionGetFlags ${secServer} $R1
1830 IntOp $R1 $R1 & ${SF_SELECTED}
1831 StrCmp $R1 "1" +1 NotServer
1832 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Not Recommended for servers)"
1833 WriteINIStr $1 "Field 5" "State" "0"
1834 WriteINIStr $1 "Field 1" "Flags" "DISABLED"
1835 WriteINIStr $1 "Field 2" "Flags" "DISABLED"
1838 WriteINIStr $1 "Field 6" "Text" "Enable AFS Freelance client (Recommended)"
1839 WriteINIStr $1 "Field 5" "State" "1"
1840 WriteINIStr $1 "Field 1" "Flags" ""
1841 WriteINIStr $1 "Field 2" "Flags" ""
1843 ; Get the current cell name, if any
1844 ReadRegStr $R1 HKLM "SYSTEM\CurrentControlSet\Services\TransarcAFSDaemon\Parameters" "Cell"
1846 WriteINIStr $1 "Field 2" "State" $R1
1847 !insertmacro MUI_HEADER_TEXT "Client Cell Name Configuration" "Please enter the name for your default cell:"
1848 InstallOptions::dialog $1
1850 StrCmp $R1 "cancel" exit
1851 StrCmp $R1 "back" done
1852 StrCmp $R1 "success" done
1855 ReadINIStr $R0 $1 "Field 2" "State"
1856 StrCmp $R0 "" +1 good
1858 MessageBox MB_OK|MB_ICONSTOP $(CellNameError)
1864 ; Common install routines for each module
1865 Function AFSCommon.Install
1867 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayName" "OpenAFS for Windows"
1868 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "UninstallString" "$INSTDIR\uninstall.exe"
1870 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION}"
1872 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "DisplayVersion" "${AFS_VERSION} Checked/Debug"
1874 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\OpenAFS" "URLInfoAbout" "http://www.openafs.org/"
1878 ; This code is all needed in v2.0b3 to handle the /S switch...
1880 ; Check if install should be silent
1888 StrCmp $0 "/S" silent
1889 StrCmp $0 "/S " silent
1897 ; Check if uninstall should be silent
1898 Function un.IsSilent
1905 StrCmp $0 "/S" silent
1906 StrCmp $0 "/S " silent
1917 Exch $R1 ; st=haystack,old$R1, $R1=needle
1918 Exch ; st=old$R1,haystack
1919 Exch $R2 ; st=old$R1,old$R2, $R2=haystack
1931 StrCpy $R5 $R2 $R3 $R4
1937 StrCpy $R1 $R2 "" $R4
1945 ; End of specific v2.0b3 code...
1948 ;-------------------
1949 ; Get the currently installed version and place it on the stack
1951 Function GetInstalledVersion
1956 ReadRegStr $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "VersionString"
1957 StrCmp $R0 "" NotTransarc done
1961 ReadRegStr $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "VersionString"
1970 ; Functions to get each component of the version number
1971 Function GetInstalledVersionMajor
1976 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MajorVersion"
1977 StrCmp $R0 "" NotTransarc done
1981 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MajorVersion"
1990 Function GetInstalledVersionMinor
1995 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "MinorVersion"
1996 StrCmp $R0 "" NotTransarc done
2000 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "MinorVersion"
2009 Function GetInstalledVersionPatch
2014 ReadRegDWORD $R0 HKLM "Software\TransarcCorporation\$R2\CurrentVersion" "PatchLevel"
2015 StrCmp $R0 "" NotTransarc done
2019 ReadRegDWORD $R0 HKLM "${AFS_REGKEY_ROOT}\$R2\CurrentVersion" "PatchLevel"
2030 ;-------------------------------
2031 ; Check if the client should be checked for default install
2032 Function ShouldClientInstall
2034 StrCpy $R2 "AFS Client"
2035 Call GetInstalledVersion
2038 StrCmp $R0 "" NotInstalled
2039 ; Now we see if it's an older or newer version
2041 Call GetInstalledVersionMajor
2043 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2045 Call GetInstalledVersionMinor
2047 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2049 Call GetInstalledVersionPatch
2051 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2075 ;-------------------------------
2076 ; Check how the server options should be set
2077 Function ShouldServerInstall
2079 StrCpy $R2 "AFS Server"
2080 Call GetInstalledVersion
2083 StrCmp $R0 "" NotInstalled
2084 ; Now we see if it's an older or newer version
2086 Call GetInstalledVersionMajor
2088 IntCmpU $R0 ${AFS_MAJORVERSION} +1 Upgrade Downgrade
2090 Call GetInstalledVersionMinor
2092 IntCmpU $R0 ${AFS_MINORVERSION} +1 Upgrade Downgrade
2094 Call GetInstalledVersionPatch
2096 IntCmpU $R0 ${AFS_PATCHLEVEL} Reinstall Upgrade Downgrade
2121 ; See if AFS Server is installed
2122 ; Returns: "1" if it is, 0 if it is not (on the stack)
2123 Function IsServerInstalled
2125 StrCpy $R2 "AFS Server"
2126 Call GetInstalledVersion
2129 StrCmp $R0 "" NotInstalled
2142 ; See if AFS Client is installed
2143 ; Returns: "1" if it is, 0 if it is not (on the stack)
2144 Function IsClientInstalled
2146 StrCpy $R2 "AFS Client"
2147 Call GetInstalledVersion
2150 StrCmp $R0 "" NotInstalled
2164 ; See if AFS Documentation is installed
2165 ; Returns: "1" if it is, 0 if it is not (on the stack)
2166 Function IsDocumentationInstalled
2168 StrCpy $R2 "AFS Supplemental Documentation"
2169 Call GetInstalledVersion
2172 StrCmp $R0 "" NotInstalled
2185 ; See if Control Center is installed
2186 ; Returns: "1" if it is, 0 if it is not (on the stack)
2187 Function IsControlInstalled
2189 StrCpy $R2 "AFS Control Center"
2190 Call GetInstalledVersion
2193 StrCmp $R0 "" NotInstalled
2208 ; output, top of stack (replaces, with e.g. whatever)
2209 ; modifies no other variables.
2211 Function GetParameters
2215 StrCpy $R0 $CMDLINE 1
2219 StrCpy $R1 ' ' ; we're scanning for a space instead of a quote
2221 StrCpy $R0 $CMDLINE 1 $R2
2222 StrCmp $R0 $R1 loop2
2228 StrCpy $R0 $CMDLINE 1 $R2
2229 StrCmp $R0 " " loop2
2230 StrCpy $R0 $CMDLINE "" $R2
2237 ;Check to see if any AFS component is installed
2238 ;Returns: Value on stack: "1" if it is, "0" if it is not
2239 Function IsAnyAFSInstalled
2244 Call IsClientInstalled
2246 Call IsServerInstalled
2248 Call IsControlInstalled
2250 Call IsDocumentationInstalled
2252 ; Now we must see if ANY of the $Rn values are 1
2253 StrCmp $R0 "1" SomethingInstalled
2254 StrCmp $R1 "1" SomethingInstalled
2255 StrCmp $R2 "1" SomethingInstalled
2256 StrCmp $R3 "1" SomethingInstalled
2270 ;Install English Language Files
2271 Function AFSLangFiles
2273 SetOutPath "$INSTDIR\Common"
2274 File "${AFS_CLIENT_BUILDDIR}\afs_config.exe"
2275 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.dll"
2276 File "${AFS_SERVER_BUILDDIR}\afsadminutil.dll"
2277 File "${AFS_DESTDIR}\lib\afsauthent.dll"
2278 File "${AFS_DESTDIR}\lib\afspthread.dll"
2279 File "${AFS_DESTDIR}\lib\afsrpc.dll"
2280 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.dll"
2281 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.dll"
2282 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2283 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.dll"
2284 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.dll"
2285 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.dll"
2286 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.dll"
2287 File "${AFS_SERVER_BUILDDIR}\afskasadmin.dll"
2288 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.dll"
2291 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
2292 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
2294 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
2295 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
2299 File "${AFS_WININSTALL_DIR}\msvcr71.dll"
2301 File "${AFS_WININSTALL_DIR}\msvcrt.dll"
2306 File "${AFS_CLIENT_BUILDDIR}\afs_config.pdb"
2307 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext.pdb"
2308 File "${AFS_SERVER_BUILDDIR}\afsadminutil.pdb"
2309 File "${AFS_DESTDIR}\lib\afsauthent.pdb"
2310 File "${AFS_DESTDIR}\lib\afspthread.pdb"
2311 File "${AFS_DESTDIR}\lib\afsrpc.pdb"
2312 File "${AFS_SERVER_BUILDDIR}\afsclientadmin.pdb"
2313 File "${AFS_SERVER_BUILDDIR}\afsprocmgmt.pdb"
2314 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2315 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib.pdb"
2316 File "${AFS_SERVER_BUILDDIR}\afsvosadmin.pdb"
2317 File "${AFS_SERVER_BUILDDIR}\afsbosadmin.pdb"
2318 File "${AFS_SERVER_BUILDDIR}\afscfgadmin.pdb"
2319 File "${AFS_SERVER_BUILDDIR}\afskasadmin.pdb"
2320 File "${AFS_SERVER_BUILDDIR}\afsptsadmin.pdb"
2323 StrCmp $LANGUAGE ${LANG_ENGLISH} DoEnglish
2324 StrCmp $LANGUAGE ${LANG_GERMAN} DoGerman
2325 StrCmp $LANGUAGE ${LANG_SPANISH} DoSpanish
2326 StrCmp $LANGUAGE ${LANG_JAPANESE} DoJapanese
2328 StrCmp $LANGUAGE ${LANG_KOREAN} DoKorean
2330 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} DoPortugueseBR
2331 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} DoSimpChinese
2332 StrCmp $LANGUAGE ${LANG_TRADCHINESE} DoTradChinese
2336 SetOutPath "$INSTDIR\Documentation"
2337 File "..\..\doc\install\Documentation\en_US\README.TXT"
2339 SetOutPath "$INSTDIR\Common"
2340 File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.dll"
2341 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.dll"
2342 File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.dll"
2343 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.dll"
2344 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.dll"
2345 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1033.dll"
2346 File "${AFS_SERVER_BUILDDIR}\afsserver_1033.dll"
2347 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.dll"
2348 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.dll"
2349 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.dll"
2350 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.dll"
2351 File "..\..\doc\help\en_US\afs-cc.CNT"
2352 File "..\..\doc\help\en_US\afs-cc.hlp"
2353 File "..\..\doc\help\en_US\afs-light.CNT"
2354 File "..\..\doc\help\en_US\afs-light.hlp"
2355 File "..\..\doc\help\en_US\afs-nt.CNT"
2356 File "..\..\doc\help\en_US\afs-nt.HLP"
2357 File "..\..\doc\help\en_US\taafscfg.CNT"
2358 File "..\..\doc\help\en_US\taafscfg.hlp"
2359 File "..\..\doc\help\en_US\taafssvrmgr.CNT"
2360 File "..\..\doc\help\en_US\taafssvrmgr.hlp"
2361 File "..\..\doc\help\en_US\taafsusrmgr.CNT"
2362 File "..\..\doc\help\en_US\taafsusrmgr.hlp"
2367 SetOutPath "$INSTDIR\Documentation"
2368 File "..\..\doc\install\Documentation\de_DE\README.TXT"
2370 SetOutPath "$INSTDIR\Common"
2371 File "${AFS_CLIENT_BUILDDIR}\afs_config_1032.dll"
2372 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1032.dll"
2373 File "${AFS_CLIENT_BUILDDIR}\afscreds_1032.dll"
2374 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1032.dll"
2375 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1032.dll"
2376 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1032.dll"
2377 File "${AFS_SERVER_BUILDDIR}\afsserver_1032.dll"
2378 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1032.dll"
2379 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1032.dll"
2380 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1032.dll"
2381 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1032.dll"
2382 File "..\..\doc\help\de_DE\afs-cc.CNT"
2383 File "..\..\doc\help\de_DE\afs-cc.hlp"
2384 File "..\..\doc\help\de_DE\afs-light.CNT"
2385 File "..\..\doc\help\de_DE\afs-light.hlp"
2386 File "..\..\doc\help\de_DE\afs-nt.CNT"
2387 File "..\..\doc\help\de_DE\afs-nt.HLP"
2388 File "..\..\doc\help\de_DE\taafscfg.CNT"
2389 File "..\..\doc\help\de_DE\taafscfg.hlp"
2390 File "..\..\doc\help\de_DE\taafssvrmgr.CNT"
2391 File "..\..\doc\help\de_DE\taafssvrmgr.hlp"
2392 File "..\..\doc\help\de_DE\taafsusrmgr.CNT"
2393 File "..\..\doc\help\de_DE\taafsusrmgr.hlp"
2396 ;File "${AFS_CLIENT_BUILDDIR}\afs_config_1033.pdb"
2397 ;File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1033.pdb"
2398 ;File "${AFS_CLIENT_BUILDDIR}\afscreds_1033.pdb"
2399 ;File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1033.pdb"
2400 ;File "${AFS_SERVER_BUILDDIR}\afseventmsg_1033.pdb"
2401 ;File "${AFS_SERVER_BUILDDIR}\afsserver_1033.pdb"
2402 ;File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1033.pdb"
2403 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1033.pdb"
2404 ;File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1033.pdb"
2405 ;File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1033.pdb"
2407 File "${AFS_WININSTALL_DIR}\msvcr71d.dll"
2408 File "${AFS_WININSTALL_DIR}\msvcr71d.pdb"
2410 File "${AFS_WININSTALL_DIR}\msvcrtd.dll"
2411 File "${AFS_WININSTALL_DIR}\msvcrtd.pdb"
2418 SetOutPath "$INSTDIR\Documentation"
2419 File "..\..\doc\install\Documentation\es_ES\README.TXT"
2421 SetOutPath "$INSTDIR\Common"
2422 File "${AFS_CLIENT_BUILDDIR}\afs_config_1034.dll"
2423 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1034.dll"
2424 File "${AFS_CLIENT_BUILDDIR}\afscreds_1034.dll"
2425 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1034.dll"
2426 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1034.dll"
2427 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1034.dll"
2428 File "${AFS_SERVER_BUILDDIR}\afsserver_1034.dll"
2429 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1034.dll"
2430 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1034.dll"
2431 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1034.dll"
2432 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1034.dll"
2433 File "..\..\doc\help\es_ES\afs-cc.CNT"
2434 File "..\..\doc\help\es_ES\afs-cc.hlp"
2435 File "..\..\doc\help\es_ES\afs-light.CNT"
2436 File "..\..\doc\help\es_ES\afs-light.hlp"
2437 File "..\..\doc\help\es_ES\afs-nt.CNT"
2438 File "..\..\doc\help\es_ES\afs-nt.HLP"
2439 File "..\..\doc\help\es_ES\taafscfg.CNT"
2440 File "..\..\doc\help\es_ES\taafscfg.hlp"
2441 File "..\..\doc\help\es_ES\taafssvrmgr.CNT"
2442 File "..\..\doc\help\es_ES\taafssvrmgr.hlp"
2443 File "..\..\doc\help\es_ES\taafsusrmgr.CNT"
2444 File "..\..\doc\help\es_ES\taafsusrmgr.hlp"
2449 SetOutPath "$INSTDIR\Documentation"
2450 File "..\..\doc\install\Documentation\ja_JP\README.TXT"
2452 SetOutPath "$INSTDIR\Common"
2453 File "${AFS_CLIENT_BUILDDIR}\afs_config_1041.dll"
2454 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1041.dll"
2455 File "${AFS_CLIENT_BUILDDIR}\afscreds_1041.dll"
2456 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1041.dll"
2457 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1041.dll"
2458 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1041.dll"
2459 File "${AFS_SERVER_BUILDDIR}\afsserver_1041.dll"
2460 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1041.dll"
2461 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1041.dll"
2462 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1041.dll"
2463 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1041.dll"
2464 File "..\..\doc\help\ja_JP\afs-cc.CNT"
2465 File "..\..\doc\help\ja_JP\afs-cc.hlp"
2466 File "..\..\doc\help\ja_JP\afs-light.CNT"
2467 File "..\..\doc\help\ja_JP\afs-light.hlp"
2468 File "..\..\doc\help\ja_JP\afs-nt.CNT"
2469 File "..\..\doc\help\ja_JP\afs-nt.HLP"
2470 File "..\..\doc\help\ja_JP\taafscfg.CNT"
2471 File "..\..\doc\help\ja_JP\taafscfg.hlp"
2472 File "..\..\doc\help\ja_JP\taafssvrmgr.CNT"
2473 File "..\..\doc\help\ja_JP\taafssvrmgr.hlp"
2474 File "..\..\doc\help\ja_JP\taafsusrmgr.CNT"
2475 File "..\..\doc\help\ja_JP\taafsusrmgr.hlp"
2480 SetOutPath "$INSTDIR\Documentation"
2481 File "..\..\doc\install\Documentation\ko_KR\README.TXT"
2483 SetOutPath "$INSTDIR\Common"
2484 File "${AFS_CLIENT_BUILDDIR}\afs_config_1042.dll"
2485 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1042.dll"
2486 File "${AFS_CLIENT_BUILDDIR}\afscreds_1042.dll"
2487 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1042.dll"
2488 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1042.dll"
2489 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1042.dll"
2490 File "${AFS_SERVER_BUILDDIR}\afsserver_1042.dll"
2491 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1042.dll"
2492 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1042.dll"
2493 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1042.dll"
2494 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1042.dll"
2495 File "..\..\doc\help\ko_KR\afs-cc.CNT"
2496 File "..\..\doc\help\ko_KR\afs-cc.hlp"
2497 File "..\..\doc\help\ko_KR\afs-light.CNT"
2498 File "..\..\doc\help\ko_KR\afs-light.hlp"
2499 File "..\..\doc\help\ko_KR\afs-nt.CNT"
2500 File "..\..\doc\help\ko_KR\afs-nt.HLP"
2501 File "..\..\doc\help\ko_KR\taafscfg.CNT"
2502 File "..\..\doc\help\ko_KR\taafscfg.hlp"
2503 File "..\..\doc\help\ko_KR\taafssvrmgr.CNT"
2504 File "..\..\doc\help\ko_KR\taafssvrmgr.hlp"
2505 File "..\..\doc\help\ko_KR\taafsusrmgr.CNT"
2506 File "..\..\doc\help\ko_KR\taafsusrmgr.hlp"
2512 SetOutPath "$INSTDIR\Documentation"
2513 File "..\..\doc\install\Documentation\pt_BR\README.TXT"
2515 SetOutPath "$INSTDIR\Common"
2516 File "${AFS_CLIENT_BUILDDIR}\afs_config_1046.dll"
2517 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1046.dll"
2518 File "${AFS_CLIENT_BUILDDIR}\afscreds_1046.dll"
2519 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1046.dll"
2520 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1046.dll"
2521 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1046.dll"
2522 File "${AFS_SERVER_BUILDDIR}\afsserver_1046.dll"
2523 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1046.dll"
2524 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1046.dll"
2525 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1046.dll"
2526 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1046.dll"
2527 File "..\..\doc\help\pt_BR\afs-cc.CNT"
2528 File "..\..\doc\help\pt_BR\afs-cc.hlp"
2529 File "..\..\doc\help\pt_BR\afs-light.CNT"
2530 File "..\..\doc\help\pt_BR\afs-light.hlp"
2531 File "..\..\doc\help\pt_BR\afs-nt.CNT"
2532 File "..\..\doc\help\pt_BR\afs-nt.HLP"
2533 File "..\..\doc\help\pt_BR\taafscfg.CNT"
2534 File "..\..\doc\help\pt_BR\taafscfg.hlp"
2535 File "..\..\doc\help\pt_BR\taafssvrmgr.CNT"
2536 File "..\..\doc\help\pt_BR\taafssvrmgr.hlp"
2537 File "..\..\doc\help\pt_BR\taafsusrmgr.CNT"
2538 File "..\..\doc\help\pt_BR\taafsusrmgr.hlp"
2543 SetOutPath "$INSTDIR\Documentation"
2544 File "..\..\doc\install\Documentation\zh_CN\README.TXT"
2546 SetOutPath "$INSTDIR\Common"
2547 File "${AFS_CLIENT_BUILDDIR}\afs_config_2052.dll"
2548 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_2052.dll"
2549 File "${AFS_CLIENT_BUILDDIR}\afscreds_2052.dll"
2550 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_2052.dll"
2551 File "${AFS_SERVER_BUILDDIR}\afseventmsg_2052.dll"
2552 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_2052.dll"
2553 File "${AFS_SERVER_BUILDDIR}\afsserver_2052.dll"
2554 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_2052.dll"
2555 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_2052.dll"
2556 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_2052.dll"
2557 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_2052.dll"
2558 File "..\..\doc\help\zh_CN\afs-cc.CNT"
2559 File "..\..\doc\help\zh_CN\afs-cc.hlp"
2560 File "..\..\doc\help\zh_CN\afs-light.CNT"
2561 File "..\..\doc\help\zh_CN\afs-light.hlp"
2562 File "..\..\doc\help\zh_CN\afs-nt.CNT"
2563 File "..\..\doc\help\zh_CN\afs-nt.HLP"
2564 File "..\..\doc\help\zh_CN\taafscfg.CNT"
2565 File "..\..\doc\help\zh_CN\taafscfg.hlp"
2566 File "..\..\doc\help\zh_CN\taafssvrmgr.CNT"
2567 File "..\..\doc\help\zh_CN\taafssvrmgr.hlp"
2568 File "..\..\doc\help\zh_CN\taafsusrmgr.CNT"
2569 File "..\..\doc\help\zh_CN\taafsusrmgr.hlp"
2574 SetOutPath "$INSTDIR\Documentation"
2575 File "..\..\doc\install\Documentation\zh_TW\README.TXT"
2577 SetOutPath "$INSTDIR\Common"
2578 File "${AFS_CLIENT_BUILDDIR}\afs_config_1028.dll"
2579 File "${AFS_CLIENT_BUILDDIR}\afs_shl_ext_1028.dll"
2580 File "${AFS_CLIENT_BUILDDIR}\afscreds_1028.dll"
2581 File "${AFS_CLIENT_BUILDDIR}\afs_cpa_1028.dll"
2582 File "${AFS_SERVER_BUILDDIR}\afseventmsg_1028.dll"
2583 ;File "${AFS_SERVER_BUILDDIR}\afs_setup_utils_1028.dll"
2584 File "${AFS_SERVER_BUILDDIR}\afsserver_1028.dll"
2585 File "${AFS_SERVER_BUILDDIR}\afssvrcfg_1028.dll"
2586 File "${AFS_SERVER_BUILDDIR}\TaAfsAccountManager_1028.dll"
2587 File "${AFS_SERVER_BUILDDIR}\TaAfsAppLib_1028.dll"
2588 File "${AFS_SERVER_BUILDDIR}\TaAfsServerManager_1028.dll"
2589 File "..\..\doc\help\zh_TW\afs-cc.CNT"
2590 File "..\..\doc\help\zh_TW\afs-cc.hlp"
2591 File "..\..\doc\help\zh_TW\afs-light.CNT"
2592 File "..\..\doc\help\zh_TW\afs-light.hlp"
2593 File "..\..\doc\help\zh_TW\afs-nt.CNT"
2594 File "..\..\doc\help\zh_TW\afs-nt.HLP"
2595 File "..\..\doc\help\zh_TW\taafscfg.CNT"
2596 File "..\..\doc\help\zh_TW\taafscfg.hlp"
2597 File "..\..\doc\help\zh_TW\taafssvrmgr.CNT"
2598 File "..\..\doc\help\zh_TW\taafssvrmgr.hlp"
2599 File "..\..\doc\help\zh_TW\taafsusrmgr.CNT"
2600 File "..\..\doc\help\zh_TW\taafsusrmgr.hlp"
2608 ;====================================================
2609 ; AddToPath - Adds the given dir to the search path.
2610 ; Input - head of the stack
2611 ; Note - Win9x systems requires reboot
2612 ;====================================================
2619 StrCmp $1 1 AddToPath_NT
2622 FileOpen $1 "$1\autoexec.bat" a
2624 GetFullPathName /SHORT $0 $0
2625 FileWrite $1 "$\r$\nSET PATH=%PATH%;$0$\r$\n"
2630 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2631 StrCmp $1 "" AddToPath_NTdoIt
2633 Goto AddToPath_NTdoIt
2635 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $0
2636 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
2643 ;====================================================
2644 ; RemoveFromPath - Remove a given dir from the path
2645 ; Input: head of the stack
2646 ;====================================================
2647 Function un.RemoveFromPath
2656 StrCmp $1 1 unRemoveFromPath_NT
2659 FileOpen $1 "$1\autoexec.bat" r
2662 GetFullPathName /SHORT $0 $0
2663 StrCpy $0 "SET PATH=%PATH%;$0"
2665 Goto unRemoveFromPath_dosLoop
2667 unRemoveFromPath_dosLoop:
2669 StrCmp $3 "$0$\r$\n" unRemoveFromPath_dosLoop
2670 StrCmp $3 "$0$\n" unRemoveFromPath_dosLoop
2671 StrCmp $3 "$0" unRemoveFromPath_dosLoop
2672 StrCmp $3 "" unRemoveFromPath_dosLoopEnd
2674 Goto unRemoveFromPath_dosLoop
2676 unRemoveFromPath_dosLoopEnd:
2680 Delete "$1\autoexec.bat"
2681 CopyFiles /SILENT $4 "$1\autoexec.bat"
2683 Goto unRemoveFromPath_done
2685 unRemoveFromPath_NT:
2687 ReadRegStr $1 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH"
2690 Call un.StrStr ; Find $0 in $1
2691 Pop $0 ; pos of our dir
2692 IntCmp $0 -1 unRemoveFromPath_done
2693 ; else, it is in path
2694 StrCpy $3 $1 $0 ; $3 now has the part of the path before our dir
2695 IntOp $2 $2 + $0 ; $2 now contains the pos after our dir in the path (';')
2696 IntOp $2 $2 + 1 ; $2 now containts the pos after our dir and the semicolon.
2701 WriteRegExpandStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "PATH" $3
2702 SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment" /TIMEOUT=5000
2704 unRemoveFromPath_done:
2712 ;====================================================
2713 ; IsNT - Returns 1 if the current system is NT, 0
2715 ; Output: head of the stack
2716 ;====================================================
2719 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2720 StrCmp $0 "" 0 IsNT_yes
2732 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2734 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2737 ;====================================================
2738 ; StrStr - Finds a given string in another given string.
2739 ; Returns -1 if not found and the pos if found.
2740 ; Input: head of the stack - string to find
2741 ; second in the stack - string to find in
2742 ; Output: head of the stack
2743 ;====================================================
2747 Pop $0 ; $0 now have the string to find
2750 Pop $1 ; $1 now have the string to find in
2764 IntCmp $2 $4 0 0 unStrStrReturn_notFound
2766 StrCmp $5 $0 unStrStr_done unStrStr_loop
2768 unStrStrReturn_notFound:
2781 ;====================================================
2782 ; IsNT - Returns 1 if the current system is NT, 0
2784 ; Output: head of the stack
2785 ;====================================================
2788 ReadRegStr $0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2789 StrCmp $0 "" 0 unIsNT_yes
2801 !ifdef ADDSHAREDDLLUSED
2804 ; Increments a shared DLLs reference count.
2805 ; Use by passing one item on the stack (the full path of the DLL).
2808 ; Push $SYSDIR\myDll.dll
2812 Function AddSharedDLL
2815 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2817 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
2823 ; un.RemoveSharedDLL
2825 ; Decrements a shared DLLs reference count, and removes if necessary.
2826 ; Use by passing one item on the stack (the full path of the DLL).
2827 ; Note: for use in the main installer (not the uninstaller), rename the
2828 ; function to RemoveSharedDLL.
2831 ; Push $SYSDIR\myDll.dll
2832 ; Call un.RemoveSharedDLL
2835 Function un.RemoveSharedDLL
2838 ReadRegDword $R0 HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2839 StrCmp $R0 "" remove
2841 IntCmp $R0 0 rk rk uk
2843 DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1
2846 WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\SharedDLLs $R1 $R0
2849 Delete /REBOOTOK $R1
2856 !ifdef INSTALL_LOOPBACK
2857 Function afs.InstallMSLoopback
2859 File /oname=$R0 "loopback_install.dll"
2860 nsExec::Exec "rundll32.exe $R0 doLoopBackEntry quiet"
2861 Call GetWindowsVersion
2863 StrCmp $R1 "2000" +1 +2
2864 nsExec::Exec "rundll32.exe $R0 disableLoopBackEntry"
2872 ; Based on Yazno's function, http://yazno.tripod.com/powerpimpit/
2873 ; Updated by Joost Verburg
2875 ; Returns on top of stack
2877 ; Windows Version (95, 98, ME, NT x.x, 2000, XP, 2003)
2879 ; '' (Unknown Windows Version)
2882 ; Call GetWindowsVersion
2884 ; ; at this point $R0 is "NT 4.0" or whatnot
2886 Function GetWindowsVersion
2893 ReadRegStr $R0 HKLM \
2894 "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
2896 IfErrors 0 lbl_winnt
2899 ReadRegStr $R0 HKLM \
2900 "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
2903 StrCmp $R1 '4' 0 lbl_error
2907 StrCmp $R1 '4.0' lbl_win32_95
2908 StrCmp $R1 '4.9' lbl_win32_ME lbl_win32_98
2926 StrCmp $R1 '3' lbl_winnt_x
2927 StrCmp $R1 '4' lbl_winnt_x
2931 StrCmp $R1 '5.0' lbl_winnt_2000
2932 StrCmp $R1 '5.1' lbl_winnt_XP
2933 StrCmp $R1 '5.2' lbl_winnt_2003 lbl_error
2936 StrCpy $R0 "NT $R0" 6
2961 ; Author: Lilla (lilla@earthlink.net) 2003-06-13
2962 ; function IsUserAdmin uses plugin \NSIS\PlusgIns\UserInfo.dll
2963 ; This function is based upon code in \NSIS\Contrib\UserInfo\UserInfo.nsi
2964 ; This function was tested under NSIS 2 beta 4 (latest CVS as of this writing).
2968 ; Pop $R0 ; at this point $R0 is "true" or "false"
2970 Function IsUserAdmin
2979 UserInfo::GetAccountType
2982 StrCmp $R2 "Admin" 0 Continue
2983 ; Observation: I get here when running Win98SE. (Lilla)
2984 ; The functions UserInfo.dll looks for are there on Win98 too,
2985 ; but just don't work. So UserInfo.dll, knowing that admin isn't required
2986 ; on Win98, returns admin anyway. (per kichik)
2987 ; MessageBox MB_OK 'User "$R1" is in the Administrators group'
2992 ; You should still check for an empty string because the functions
2993 ; UserInfo.dll looks for may not be present on Windows 95. (per kichik)
2996 ;MessageBox MB_OK 'User "$R1" is in the "$R2" group'
3000 ; comment/message below is by UserInfo.nsi author:
3001 ; This one means you don't need to care about admin or
3002 ; not admin because Windows 9x doesn't either
3003 ;MessageBox MB_OK "Error! This DLL can't run under Windows 9x!"
3007 ;MessageBox MB_OK 'User= "$R1" AccountType= "$R2" IsUserAdmin= "$R0"'
3015 ; input, top of stack (e.g. C:\Program Files\Poop)
3016 ; output, top of stack (replaces, with e.g. C:\Program Files)
3017 ; modifies no other variables.
3020 ; Push "C:\Program Files\Directory\Whatever"
3023 ; ; at this point $R0 will equal "C:\Program Files\Directory"
3037 IntCmp $R1 $R2 get 0 get
3038 StrCpy $R3 $R0 1 -$R1
3053 ;--------------------------------
3054 ;Handle what must and what must not be installed
3055 Function .onSelChange
3056 ; If they install the server, they MUST install the client
3057 SectionGetFlags ${secServer} $R0
3058 IntOp $R0 $R0 & ${SF_SELECTED}
3059 StrCmp $R0 "1" MakeClientSelected
3061 ; If they install the control center, we'll give them the client.
3062 ; It may not be required, but it's a bit more useful
3063 SectionGetFlags ${secControl} $R0
3064 IntOp $R0 $R0 & ${SF_SELECTED}
3065 StrCmp $R0 "1" MakeClientSelected
3069 SectionGetFlags ${secClient} $R0
3070 IntOp $R0 $R0 | ${SF_SELECTED}
3071 SectionSetFlags ${secClient} $R0