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.

168 lines
4.8 KiB

  1. @if "%_echo%"=="" echo off
  2. setlocal
  3. REM ----------------------------------------------------------
  4. REM Release of IIS Duct Tape binaries
  5. REM Author: MuraliK
  6. REM Date: 2/9/1999
  7. REM
  8. REM Arguments:
  9. REM %0 - Batch script name
  10. REM %1 - Build Version for release
  11. REM ----------------------------------------------------------
  12. REM
  13. REM CHECKED build if NTDEBUG defined, else FREE build.
  14. REM
  15. set __RELPROGRAM=%0
  16. REM set __TARGETROOT=\\iasbuild\duct-tape
  17. if NOT "%_TEMP_TARGET%"=="" set __TARGETROOT=%_TEMP_TARGET%
  18. :noTemp
  19. set __TARGET_TYPE=fre
  20. if "%NTDEBUG%"=="cvp" set __TARGET_TYPE=chk
  21. if "%NTDEBUG%"=="sym" set __TARGET_TYPE=chk
  22. if "%NTDEBUG%"=="ntsd" set __TARGET_TYPE=chk
  23. REM
  24. REM determine what kind of processor
  25. REM
  26. if /I "%PROCESSOR_ARCHITECTURE%"=="x86" goto X86
  27. if /I "%PROCESSOR_ARCHITECTURE%"=="ALPHA" goto ALPHA
  28. echo PROCESSOR_ARCHITECTURE not defined.
  29. goto EXIT
  30. :X86
  31. set __TARGET_EXT=x86
  32. set __PROCESSOR_DIR=i386
  33. goto OK
  34. :ALPHA
  35. set __TARGET_EXT=Alpha
  36. set __PROCESSOR_DIR=alpha
  37. goto OK
  38. :OK
  39. REM
  40. REM check parameters and env vars
  41. REM
  42. if "%1"=="" echo usage: %__RELPROGRAM% ^<version^> && goto EXIT
  43. if not "%BINARIES%"=="" goto binariesSet
  44. if "%_NTBINDIR%"=="" echo _NTBINDIR is not set && goto EXIT
  45. set BINARIES=%_NTBINDIR%\release\%__PROCESSOR_DIR%
  46. :binariesSet
  47. set __DTBINS=%BINARIES%\nt\iisrearc
  48. if not exist %__DTBINS% echo Bad _NTBINDIR or BINARIES directory && goto EXIT
  49. set __TARGET=%__TARGETROOT%\%1\%__TARGET_EXT%%__TARGET_TYPE%\IISRearc
  50. rem
  51. rem Insure that we are not trashing an existing build.
  52. rem
  53. if exist %__TARGET%\dtver.bat if NOT "%2" == "/replace" goto IDIOT_CHECK
  54. REM
  55. REM Store the version number in the release file
  56. REM
  57. echo Duct Tape Release version %1 > %__TARGET%\dtver.bat
  58. REM
  59. REM create release directories
  60. REM
  61. md %__TARGETROOT%\%1 2>nul
  62. md %__TARGETROOT%\%1\%__TARGET_EXT%%__TARGET_TYPE% 2>nul
  63. md %__TARGET% 2>nul
  64. md %__TARGET%\inetsrv 2>nul
  65. md %__TARGET%\iisplus 2>nul
  66. md %__TARGET%\idw 2>nul
  67. md %__TARGET%\dump 2>nul
  68. md %__TARGET%\setup 2>nul
  69. md %__TARGET%\test 2>nul
  70. set __SYMBOLS=%__TARGET%\Symbols
  71. md %__SYMBOLS% 2>nul
  72. md %__SYMBOLS%\exe 2>nul
  73. md %__SYMBOLS%\dll 2>nul
  74. md %__SYMBOLS%\sys 2>nul
  75. if not exist %__TARGET% echo Bad TARGET directory %__TARGET% && goto EXIT
  76. echo Copying Files to %__TARGET%
  77. set __DTBIN_INETSRV=%__DTBINS%\inetsrv
  78. set __DTBIN_IISPLUS=%__DTBINS%\IISPLUS
  79. set __DTBIN_SYMBOLS=%__DTBINS%\symbols
  80. set __DTBIN_DUMP=%__DTBINS%\dump
  81. set __DTBIN_IDW=%__DTBINS%\idw
  82. set __DTBIN_SETUP=%__DTBINS%\setup
  83. set __DTBIN_TEST=%__DTBINS%\test
  84. @echo Copy all binaries ...
  85. for %%f in (ul.sys iisw3adm.dll iw3controlps.dll iisutil.dll ipm.dll metadata.dll ulapi.dll ulapi.h uldef.h ulapi.lib inetinfo.exe httpext.dll) do (
  86. copy %__DTBIN_INETSRV%\%%f %__TARGET%\inetsrv\%%f
  87. )
  88. for %%f in (streamfilt.dll w3dt.dll w3core.dll w3cache.dll w3isapi.dll w3tp.dll asp.dll asptxn.dll w3wp.exe ssinc.dll gzip.dll w3comlog.dll odbclog.dll logscrpt.dll httpodbc.dll) do (
  89. copy %__DTBIN_IISPLUS%\%%f %__TARGET%\iisplus\%%f
  90. )
  91. copy .\inc\ulapi.h %__TARGET%\inetsrv\
  92. copy .\inc\uldef.h %__TARGET%\inetsrv\
  93. copy .\bldinc\iw3control.h %__TARGET%\inetsrv\
  94. copy .\lib\%__PROCESSOR_DIR%\ulapi.lib %__TARGET%\inetsrv\
  95. @echo Copy all IDW binaries ...
  96. for %%f in (ulkd.dll dtext.dll ultest.dll autosock.dll dtflags.exe tul.exe) do (
  97. copy %__DTBIN_IDW%\%%f %__TARGET%\idw\%%f
  98. )
  99. @echo Copy all Dump binaries ...
  100. for %%f in (ulsim.dll generatehash.exe) do (
  101. copy %__DTBIN_DUMP%\%%f %__TARGET%\dump\%%f
  102. )
  103. @echo Copy Symbol files ...
  104. xcopy %__DTBIN_SYMBOLS% %__TARGET%\symbols\ /s
  105. @echo Copy Setup related files ...
  106. pushd %__DTBIN_SETUP%
  107. for %%f in (*) do (
  108. copy %__DTBIN_SETUP%\%%f %__TARGET%\setup\%%f )
  109. popd
  110. rem
  111. rem Tell the user how to bypass the bypass
  112. rem
  113. goto IDIOT_CHECK_FINI
  114. :IDIOT_CHECK
  115. @echo ----------------------------------------------------------------
  116. @echo WARNING: Version %1 is already present on %__TARGETROOT%
  117. @echo ----------------------------------------------------------------
  118. @echo If you really want to do this, then use: %0 %1 /replace
  119. goto EXIT
  120. :IDIOT_CHECK_FINI
  121. :EXIT