Skip to content

Commit ff927d1

Browse files
benyamin-codezYanVugenfirer
authored andcommitted
[CI-NO-BUILD] [build] Refactor build for inf2cat system drivers
1. Refactors body into subroutine for creation of inf2cat system drivers 2. Transpose arguments to named variables 3. Use negative ERRORLEVEL check to catch all but SUCCESS 4. Prepare for colour prints to stdout 5. Remove goto :eof :: never hit placeholder Split from PR #1212. Signed-off-by: benyamin-codez <115509179+benyamin-codez@users.noreply.github.com>
1 parent d640a7b commit ff927d1

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

buildAll.bat

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,8 @@ if errorlevel 1 goto :fail
4444

4545
path %path%;C:\Program Files (x86)\Windows Kits\10\bin\x86\
4646
for %%D in (pciserial fwcfg Q35) do @(
47-
echo building also %%D
48-
pushd %%D
49-
call buildAll.bat
50-
if errorlevel 1 goto :fail
51-
popd
47+
call :bld_inf_drvr %%D
5248
)
53-
5449
echo.
5550
echo Processing DVL files to create Windows 10 COMPAT ^(WIN10_RS1 ^/ 1607^) version...
5651
for /R %%f in (*.dvl.xml) do @call :process_xml %%f
@@ -59,7 +54,6 @@ if "%found_dvl_xml%"=="" (
5954
) else (
6055
echo Processing of DVL files is complete.
6156
)
62-
6357
:bld_success
6458
echo.
6559
echo BUILD COMPLETED SUCCESSFULLY.
@@ -72,6 +66,20 @@ set BUILD_FAILED=
7266
call :leave 1
7367
goto :eof
7468

69+
:bld_inf_drvr
70+
set inf_drv=%~1
71+
echo.
72+
echo Building : %inf_drv%%
73+
echo.
74+
pushd %inf_drv%
75+
call buildAll.bat
76+
if not errorlevel==0 (
77+
goto :fail
78+
)
79+
echo Build for %inf_drv% succeeded.
80+
popd
81+
goto :eof
82+
7583
:process_xml
7684
set found_dvl_xml=Yes
7785
echo Creating %~dpn1-compat%~x1...
@@ -80,4 +88,3 @@ goto :eof
8088

8189
:leave
8290
exit /B %1
83-
goto :eof :: never hit

0 commit comments

Comments
 (0)