|
47 | 47 | Write-Output "Ensuring Windows Driver Kit is installed (Chocolatey: windowsdriverkit11)..." |
48 | 48 | choco install windowsdriverkit11 -y --no-progress |
49 | 49 | if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE } |
| 50 | +
|
| 51 | + - name: Detect Windows Kits version (UMDF headers) |
| 52 | + shell: pwsh |
| 53 | + run: | |
| 54 | + $ErrorActionPreference = "Stop" |
| 55 | +
|
| 56 | + $kitsRoot = $null |
| 57 | + try { |
| 58 | + $kitsRoot = (Get-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows Kits\Installed Roots" -Name "KitsRoot10" -ErrorAction Stop).KitsRoot10 |
| 59 | + } catch { |
| 60 | + $kitsRoot = Join-Path ${env:ProgramFiles(x86)} "Windows Kits\10\" |
| 61 | + } |
| 62 | +
|
| 63 | + if (-not $kitsRoot -or -not (Test-Path $kitsRoot)) { |
| 64 | + throw "Windows Kits root not found: $kitsRoot" |
| 65 | + } |
| 66 | +
|
| 67 | + $includeRoot = Join-Path $kitsRoot "Include" |
| 68 | + if (-not (Test-Path $includeRoot)) { |
| 69 | + throw "Windows Kits Include directory not found: $includeRoot" |
| 70 | + } |
| 71 | +
|
| 72 | + $candidates = |
| 73 | + Get-ChildItem -Path $includeRoot -Directory -ErrorAction SilentlyContinue | |
| 74 | + Where-Object { Test-Path (Join-Path $_.FullName "wdf\umdf\wudfwdm.h") } | |
| 75 | + Sort-Object -Property Name -Descending |
| 76 | +
|
| 77 | + $best = $candidates | Select-Object -First 1 |
| 78 | + if (-not $best) { |
| 79 | + throw "Could not find wdf\\umdf\\wudfwdm.h under: $includeRoot" |
| 80 | + } |
| 81 | +
|
| 82 | + $kitVersion = $best.Name |
| 83 | + $windowsSdkDir = $kitsRoot |
| 84 | +
|
| 85 | + Write-Output "Using WindowsTargetPlatformVersion: $kitVersion" |
| 86 | + Write-Output "Using WindowsSdkDir: $windowsSdkDir" |
| 87 | + "WINDOWS_TARGET_PLATFORM_VERSION=$kitVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
| 88 | + "WINDOWS_SDK_DIR=$windowsSdkDir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append |
50 | 89 | |
51 | 90 | - name: Setup .NET |
52 | 91 | uses: actions/setup-dotnet@v4 |
|
65 | 104 | $vddSln = "Virtual Display Driver (HDR)/MTTVDD.sln" |
66 | 105 | if (Test-Path $vddSln) { |
67 | 106 | Write-Output "Found VDD solution: $vddSln" |
68 | | - msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=ARM64 /verbosity:minimal |
| 107 | + msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=ARM64 /p:WindowsSdkDir=$env:WINDOWS_SDK_DIR /p:WindowsTargetPlatformVersion=$env:WINDOWS_TARGET_PLATFORM_VERSION /verbosity:minimal |
69 | 108 | if ($LASTEXITCODE -eq 0) { |
70 | 109 | Write-Output "✅ ARM64 VDD build completed successfully" |
71 | 110 | |
|
99 | 138 | Write-Output "Building ARM64 VAD with validation disabled..." |
100 | 139 | |
101 | 140 | # Build with validation disabled to avoid x86 tool conflicts with ARM64 outputs |
102 | | - msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=ARM64 /p:EnableInfVerif=false /p:RunApiValidator=false /verbosity:minimal |
| 141 | + msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=ARM64 /p:WindowsSdkDir=$env:WINDOWS_SDK_DIR /p:WindowsTargetPlatformVersion=$env:WINDOWS_TARGET_PLATFORM_VERSION /p:EnableInfVerif=false /p:RunApiValidator=false /verbosity:minimal |
103 | 142 | |
104 | 143 | if ($LASTEXITCODE -eq 0) { |
105 | 144 | Write-Output "✅ ARM64 VAD build completed successfully!" |
@@ -127,7 +166,7 @@ jobs: |
127 | 166 | $vddSln = "Virtual Display Driver (HDR)/MTTVDD.sln" |
128 | 167 | if (Test-Path $vddSln) { |
129 | 168 | Write-Output "Found VDD solution: $vddSln" |
130 | | - msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /verbosity:minimal |
| 169 | + msbuild $vddSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /p:WindowsSdkDir=$env:WINDOWS_SDK_DIR /p:WindowsTargetPlatformVersion=$env:WINDOWS_TARGET_PLATFORM_VERSION /verbosity:minimal |
131 | 170 | if ($LASTEXITCODE -eq 0) { |
132 | 171 | Write-Output "✅ x64 VDD build completed successfully" |
133 | 172 | |
@@ -156,7 +195,7 @@ jobs: |
156 | 195 | $vadSln = "Virtual-Audio-Driver (Latest Stable)/VirtualAudioDriver.sln" |
157 | 196 | if (Test-Path $vadSln) { |
158 | 197 | Write-Output "Found VAD solution: $vadSln" |
159 | | - msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /verbosity:minimal |
| 198 | + msbuild $vadSln /p:Configuration=$env:BUILD_CONFIGURATION /p:Platform=x64 /p:WindowsSdkDir=$env:WINDOWS_SDK_DIR /p:WindowsTargetPlatformVersion=$env:WINDOWS_TARGET_PLATFORM_VERSION /verbosity:minimal |
160 | 199 | if ($LASTEXITCODE -eq 0) { |
161 | 200 | Write-Output "✅ x64 VAD build completed successfully" |
162 | 201 | |
@@ -436,7 +475,7 @@ jobs: |
436 | 475 |
|
437 | 476 | # STEP 8: Submit to SignPath |
438 | 477 | - name: "Step 8: Submit to SignPath" |
439 | | - if: github.event.inputs.skip_signing != 'true' && secrets.SIGNPATH_API_TOKEN != '' && vars.SIGNPATH_ORG_ID != '' && vars.SIGNPATH_PROJECT_SLUG != '' && vars.SIGNPATH_POLICY_SLUG != '' && steps.upload_for_signpath.outputs.artifact-id != '' |
| 478 | + if: github.event.inputs.skip_signing != 'true' && steps.upload_for_signpath.outputs.artifact-id != '' |
440 | 479 | id: signpath_request |
441 | 480 | uses: signpath/github-action-submit-signing-request@v1 |
442 | 481 | with: |
|
0 commit comments