mirror of
https://github.com/NohamR/Reclass.git
synced 2026-05-10 19:59:21 +00:00
ci: add SDK include paths for WDK NuGet driver build
NuGet splits WDK and SDK into separate packages. specstrings.h lives in the SDK shared headers. Add SDK_INC_ROOT for shared/ucrt.
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -60,6 +60,12 @@ jobs:
|
|||||||
$libRoot = Split-Path (Split-Path $ntos.DirectoryName -Parent) -Parent
|
$libRoot = Split-Path (Split-Path $ntos.DirectoryName -Parent) -Parent
|
||||||
Write-Host "WDK lib root: $libRoot"
|
Write-Host "WDK lib root: $libRoot"
|
||||||
echo "WDK_LIB_ROOT=$libRoot" >> $env:GITHUB_ENV
|
echo "WDK_LIB_ROOT=$libRoot" >> $env:GITHUB_ENV
|
||||||
|
$specstr = Get-ChildItem wdk_pkg -Recurse -Filter "specstrings.h" |
|
||||||
|
Select-Object -First 1
|
||||||
|
if (!$specstr) { throw "specstrings.h not found in SDK NuGet package" }
|
||||||
|
$sdkIncRoot = Split-Path $specstr.DirectoryName -Parent
|
||||||
|
Write-Host "SDK include root: $sdkIncRoot"
|
||||||
|
echo "SDK_INC_ROOT=$sdkIncRoot" >> $env:GITHUB_ENV
|
||||||
|
|
||||||
- name: Build kernel driver
|
- name: Build kernel driver
|
||||||
shell: cmd
|
shell: cmd
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ if not defined MSVC (
|
|||||||
)
|
)
|
||||||
|
|
||||||
:: ── Auto-detect WDK (override with WDK_INC_ROOT and WDK_LIB_ROOT env vars) ──
|
:: ── Auto-detect WDK (override with WDK_INC_ROOT and WDK_LIB_ROOT env vars) ──
|
||||||
|
:: SDK_INC_ROOT is optional; when WDK is installed traditionally, SDK shared
|
||||||
|
:: headers live alongside WDK headers. NuGet splits them into a separate package.
|
||||||
if not defined WDK_INC_ROOT (
|
if not defined WDK_INC_ROOT (
|
||||||
set "WDK=C:\Program Files (x86)\Windows Kits\10"
|
set "WDK=C:\Program Files (x86)\Windows Kits\10"
|
||||||
set WDKVER=
|
set WDKVER=
|
||||||
@@ -33,10 +35,15 @@ if not defined WDK_INC_ROOT (
|
|||||||
)
|
)
|
||||||
set "WDK_INC_ROOT=!WDK!\Include\!WDKVER!"
|
set "WDK_INC_ROOT=!WDK!\Include\!WDKVER!"
|
||||||
set "WDK_LIB_ROOT=!WDK!\Lib\!WDKVER!"
|
set "WDK_LIB_ROOT=!WDK!\Lib\!WDKVER!"
|
||||||
|
set "SDK_INC_ROOT=!WDK!\Include\!WDKVER!"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
:: If SDK_INC_ROOT not set, default to WDK_INC_ROOT (traditional install has both)
|
||||||
|
if not defined SDK_INC_ROOT set "SDK_INC_ROOT=%WDK_INC_ROOT%"
|
||||||
|
|
||||||
echo Using MSVC: %MSVC%
|
echo Using MSVC: %MSVC%
|
||||||
echo Using WDK inc: %WDK_INC_ROOT%
|
echo Using WDK inc: %WDK_INC_ROOT%
|
||||||
|
echo Using SDK inc: %SDK_INC_ROOT%
|
||||||
echo Using WDK lib: %WDK_LIB_ROOT%
|
echo Using WDK lib: %WDK_LIB_ROOT%
|
||||||
|
|
||||||
set "CL_EXE=%MSVC%\bin\Hostx64\x64\cl.exe"
|
set "CL_EXE=%MSVC%\bin\Hostx64\x64\cl.exe"
|
||||||
@@ -54,6 +61,8 @@ echo === Compiling rcxdrv.c ===
|
|||||||
/I "%WDK_INC_ROOT%\km" ^
|
/I "%WDK_INC_ROOT%\km" ^
|
||||||
/I "%WDK_INC_ROOT%\km\crt" ^
|
/I "%WDK_INC_ROOT%\km\crt" ^
|
||||||
/I "%WDK_INC_ROOT%\shared" ^
|
/I "%WDK_INC_ROOT%\shared" ^
|
||||||
|
/I "%SDK_INC_ROOT%\shared" ^
|
||||||
|
/I "%SDK_INC_ROOT%\ucrt" ^
|
||||||
/kernel ^
|
/kernel ^
|
||||||
/Fo"%OUTDIR%\rcxdrv.obj" ^
|
/Fo"%OUTDIR%\rcxdrv.obj" ^
|
||||||
"%SRCDIR%rcxdrv.c"
|
"%SRCDIR%rcxdrv.c"
|
||||||
|
|||||||
Reference in New Issue
Block a user