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.

84 lines
2.7 KiB

  1. @echo off
  2. set CFGENV=1
  3. REM ------------------------------------------
  4. REM Call razzle
  5. REM ------------------------------------------
  6. if "%1"=="/?" call %~dp0..\..\tools\razzlelocal.cmd help & goto end
  7. if "%1"=="-?" call %~dp0..\..\tools\razzlelocal.cmd help & goto end
  8. if "%1"=="/help" call %~dp0..\..\tools\razzlelocal.cmd help & goto end
  9. if "%1"=="help" call %~dp0..\..\tools\razzlelocal.cmd help & goto end
  10. if "%1"=="-help" call %~dp0..\..\tools\razzlelocal.cmd help & goto end
  11. call %~dp0..\..\tools\razzlelocal.cmd %*
  12. if "%@eval[2+2]" == "4" goto 4nt
  13. REM ------------------------------------------
  14. REM Figure out what the root of the world is.
  15. REM This is computed as the parent of the
  16. REM directory in which we are found.
  17. REM ------------------------------------------
  18. call :ComputeVipBase %~f0
  19. set VIPBASE=%RESULT%
  20. REM ------------------------------------------
  21. REM BUILD.EXE insists on having some particular
  22. REM environment variables pointing to our root
  23. REM ------------------------------------------
  24. goto :skip4nt
  25. :4nt
  26. REM Extract the full path to VipEnv.cmd.
  27. set VIPBASE=%@path[%@truename[%0]]
  28. REM Strip off the trailing "\"
  29. set VIPBASE=%@left[%@eval[%@len[%VIPBASE]-1],%VIPBASE]
  30. REM Strip off the last subdirectory.
  31. set i=%@eval[%@len[%VIPBASE]-1]
  32. do until "%@instr[%i,1,%VIPBASE]"=="\"
  33. set i=%@eval[%i-1]
  34. enddo
  35. set VIPBASE=%@left[%i,%VIPBASE]
  36. unset i
  37. :skip4nt
  38. REM ------------------------------------------
  39. REM Setup path
  40. REM ------------------------------------------
  41. if NOT "%CONFIGPATHSET%"=="" goto :skipsetpath
  42. set PATH=%VIPBASE%\common;%PATH%
  43. set CONFIGPATHSET=1
  44. :skipsetpath
  45. REM ------------------------------------------
  46. REM Call catutil to generate catmeta.h
  47. REM ------------------------------------------
  48. call catutil.exe /verbose /header=%VIPBASE%\src\inc\catmeta.h /schema=%VIPBASE%\src\core\catinproc_iiscfg\catalog.xms /meta=%VIPBASE%\src\inc\catmeta_core.xml,%VIPBASE%\src\inc\iismeta.xml
  49. REM call catutil.exe /header=%VIPBASE%\src\inc\appcentermeta.h /schema=%VIPBASE%\src\core\catinproc\catalog.xms /meta=%VIPBASE%\src\inc\catmeta_core.xml
  50. :end
  51. REM ------------------------------------------
  52. REM Helper functions
  53. REM ------------------------------------------
  54. REM ------------------------------------------
  55. REM Expand a string to a full path
  56. REM ------------------------------------------
  57. :FullPath
  58. set RESULT=%~f1
  59. goto :EOF
  60. REM ------------------------------------------
  61. REM Compute the VIPBASE environment variable
  62. REM given a path to this batch script.
  63. REM ------------------------------------------
  64. :ComputeVipBase
  65. set RESULT=%~dp1..
  66. Call :FullPath %RESULT%
  67. goto :EOF