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.

72 lines
1.9 KiB

  1. @echo off
  2. setlocal EnableDelayedExpansion
  3. REM
  4. REM some notes
  5. REM
  6. REM 1. this does NOT need to be templatized. this script will NOT
  7. REM run on it's own. it is only called via sfcgen.cmd, which is
  8. REM templatized.
  9. REM 2. because it's already templatized, we can call errmsg etc
  10. REM get the product type from the command line
  11. set ProductType=%1
  12. set ProductLetter=%2
  13. REM get the inf directories
  14. if /i '%ProductType%'=='per' (
  15. set InfDirs="perinf"
  16. ) else if /i '%ProductType%'=='wks' (
  17. set InfDirs=""
  18. ) else if /i '%ProductType%'=='bla' (
  19. set InfDirs="srvinf blainf"
  20. ) else if /i '%ProductType%'=='sbs' (
  21. set InfDirs="srvinf sbsinf"
  22. ) else if /i '%ProductType%'=='srv' (
  23. set InfDirs="srvinf"
  24. ) else if /i '%ProductType%'=='ent' (
  25. set InfDirs="srvinf entinf"
  26. ) else if /i '%ProductType%'=='dtc' (
  27. set InfDirs="srvinf entinf dtcinf"
  28. ) else (
  29. call errmsg.cmd "%script_name% Invalid product type %ProductType%."
  30. goto :exit
  31. )
  32. set InputDirs=/i:%_NTPOSTBLD%
  33. for /f "tokens=*" %%i in (%InfDirs%) do (
  34. for %%j in (%%i) do (
  35. set InputDirs=!InputDirs! /i:%_NTPOSTBLD%\%%j
  36. )
  37. )
  38. REM issue the filegen command
  39. call ExecuteCmd.cmd "filegen.exe %InputDirs% /o:%myarchitecture%_%ProductType%.dat /h:%myarchitecture%_%ProductType%.h /a:%inputinf% /p:%myarchitecture% /d:%ProductType% -s:%ProductType%Files /t:%_NTPostBld%\build_logs\%myarchitecture%%ProductType% -b:%_NTPostBld%\congeal_scripts\sfcgen%ProductLetter%.txt"
  40. REM verify that filegen worked
  41. if NOT exist %myarchitecture%_%ProductType%.h (
  42. call errmsg.cmd "%script_name% %myarchitecture%_%ProductType%.h failed to generate."
  43. )
  44. :exit
  45. REM send the event to say we're done
  46. perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -ih sfcgen.%ProductType%
  47. perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -is sfcgen.%ProductType%
  48. endlocal