Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

149 lines
4.7 KiB

  1. @ echo off
  2. @ REM ========================================================================
  3. @ REM Copyright (c) 1996 Microsoft Corporation
  4. @ REM
  5. @ REM Module Name:
  6. @ REM
  7. @ REM build.bat
  8. @ REM
  9. @ REM Abstract:
  10. @ REM
  11. @ REM This batch file builds the Calais Base Components kit.
  12. @ REM
  13. @ REM Author:
  14. @ REM
  15. @ REM Doug Barlow (dbarlow) 3/26/1997
  16. @ REM
  17. @ REM ========================================================================
  18. setlocal
  19. @ REM
  20. @ REM Initialize the working variables.
  21. @ REM
  22. set arch=
  23. if "%PROCESSOR_ARCHITECTURE%" == "x86" set arch=i386
  24. if "%PROCESSOR_ARCHITECTURE%" == "alpha" set arch=alpha
  25. if "%PROCESSOR_ARCHITECTURE%" == "mips" set arch=mips
  26. if "%PROCESSOR_ARCHITECTURE%" == "ppc" set arch=ppc
  27. if "%arch%" == "" goto noArchitecture
  28. set tdir=
  29. set typ=free
  30. if "%NTDEBUG%" == "" goto noDebug
  31. if not "%NTDEBUG%" == "retail" set tdir=d
  32. if not "%NTDEBUG%" == "retail" set typ=checked
  33. set bdir=bin%tdir%
  34. set tdir=obj%tdir%
  35. set ntbindir=%_NTDRIVE%\%_NTROOT%
  36. @ REM
  37. @ REM Initialize special pointers
  38. @ REM
  39. set IEDrive=C:
  40. set IEPath=\Program Files\Internet Express
  41. set Calais=%_NTROOT%\Private\ISPU\Calais
  42. set KitDir=%Calais%\Tools\kits\Base
  43. @ REM
  44. @ REM Make sure the target paths exist.
  45. @ REM
  46. if not exist "%IEDrive%%IEPath%\IExpress.exe" goto noIExpress
  47. if not exist %KitDir%\%tdir% mkdir %KitDir%\%tdir%
  48. if not exist %KitDir%\%tdir%\licenced mkdir %KitDir%\%tdir%\licenced
  49. if not exist %KitDir%\%tdir%\unlicenced mkdir %KitDir%\%tdir%\unlicenced
  50. if not exist %KitDir%\%tdir%\licenced\%arch% mkdir %KitDir%\%tdir%\licenced\%arch%
  51. if not exist %KitDir%\%tdir%\unlicenced\%arch% mkdir %KitDir%\%tdir%\unlicenced\%arch%
  52. if exist %KitDir%\%tdir%\%arch%\setup.exe del %KitDir%\%tdir%\licenced\%arch%\setup.exe
  53. if exist %KitDir%\%tdir%\%arch%\readme.txt del %KitDir%\%tdir%\licenced\%arch%\readme.txt
  54. if exist %KitDir%\%tdir%\%arch%\setup.exe del %KitDir%\%tdir%\unlicenced\%arch%\setup.exe
  55. if exist %KitDir%\%tdir%\%arch%\readme.txt del %KitDir%\%tdir%\unlicenced\%arch%\readme.txt
  56. @ REM
  57. @ REM Place the ReadMe file for this kit.
  58. @ REM
  59. copy %KitDir%\ReadMe.txt %KitDir%\%tdir%\licenced\%arch%\ReadMe.txt > nul
  60. if not exist %KitDir%\%tdir%\licenced\%arch%\readme.txt echo Failed to create licenced ReadMe.txt
  61. copy %KitDir%\ReadMe.txt %KitDir%\%tdir%\unlicenced\%arch%\ReadMe.txt > nul
  62. if not exist %KitDir%\%tdir%\unlicenced\%arch%\readme.txt echo Failed to create unlicenced ReadMe.txt
  63. @ REM
  64. @ REM Copy the binaries for use in installation kit. Note that this copy
  65. @ REM assumes MFC DLL's are available and NT is the OS.
  66. @ REM
  67. mkdir cabdir
  68. call ..\place %windir%\system32 msvcrt.dll
  69. call ..\place %windir%\system32 mfc42.dll
  70. call ..\place %_NTDRIVE%%Calais%\bin\%tdir%\%arch% SCardDlg.dll
  71. call ..\place %_NTDRIVE%%Calais%\bin\%tdir%\%arch% SCardSvr.exe
  72. call ..\place %_NTDRIVE%%Calais%\bin\%tdir%\%arch% WinSCard.dll
  73. call ..\place %_NTDRIVE%%Calais%\bin\%tdir%\%arch% smclib.sys
  74. call ..\place %_NTDRIVE%%Calais%\drivers\VxD\smclib95\%bdir% smclib.vxd
  75. call ..\place %_NTDRIVE%%Calais%\ssps\bin\%tdir%\%arch% SCardDat.dll
  76. call ..\place %_NTDRIVE%%Calais%\ssps\bin\%tdir%\%arch% SCardMgr.dll
  77. call ..\place %_NTDRIVE%%Calais%\ssps\bin\%tdir%\%arch% SCardSrv.dll
  78. call ..\place %_NTDRIVE%%Calais%\ssps\bin\%tdir%\%arch% SCNtvSSP.dll
  79. call ..\place %_NTDRIVE%%Calais%\tools\kits\Base scbase.inf
  80. call ..\place %KitDir%\%tdir%\licenced\%arch% readme.txt
  81. @ REM
  82. @ REM Build the kits.
  83. @ REM
  84. sed -e s/{NTBINDIR}/%ntbindir%/g -e s/{DIR}/%tdir%/g -e s/{ARCH}/%arch%/g Baselic.mdf > temp_lic.sed
  85. sed -e s/{NTBINDIR}/%ntbindir%/g -e s/{DIR}/%tdir%/g -e s/{ARCH}/%arch%/g Baseunl.mdf > temp_unl.sed
  86. if not "%1" == "" goto stopBuild
  87. %IEDrive%
  88. cd "%IEPath%"
  89. START /W IExpress.exe %_NTDRIVE%%KitDir%\temp_lic.sed /N /Q
  90. START /W IExpress.exe %_NTDRIVE%%KitDir%\temp_unl.sed /N /Q
  91. @ REM
  92. @ REM Clean up.
  93. @ REM
  94. %_NTDRIVE%
  95. cd %KitDir%
  96. del temp_lic.sed
  97. del temp_unl.sed
  98. rmdir /s /q cabdir
  99. goto end
  100. @ REM
  101. @ REM Error processing.
  102. @ REM
  103. :stopBuild
  104. echo Processing has been terminated with all temporary files intact.
  105. echo Don't supply the "%1" parameter to build the kit.
  106. goto end
  107. :noDebug
  108. echo ERROR: NTDEBUG is undefined.
  109. goto end
  110. :noArchitecture
  111. echo ERROR: PROCESSOR_ARCHITECTURE is unset or unrecognized.
  112. goto end
  113. :noIExpress
  114. echo ERROR: IExpress is not installed in the default location.
  115. goto end
  116. :end
  117. endlocal