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.

128 lines
3.8 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 SDK 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. if "%NTDEBUG%" == "" goto noDebug
  30. if not "%NTDEBUG%" == "retail" set tdir=d
  31. set tdir=obj%tdir%
  32. set ntbindir=%_NTDRIVE%\%_NTROOT%
  33. @ REM
  34. @ REM Initialize special pointers
  35. @ REM
  36. set IEDrive=C:
  37. set IEPath=\Program Files\Internet Express
  38. set Calais=%_NTROOT%\Private\ISPU\Calais
  39. set KitDir=%Calais%\Tools\kits\SDK
  40. @ REM
  41. @ REM Make sure the target paths exist.
  42. @ REM
  43. if not exist "%IEDrive%%IEPath%\IExpress.exe" goto noIExpress
  44. if not exist %KitDir%\%tdir% mkdir %KitDir%\%tdir%
  45. if not exist %KitDir%\%tdir%\%arch% mkdir %KitDir%\%tdir%\%arch%
  46. if exist %KitDir%\%tdir%\%arch%\setup.exe del %KitDir%\%tdir%\%arch%\setup.exe
  47. if exist %KitDir%\%tdir%\%arch%\readme.txt del %KitDir%\%tdir%\%arch%\readme.txt
  48. @ REM
  49. @ REM Make sure the source paths exist.
  50. @ REM
  51. copy %KitDir%\readme.txt %KitDir%\%tdir%\%arch%\readme.txt > nul
  52. @ REM
  53. @ REM Copy those files that need to have names changed
  54. @ REM
  55. mkdir cabdir
  56. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\bytebuff.java cabdir\bytebuff.jav > nul
  57. if not exist cabdir\bytebuff.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\bytebuff.jav
  58. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\scard.java cabdir\scard.jav > nul
  59. if not exist cabdir\scard.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\scard.jav
  60. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\scardcmd.java cabdir\scardcmd.jav > nul
  61. if not exist cabdir\scardcmd.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\scardcmd.jav
  62. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\scardiso.java cabdir\scardiso.jav > nul
  63. if not exist cabdir\scardiso.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\scardiso.jav
  64. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\scbase.java cabdir\scbase.jav > nul
  65. if not exist cabdir\scbase.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\scbase.jav
  66. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\scconsnt.java cabdir\scconsnt.jav > nul
  67. if not exist cabdir\scconsnt.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\scconsnt.jav
  68. copy %_NTDRIVE%%Calais%\ssps\scntvssp\javassp\test.java cabdir\test.jav > nul
  69. if not exist cabdir\test.jav echo Failed to copy %_NTDRIVE%%Calais%\scntvssp\javassp\test.jav
  70. @ REM
  71. @ REM Build the kit.
  72. @ REM
  73. sed -e s/{NTBINDIR}/%ntbindir%/g -e s/{DIR}/%tdir%/g -e s/{ARCH}/%arch%/g SCSdk.mdf > temp.cdf
  74. if not "%1" == "" goto stopBuild
  75. %IEDrive%
  76. cd "%IEPath%"
  77. START /W IExpress.exe %_NTDRIVE%%KitDir%\temp.cdf /N /Q
  78. %_NTDRIVE%
  79. cd %KitDir%
  80. del temp.cdf
  81. rmdir /s /q cabdir
  82. goto end
  83. @ REM
  84. @ REM Error processing.
  85. @ REM
  86. :stopBuild
  87. echo Processing has been terminated with all temporary files intact.
  88. echo Don't supply the "%1" parameter to build the kit.
  89. goto end
  90. :noDebug
  91. echo ERROR: NTDEBUG is undefined.
  92. goto end
  93. :noArchitecture
  94. echo ERROR: PROCESSOR_ARCHITECTURE is unset or unrecognized.
  95. goto end
  96. :noIExpress
  97. echo ERROR: IExpress is not installed in the default location.
  98. goto end
  99. :end
  100. endlocal