Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support SDK version 26100 #52

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ jobs:
strategy:
matrix:
os: [windows-latest, windows-2022, windows-2019]
sdkver: [19041, 26100]
steps:
- uses: actions/checkout@v4
- uses: ./
- uses: ./
with:
winsdk-build-version: 19041
winsdk-build-version: ${{ matrix.sdkver }}
35 changes: 32 additions & 3 deletions externals/install-winsdk.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ $ErrorActionPreference = 'Stop'
# Constants
if ($desktopCPP)
{
$WindowsSDKOptions = @("OptionId.UWPCpp", "OptionId.DesktopCPPx64", "OptionId.DesktopCPPx86", "OptionID.DesktopCPPARM", "OptionID.DesktopCPPARM64")
$WindowsSDKOptions = @("OptionId.UWPCpp", "OptionId.DesktopCPPx64", "OptionId.DesktopCPPx86", "OptionID.DesktopCPPARM64")
# It appears DesktopCPPARM was removed in SDK 26100
if ($buildNumber -lt 26100)
{
$WindowsSDKOptions += "OptionID.DesktopCPPARM"
}
}
else
{
Expand Down Expand Up @@ -234,6 +239,21 @@ function Test-InstallStrongNameHijack
return $false
}

function Dump-Install-Logs
{
param (
[parameter(Mandatory=$true)]
[ValidateNotNullOrEmpty()]
[string] $winsdkTempDir)

foreach($logfile in (Get-ChildItem "$winsdkTempDir\*.log"))
{
Write-Host "::group::Contents of ${logfile}:"
Get-Content $logfile
Write-Host "::endgroup::"
}
}

Write-Host -NoNewline "Checking for installed Windows SDK $WindowsSDKVersion..."
$InstallWindowsSDK = Test-InstallWindowsSDK
if ($InstallWindowsSDK)
Expand Down Expand Up @@ -314,8 +334,17 @@ if ($InstallWindowsSDK)
Write-Host -NoNewLine "Installing WinSDK..."

$setupPath = Join-Path "$isoDrive" "WinSDKSetup.exe"
Start-Process -Wait $setupPath "/features $WindowsSDKOptions /q"
Write-Host "Done"
$setupProcess = (Start-Process -PassThru -Wait $setupPath "/features $WindowsSDKOptions /q")
if ($setupProcess.ExitCode -ne 0)
{
Write-Host "Failed! Exit code: $($setupProcess.ExitCode)"
Dump-Install-Logs $winsdkTempDir
Exit $setupProcess.ExitCode
}
else
{
Write-Host "Done"
}
}
else
{
Expand Down