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
72 lines
1.9 KiB
@echo off
|
|
setlocal EnableDelayedExpansion
|
|
|
|
REM
|
|
REM some notes
|
|
REM
|
|
REM 1. this does NOT need to be templatized. this script will NOT
|
|
REM run on it's own. it is only called via sfcgen.cmd, which is
|
|
REM templatized.
|
|
REM 2. because it's already templatized, we can call errmsg etc
|
|
|
|
REM get the product type from the command line
|
|
set ProductType=%1
|
|
set ProductLetter=%2
|
|
|
|
REM get the inf directories
|
|
|
|
if /i '%ProductType%'=='per' (
|
|
|
|
set InfDirs="perinf"
|
|
|
|
) else if /i '%ProductType%'=='wks' (
|
|
|
|
set InfDirs=""
|
|
|
|
) else if /i '%ProductType%'=='bla' (
|
|
|
|
set InfDirs="srvinf blainf"
|
|
|
|
) else if /i '%ProductType%'=='sbs' (
|
|
|
|
set InfDirs="srvinf sbsinf"
|
|
|
|
) else if /i '%ProductType%'=='srv' (
|
|
|
|
set InfDirs="srvinf"
|
|
|
|
) else if /i '%ProductType%'=='ent' (
|
|
|
|
set InfDirs="srvinf entinf"
|
|
|
|
) else if /i '%ProductType%'=='dtc' (
|
|
|
|
set InfDirs="srvinf entinf dtcinf"
|
|
|
|
) else (
|
|
call errmsg.cmd "%script_name% Invalid product type %ProductType%."
|
|
goto :exit
|
|
)
|
|
|
|
set InputDirs=/i:%_NTPOSTBLD%
|
|
|
|
for /f "tokens=*" %%i in (%InfDirs%) do (
|
|
for %%j in (%%i) do (
|
|
set InputDirs=!InputDirs! /i:%_NTPOSTBLD%\%%j
|
|
)
|
|
)
|
|
|
|
REM issue the filegen command
|
|
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"
|
|
|
|
REM verify that filegen worked
|
|
if NOT exist %myarchitecture%_%ProductType%.h (
|
|
call errmsg.cmd "%script_name% %myarchitecture%_%ProductType%.h failed to generate."
|
|
)
|
|
|
|
:exit
|
|
REM send the event to say we're done
|
|
perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -ih sfcgen.%ProductType%
|
|
perl %RazzleToolPath%\PostBuildScripts\cmdevt.pl -is sfcgen.%ProductType%
|
|
|
|
endlocal
|