From fac49709f21a12b8c0f05f5d25a48234f66d3b3e Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 10 Nov 2025 21:31:32 -0800 Subject: [PATCH 1/9] Update ADO pipeline to use GDK new layouts for 2510 --- .../DirectXTK12-GitHub-GDK-Dev17.yml | 61 ++++----- .../pipelines/DirectXTK12-GitHub-GDK.yml | 21 +++- .../templates/DirectXTK12-setup-auto.yml | 41 ++++++ .gitignore | 1 + build/RestoreGDK.proj | 3 +- build/RestoreGDK.ps1 | 118 ++++++++--------- build/SetupBWOI.cmd | 74 ++++++++++- build/SetupBWOI.targets | 119 ++++++++++++------ build/gdkedition.props | 1 + 9 files changed, 292 insertions(+), 147 deletions(-) create mode 100644 .azuredevops/templates/DirectXTK12-setup-auto.yml diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml index 3ca2e602..cf1242d8 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml @@ -63,7 +63,7 @@ variables: jobs: - job: BUILD_GDK - displayName: 'Microsoft Game Development Kit (GDK Gaming.Desktop.x64)' + displayName: 'Microsoft Game Development Kit (Old layouts)' timeoutInMinutes: 120 cancelTimeoutInMinutes: 1 steps: @@ -99,12 +99,17 @@ jobs: - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - task: PowerShell@2 - displayName: 'NuGet Install GDK' + displayName: 'NuGet Install PC GDK' inputs: targetType: filePath filePath: ./build/RestoreGDK.ps1 arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) failOnStderr: true + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox GDK' + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: CopyFiles@2 displayName: Set up Directory.Build.props inputs: @@ -164,13 +169,7 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - task: PowerShell@2 - displayName: 'NuGet Install GDK' - inputs: - targetType: filePath - filePath: ./build/RestoreGDK.ps1 - arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) - failOnStderr: true + - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' - task: CopyFiles@2 displayName: Set up Directory.Build.props inputs: @@ -229,13 +228,10 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - task: PowerShell@2 - displayName: 'NuGet Install GDK' - inputs: - targetType: filePath - filePath: ./build/RestoreGDK.ps1 - arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) - failOnStderr: true + - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + parameters: + scarlett: true + xboxone: false - task: CmdLine@2 displayName: Setup BWOI for GDK command-line inputs: @@ -346,13 +342,10 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - task: PowerShell@2 - displayName: 'NuGet Install GDK' - inputs: - targetType: filePath - filePath: ./build/RestoreGDK.ps1 - arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) - failOnStderr: true + - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + parameters: + scarlett: false + xboxone: true - task: CmdLine@2 displayName: Setup BWOI for GDK command-line inputs: @@ -469,13 +462,10 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - task: PowerShell@2 - displayName: 'NuGet Install GDK' - inputs: - targetType: filePath - filePath: ./build/RestoreGDK.ps1 - arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) - failOnStderr: true + - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + parameters: + scarlett: false + xboxone: true - task: NuGetCommand@2 displayName: NuGet restore inputs: @@ -566,13 +556,10 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - task: PowerShell@2 - displayName: 'NuGet Install GDK' - inputs: - targetType: filePath - filePath: ./build/RestoreGDK.ps1 - arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) - failOnStderr: true + - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + parameters: + scarlett: true + xboxone: false - task: NuGetCommand@2 displayName: NuGet restore inputs: diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml index 336e0cac..ba8b516d 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml @@ -116,12 +116,17 @@ jobs: - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - task: PowerShell@2 - displayName: 'NuGet Install GDK' + displayName: 'NuGet Install PC GDK' inputs: targetType: filePath filePath: ./build/RestoreGDK.ps1 arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) failOnStderr: true + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox GDK' + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: CopyFiles@2 displayName: Set up Directory.Build.props inputs: @@ -188,12 +193,17 @@ jobs: - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - task: PowerShell@2 - displayName: 'NuGet Install GDK' + displayName: 'NuGet Install PC GDK' inputs: targetType: filePath filePath: ./build/RestoreGDK.ps1 arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) failOnStderr: true + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox GDK' + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 displayName: NuGet restore inputs: @@ -285,12 +295,17 @@ jobs: - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - task: PowerShell@2 - displayName: 'NuGet Install GDK' + displayName: 'NuGet Install PC GDK' inputs: targetType: filePath filePath: ./build/RestoreGDK.ps1 arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) failOnStderr: true + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox GDK' + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 displayName: NuGet restore inputs: diff --git a/.azuredevops/templates/DirectXTK12-setup-auto.yml b/.azuredevops/templates/DirectXTK12-setup-auto.yml new file mode 100644 index 00000000..5c3bcd3d --- /dev/null +++ b/.azuredevops/templates/DirectXTK12-setup-auto.yml @@ -0,0 +1,41 @@ +# Copyright (c) Microsoft Corporation. +# Licensed under the MIT License. +# +# https://go.microsoft.com/fwlink/?LinkID=615561 + +# Template used by GitHub-GDK-* pipelines + +parameters: + - name: 'xboxone' + type: boolean + default: true + - name: 'scarlett' + type: boolean + default: true + +steps: + - task: PowerShell@2 + displayName: 'NuGet Install GDK' + inputs: + targetType: filePath + filePath: ./build/RestoreGDK.ps1 + arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) -AutoLayout + failOnStderr: true + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox Series X|S GDK' + condition: -and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.scarlett, true)) + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox One GDK' + condition: -and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.xboxone, true)) + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + - task: NuGetCommand@2 + displayName: 'NuGet install Xbox GDK' + condition: lt(variables.GDKEditionNumber, '251000') + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' diff --git a/.gitignore b/.gitignore index dd8db156..7b890949 100644 --- a/.gitignore +++ b/.gitignore @@ -29,3 +29,4 @@ Bin /out /CMakeUserPresets.json /build/vcpkg_installed +/build/obj diff --git a/build/RestoreGDK.proj b/build/RestoreGDK.proj index 512d0fc6..22de246d 100644 --- a/build/RestoreGDK.proj +++ b/build/RestoreGDK.proj @@ -14,7 +14,6 @@ x64 - - + diff --git a/build/RestoreGDK.ps1 b/build/RestoreGDK.ps1 index 5f629594..3fba438c 100644 --- a/build/RestoreGDK.ps1 +++ b/build/RestoreGDK.ps1 @@ -1,7 +1,7 @@ <# .SYNOPSIS -Download and extract GDK NuGet based on edition number +Download and extract the 'base' GDK NuGet based on edition number, returning the full version number that can be used to restore other GDK packages in the set. .DESCRIPTION This script determines the NuGet package id to use based on the provided GDK edition number. It makes use of MSBuild PackageReference floating version numbers to do the restore operation. @@ -12,6 +12,12 @@ The GDK edition number in the form of YYMMQQ. .PARAMETER OutputDirectory Directory to write the packages into. Path should not already contain the packages. +.PARAMETER NewLayout +Switch to indicate to use the 'new layout' of GDK packages (October 2025 and later). + +.PARAMETER AutoLayout +Switch to indicate to automatically choose layout style based on edition number. + #> param( @@ -24,9 +30,15 @@ param( Mandatory, Position = 1 )] - [string]$OutputDirectory + [string]$OutputDirectory, + [switch]$NewLayout, + [switch]$AutoLayout ) +if ($NewLayout -and $AutoLayout) { + Write-Error "##[error]Cannot specify both NewLayout and AutoLayout switches" -ErrorAction Stop +} + # Validate output directory if ([string]::IsNullOrEmpty($OutputDirectory)) { Write-Error "##[error]Output Directory is required" -ErrorAction Stop @@ -65,95 +77,75 @@ if (-Not $nuget) { } # Determine NuGet package ID -if ($GDKEditionNumber -ge 241000) { - $PGDK_ID = "Microsoft.GDK.PC" - $GDKX_ID = "Microsoft.GDK.Xbox" -} -else { +if ($GDKEditionNumber -lt 241000) { Write-Error "##[error]Script supports October 2024 or later" -ErrorAction Stop } -# Check that the package isn't already present -$PGDK_DIR = [IO.Path]::Combine($OutputDirectory, $PGDK_ID) -if (Test-Path $PGDK_DIR) { - Write-Error "##[error]PC Package ID already exists!" -ErrorAction Stop +if ($AutoLayout) { + if ($GDKEditionNumber -ge 251000) { + $NewLayout = $true + } + else { + $NewLayout = $false + } +} + +if ($NewLayout) { + if ($GDKEditionNumber -lt 251000) { + Write-Error "##[error]New layout only supported for October 2025 or later" -ErrorAction Stop + } + $GDK_ID = "Microsoft.GDK.Core" +} +else { + $GDK_ID = "Microsoft.GDK.PC" } -$GDKX_DIR = [IO.Path]::Combine($OutputDirectory, $GDKX_ID) -if (Test-Path $GDKX_DIR) { - Write-Error "##[error]Xbox Package ID already exists!" -ErrorAction Stop +# Check that the package isn't already present +$GDK_DIR = [IO.Path]::Combine($OutputDirectory, $GDK_ID) +if (Test-Path $GDK_DIR) { + Write-Error "##[error]NuGet Package ID already exists!" -ErrorAction Stop } # Restore Nuget packages using floating versions $propsfile = [IO.Path]::Combine( $PSScriptRoot , "gdkedition.props") $props = Get-Content -Path $propsfile $props = $props -replace '.+', ("{0}" -f $GDKEditionNumber) +$props = $props -replace '.+', ("{0}" -f $GDK_ID) Set-Content -Path $propsfile -Value $props -$nugetArgs = "restore RestoreGDK.proj -PackageSaveMode nuspec -packagesDirectory `"{0}`"" -f $OutputDirectory.TrimEnd('\') -Write-Host "##[command]nuget $nugetArgs" -$nugetrun = Start-Process -PassThru -Wait -FilePath $nuget.Path -WorkingDirectory $PSScriptRoot -ArgumentList $nugetArgs -NoNewWindow +$args = "restore RestoreGDK.proj -PackageSaveMode nuspec -packagesDirectory `"{0}`"" -f $OutputDirectory.TrimEnd('\') +Write-Host "##[command]nuget $args" +$nugetrun = Start-Process -PassThru -Wait -FilePath $nuget.Path -WorkingDirectory $PSScriptRoot -ArgumentList $args -NoNewWindow if ($nugetrun.ExitCode -gt 0) { Write-Error "##[error]nuget restore failed" -ErrorAction Stop } # Verify expected output of restore -if (-Not (Test-Path $PGDK_DIR)) { - Write-Error "##[error]Missing PC package after restore!" -ErrorAction Stop -} - -if (-Not (Test-Path $GDKX_DIR)) { - Write-Error "##[error]Missing Xbox package after restore!" -ErrorAction Stop +if (-Not (Test-Path $GDK_DIR)) { + Write-Error "##[error]Missing NuGet package after restore!" -ErrorAction Stop } # Reduce path depth removing version folder -$PGDK_VER = Get-ChildItem $PGDK_DIR -if ($PGDK_VER.Count -ne 1) { - Write-Error "##[error]Expected a single directory for the version!" -ErrorAction Stop -} - -$content = Get-ChildItem $PGDK_VER.Fullname -ForEach-Object -InputObject $content { Move-Item $_.Fullname -Destination $PGDK_DIR } -Remove-Item $PGDK_VER.Fullname - -$GDKX_VER = Get-ChildItem $GDKX_DIR -if ($GDKX_VER.Count -ne 1) { +$GDK_VER = Get-ChildItem $GDK_DIR +if ($GDK_VER.Count -ne 1) { Write-Error "##[error]Expected a single directory for the version!" -ErrorAction Stop } -$content = Get-ChildItem $GDKX_VER.Fullname -ForEach-Object -InputObject $content { Move-Item $_.Fullname -Destination $GDKX_DIR } -Remove-Item $GDKX_VER.Fullname +$content = Get-ChildItem $GDK_VER.Fullname +ForEach-Object -InputObject $content { Move-Item $_.Fullname -Destination $GDK_DIR } +Remove-Item $GDK_VER.Fullname -Write-Host ("##[debug]PC Package ID: {0} Version: {1}" -f $PGDK_ID, $PGDK_VER) -Write-Host ("##[debug]Xbox Package ID: {0} Version: {1}" -f $GDKX_ID, $GDKX_VER) +Write-Host ("##[debug]NuGet Package ID: {0} Version: {1}" -f $GDK_ID, $GDK_VER) # Read the nuspec files -$PGDK_NUSPEC = New-Object xml -$PGDK_NUSPEC.PreserveWhitespace = $true -$PGDK_NUSPEC.Load([IO.Path]::Combine($PGDK_DIR, $PGDK_ID + ".nuspec")) - -$GDKX_NUSPEC = New-Object xml -$GDKX_NUSPEC.PreserveWhitespace = $true -$GDKX_NUSPEC.Load([IO.Path]::Combine($GDKX_DIR, $GDKX_ID + ".nuspec")) +$GDK_NUSPEC = New-Object xml +$GDK_NUSPEC.PreserveWhitespace = $true +$GDK_NUSPEC.Load([IO.Path]::Combine($GDK_DIR, $GDK_ID + ".nuspec")) # Log results -Write-Host "##[group]PC Nuget Package nuspec" -Write-host $PGDK_NUSPEC.outerxml -Write-Host "##[endgroup]" - -Write-Host "##[group]Xbox Nuget Package nuspec" -Write-host $GDKX_NUSPEC.outerxml +Write-Host "##[group]NuGet Nuget Package nuspec" +Write-host $GDK_NUSPEC.outerxml Write-Host "##[endgroup]" -$id = $PGDK_NUSPEC.package.metadata.id -Write-Host "##vso[task.setvariable variable=PCNuGetPackage;]$id" - -$id = $GDKX_NUSPEC.package.metadata.id -Write-Host "##vso[task.setvariable variable=XboxNuGetPackage;]$id" - -$ver = $PGDK_NUSPEC.package.metadata.version -Write-Host "##vso[task.setvariable variable=PCNuGetPackageVersion;]$ver" - -$ver = $GDKX_NUSPEC.package.metadata.version -Write-Host "##vso[task.setvariable variable=XboxNuGetPackageVersion;]$ver" +$ver = $GDK_NUSPEC.package.metadata.version +Write-Host "##vso[task.setvariable variable=GDKNuGetPackageVersion;]$ver" diff --git a/build/SetupBWOI.cmd b/build/SetupBWOI.cmd index f50ef7ed..8c8c9f87 100644 --- a/build/SetupBWOI.cmd +++ b/build/SetupBWOI.cmd @@ -13,9 +13,73 @@ goto needconsole set GXDKEDITION=%2 echo GXDKEDITION: %GXDKEDITION% +set CORENUGET=%1\Microsoft.GDK.Core\ +if EXIST %CORENUGET% goto newlayout + set PCNUGET=%1\Microsoft.GDK.PC\ -if NOT EXIST %PCNUGET% goto missingpcnuget +if EXIST %PCNUGET% goto oldlayout + +goto missingpcnuget + +REM Use new layouts (October 2025 GDK and later) +:newlayout + +set GameDK=%CORENUGET%native\bin\ + +if %3.==PC. goto newlayoutpc +if %3.==XboxOne. goto newlayoutxboxone +if %3.==Scarlett. goto newlayoutscarlett +goto needconsole + +:newlayoutpc +set WINDOWSNUGET=%1\Microsoft.GDK.Windows\ +if NOT EXIST %WINDOWSNUGET% goto missingpcnuget + +set GameDKCoreLatest=%WINDOWSNUGET%native\%GXDKEDITION%\ + +set ADDINCLUDE=%GameDKCoreLatest%windows\include +REM arm64? +set ADDBIN=%GameDKCoreLatest%windows\bin\x64;%CORENUGET%native\bin +set ADDLIB=%GameDKCoreLatest%windows\lib\x64 +goto continuenew + +:newlayoutxboxone +set XBOXNUGET=%1\Microsoft.GDK.Xbox.XboxOne\ +if NOT EXIST %XBOXNUGET% goto missingxboxnuget + +set GameDKXboxLatest=%XBOXNUGET%native\%GXDKEDITION%\ + +set ADDINCLUDE=%GameDKXboxLatest%xbox\include\gen8;%GameDKXboxLatest%xbox\include +set ADDBIN=%GameDKXboxLatest%xbox\bin\gen8;%GameDKXboxLatest%xbox\bin\x64;%CORENUGET%native\bin +set ADDLIB=%GameDKXboxLatest%xbox\lib\gen8;%GameDKXboxLatest%xbox\lib\x64 +goto continuenew + +:newlayoutscarlett +set XBOXNUGET=%1\Microsoft.GDK.Xbox.XboxSeriesX_S\ +if NOT EXIST %XBOXNUGET% goto missingxboxnuget + +set GameDKXboxLatest=%XBOXNUGET%native\%GXDKEDITION%\ + +set ADDINCLUDE=%GameDKXboxLatest%xbox\include\gen9;%GameDKXboxLatest%xbox\include +set ADDBIN=%GameDKXboxLatest%xbox\bin\gen9;%GameDKXboxLatest%xbox\bin\x64;%CORENUGET%native\bin +set ADDLIB=%GameDKXboxLatest%xbox\lib\gen9;%GameDKXboxLatest%xbox\lib\x64 +goto continuenew + +:continuenew +echo GameDK: %GameDK% +echo GameDKCoreLatest: %GameDKCoreLatest% +echo GameDKXboxLatest: %GameDKXboxLatest% +echo ADDBIN: %ADDBIN% +echo ADDINCLUDE: %ADDINCLUDE% +echo ADDLIB: %ADDLIB% + +set PATH=%ADDBIN%;%PATH% +set INCLUDE=%INCLUDE%;%ADDINCLUDE% +set LIB=%LIB%;%ADDLIB% +exit /b 0 +REM Use old layouts (pre-October 2025 GDK) +:oldlayout set GRDKLatest=%PCNUGET%native\%GXDKEDITION%\GRDK\ echo GRDKLatest: %GRDKLatest% @@ -33,7 +97,7 @@ set GameDKLatest=%XBOXNUGET%native\%GXDKEDITION%\ set ADDBIN=%GXDKLatest%bin\%3;%PCNUGET%native\bin;%XBOXNUGET%native\bin set ADDINCLUDE=%GXDKLatest%gamekit\include\%3;%GXDKLatest%gamekit\include;%GRDKLatest%gamekit\include set ADDLIB=%GXDKLatest%gamekit\lib\amd64\%3;%GXDKLatest%gamekit\lib\amd64;%GRDKLatest%gamekit\lib\amd64 -goto continue +goto continueold :grdkonly set GameDK=%PCNUGET%native\ @@ -43,7 +107,7 @@ set ADDBIN=%PCNUGET%native\bin set ADDINCLUDE=%GRDKLatest%gamekit\include set ADDLIB=%GRDKLatest%gamekit\lib\amd64 -:continue +:continueold echo GameDK: %GameDK% echo GameDKLatest: %GameDKLatest% echo ADDBIN: %ADDBIN% @@ -68,9 +132,9 @@ echo Usage: This script requires the target type of PC, Scarlett, or XboxOne in exit /b 1 :missingpcnuget -echo ERROR - Cannot find Microsoft.GDK.PC installed at '%1' +echo ERROR - Cannot find Microsoft.GDK.Core/Windows/PC installed at '%1' exit /b 1 :missingxboxnuget -echo ERROR - Cannot find Microsoft.GDK.Xbox installed at '%1' +echo ERROR - Cannot find Microsoft.GDK.Xbox/.XboxOne/.XboxSeriesX_S installed at '%1' exit /b 1 diff --git a/build/SetupBWOI.targets b/build/SetupBWOI.targets index 60d01625..8ba67229 100644 --- a/build/SetupBWOI.targets +++ b/build/SetupBWOI.targets @@ -7,25 +7,11 @@ --> + 999999 C:\xtracted\ $(ExtractedFolder)\ - - <_PCNuGetPackage>Microsoft.PGDK - <_XboxNuGetPackage>Microsoft.GDK - - - - <_PCNuGetPackage>Microsoft.GDK.PC - <_XboxNuGetPackage>Microsoft.GDK.Xbox - - - - <_PCNuGetPackage>$(_PCNuGetPackage).$(GDKEditionNumber) - <_XboxNuGetPackage>$(_XboxNuGetPackage).$(GDKEditionNumber) - - + + + + + + + + + + + + + + + + + + + + + + + + + - - - + + + + - - - + + + + - - + + + + + + + + + + + + <_VSFolder Condition="'$(VisualStudioVersion)' == '17.0'">VS2022 + <_VSFolder Condition="'$(VisualStudioVersion)' == '16.0'">VS2019 + + + @@ -127,10 +159,13 @@ SixtyFourBit = (IntPtr.Size == 8) ? true : false; - - + + + + @@ -140,14 +175,24 @@ SixtyFourBit = (IntPtr.Size == 8) ? true : false; - - + + + + - + + + ;_CreateVCTargetsFolder + ;_CreateVCTargetsFolderOld + + + + diff --git a/build/gdkedition.props b/build/gdkedition.props index 36ae9359..6e7a69dc 100644 --- a/build/gdkedition.props +++ b/build/gdkedition.props @@ -2,5 +2,6 @@ 000000 + Microsoft.GDK.xyz From 7c0240a63f48d77a6cea03f5f873fb2539eccf65 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 10 Nov 2025 21:37:19 -0800 Subject: [PATCH 2/9] Fixes --- .../pipelines/DirectXTK12-GitHub-GDK-Dev17.yml | 14 ++++++++------ ...tup-auto.yml => DirectXTK12-setup-gdk-auto.yml} | 4 ++-- 2 files changed, 10 insertions(+), 8 deletions(-) rename .azuredevops/templates/{DirectXTK12-setup-auto.yml => DirectXTK12-setup-gdk-auto.yml} (88%) diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml index cf1242d8..e8a4b004 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml @@ -21,7 +21,9 @@ pr: paths: include: - '.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml' - - '.azuredevops/pipelines/DirectXTK12-build-gdk.yml' + - '.azuredevops/templates/DirectXTK12-build-gdk.yml' + - '.azuredevops/templates/DirectXTK12-build-gdkx.yml' + - '.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' - CMakeList.txt - build/*.in - build/*.cmake @@ -169,7 +171,7 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' - task: CopyFiles@2 displayName: Set up Directory.Build.props inputs: @@ -228,7 +230,7 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: true xboxone: false @@ -342,7 +344,7 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: false xboxone: true @@ -462,7 +464,7 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: false xboxone: true @@ -556,7 +558,7 @@ jobs: displayName: 'Secure Supply Chain Analysis' - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - - template: '/.azuredevops/templates/DirectXTK12-setup-auto.yml' + - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: true xboxone: false diff --git a/.azuredevops/templates/DirectXTK12-setup-auto.yml b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml similarity index 88% rename from .azuredevops/templates/DirectXTK12-setup-auto.yml rename to .azuredevops/templates/DirectXTK12-setup-gdk-auto.yml index 5c3bcd3d..00239429 100644 --- a/.azuredevops/templates/DirectXTK12-setup-auto.yml +++ b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml @@ -23,13 +23,13 @@ steps: failOnStderr: true - task: NuGetCommand@2 displayName: 'NuGet install Xbox Series X|S GDK' - condition: -and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.scarlett, true)) + condition: and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.scarlett, true)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 displayName: 'NuGet install Xbox One GDK' - condition: -and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.xboxone, true)) + condition: and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.xboxone, true)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' From 4e4ba1c30e5b7f180a74b787690710243225381c Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 10 Nov 2025 21:40:47 -0800 Subject: [PATCH 3/9] Syntax YAML fix --- .azuredevops/templates/DirectXTK12-setup-gdk-auto.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml index 00239429..9b7d5b38 100644 --- a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml +++ b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml @@ -6,10 +6,10 @@ # Template used by GitHub-GDK-* pipelines parameters: - - name: 'xboxone' + - name: xboxone type: boolean default: true - - name: 'scarlett' + - name: scarlett type: boolean default: true @@ -23,13 +23,13 @@ steps: failOnStderr: true - task: NuGetCommand@2 displayName: 'NuGet install Xbox Series X|S GDK' - condition: and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.scarlett, true)) + condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.scarlett }}, true)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 displayName: 'NuGet install Xbox One GDK' - condition: and(ge(variables.GDKEditionNumber, '251000'), eq(parameters.xboxone, true)) + condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.xboxone }}, true)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' From 7d2ba96ac8d6bd97f904febe4dd4b6f9d1a9546d Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 10 Nov 2025 21:56:06 -0800 Subject: [PATCH 4/9] Update build props --- build/Directory.Build.props | 51 ++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 26 deletions(-) diff --git a/build/Directory.Build.props b/build/Directory.Build.props index 330584b7..08164e0b 100644 --- a/build/Directory.Build.props +++ b/build/Directory.Build.props @@ -12,27 +12,11 @@ <_AlternativeVCTargetsPath170>$(ExtractedFolder)VCTargets170\ <_AlternativeVCTargetsPath160>$(ExtractedFolder)VCTargets160\ - <_AlternativeVCTargetsPath150 Condition="'$(GDKEditionNumber)' != '' AND '$(GDKEditionNumber)' < '241000'">$(ExtractedFolder)VCTargets150\ 15.0 - - <_PCNuGetPackage>Microsoft.PGDK - <_XboxNuGetPackage>Microsoft.GDK - - - - <_PCNuGetPackage>Microsoft.GDK.PC - <_XboxNuGetPackage>Microsoft.GDK.Xbox - - - - <_PCNuGetPackage>$(_PCNuGetPackage).$(GDKEditionNumber) - <_XboxNuGetPackage>$(_XboxNuGetPackage).$(GDKEditionNumber) - - @@ -47,11 +31,32 @@ Project="$(ExtractedFolder)Microsoft.Windows.SDK.cpp.arm64\build\native\Microsoft.Windows.SDK.cpp.arm64.props" /> - + + + + + + + + + + + + + + + + + + - + @@ -66,21 +71,18 @@ $(_AlternativeVCTargetsPath160) true - $(_AlternativeVCTargetsPath150) $(_AlternativeVCTargetsPath160) $(_AlternativeVCTargetsPath160) true - $(_AlternativeVCTargetsPath150) $(_AlternativeVCTargetsPath160) $(_AlternativeVCTargetsPath160) true - $(_AlternativeVCTargetsPath150) $(_AlternativeVCTargetsPath160) @@ -91,21 +93,18 @@ --> true - $(_AlternativeVCTargetsPath150) $(_AlternativeVCTargetsPath160) $(_AlternativeVCTargetsPath170) true - $(_AlternativeVCTargetsPath150) $(_AlternativeVCTargetsPath160) $(_AlternativeVCTargetsPath170) true - $(_AlternativeVCTargetsPath150) $(_AlternativeVCTargetsPath160) $(_AlternativeVCTargetsPath170) From fffcd0b3f526eb19021283bc9e7f8b3b7a89f03e Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 11 Nov 2025 09:55:04 -0800 Subject: [PATCH 5/9] New XboxOne and Scarlett NuGets can't be used at same time --- .../DirectXTK12-GitHub-GDK-Dev17.yml | 78 +++++++++++++++++-- .../templates/DirectXTK12-build-gdkx.yml | 10 +++ .../templates/DirectXTK12-setup-gdk-auto.yml | 5 +- 3 files changed, 81 insertions(+), 12 deletions(-) diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml index e8a4b004..ae351afc 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml @@ -65,7 +65,7 @@ variables: jobs: - job: BUILD_GDK - displayName: 'Microsoft Game Development Kit (Old layouts)' + displayName: 'Microsoft Game Development Kit (Gaming.*.x64)' timeoutInMinutes: 120 cancelTimeoutInMinutes: 1 steps: @@ -135,8 +135,8 @@ jobs: msVersion: '17.0' vsYear: 2022 - - job: BUILD_GDKX - displayName: 'Microsoft Game Development Kit (GDK x64)' + - job: BUILD_GDKX_SCAR + displayName: 'Microsoft Game Development Kit (x64+Xbox Series X|S)' timeoutInMinutes: 120 cancelTimeoutInMinutes: 1 steps: @@ -172,6 +172,71 @@ jobs: - task: NuGetAuthenticate@1 displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' + parameters: + scarlett: true + - task: CopyFiles@2 + displayName: Set up Directory.Build.props + inputs: + SourceFolder: build + Contents: 'Directory.Build.props' + TargetFolder: $(Build.SourcesDirectory) + - task: MSBuild@1 + displayName: Setup BWOI VCTargets + inputs: + solution: build/SetupBWOI.targets + msbuildArchitecture: x64 + msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION) + - task: MSBuild@1 + displayName: Log Information + inputs: + solution: build/LogInfo.targets + msbuildArchitecture: x64 + msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION) + - template: '/.azuredevops/templates/DirectXTK12-build-gdkx.yml' + parameters: + msVersion: '17.0' + vsYear: 2022 + xboxone: false + + - job: BUILD_GDKX_XBONE + displayName: 'Microsoft Game Development Kit (x64+Xbox One)' + timeoutInMinutes: 120 + cancelTimeoutInMinutes: 1 + steps: + - checkout: self + clean: true + fetchTags: false + fetchDepth: 1 + - task: NuGetToolInstaller@1 + displayName: 'Use NuGet' + - task: PowerShell@2 + displayName: 'Create nuget.config with single source' + inputs: + targetType: inline + script: | + $xml = @' + + + + + + + '@ + $xml | Set-Content -Path "$(Build.SourcesDirectory)\NuGet.config" + + - task: NuGetCommand@2 + # We have to use a nuget.config to provide the feed for the 'nuget install' option. + displayName: 'NuGet set package source to ADO feed' + inputs: + command: custom + arguments: sources add -Name xboxgdk -Source $(URL_FEED) -ConfigFile $(Build.SourcesDirectory)\NuGet.config + - task: nuget-security-analysis@0 + displayName: 'Secure Supply Chain Analysis' + - task: NuGetAuthenticate@1 + displayName: 'NuGet Auth' + - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' + parameters: + scarlett: false - task: CopyFiles@2 displayName: Set up Directory.Build.props inputs: @@ -194,9 +259,10 @@ jobs: parameters: msVersion: '17.0' vsYear: 2022 + scarlett: false - job: BUILD_GDK_CMAKE_SCAR - displayName: 'Microsoft Game Development Kit (GDK) using CMake (Scarlett)' + displayName: 'Microsoft Game Development Kit (GDK) using CMake (Xbox Series X|S)' timeoutInMinutes: 120 cancelTimeoutInMinutes: 1 steps: @@ -233,7 +299,6 @@ jobs: - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: true - xboxone: false - task: CmdLine@2 displayName: Setup BWOI for GDK command-line inputs: @@ -347,7 +412,6 @@ jobs: - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: false - xboxone: true - task: CmdLine@2 displayName: Setup BWOI for GDK command-line inputs: @@ -467,7 +531,6 @@ jobs: - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: false - xboxone: true - task: NuGetCommand@2 displayName: NuGet restore inputs: @@ -561,7 +624,6 @@ jobs: - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: scarlett: true - xboxone: false - task: NuGetCommand@2 displayName: NuGet restore inputs: diff --git a/.azuredevops/templates/DirectXTK12-build-gdkx.yml b/.azuredevops/templates/DirectXTK12-build-gdkx.yml index e32c8432..cafa4c5e 100644 --- a/.azuredevops/templates/DirectXTK12-build-gdkx.yml +++ b/.azuredevops/templates/DirectXTK12-build-gdkx.yml @@ -14,6 +14,12 @@ parameters: type: number values: - 2022 + - name: scarlett + type: boolean + default: true + - name: xboxone + type: boolean + default: true steps: - task: VSBuild@1 @@ -38,6 +44,7 @@ steps: msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) - task: VSBuild@1 displayName: Build solution DirectXTK_GDKX_${{ parameters.vsYear }} xbdbg + condition: eq(${{ parameters.xboxone }}, true) continueOnError: true inputs: solution: DirectXTK_GDKX_${{ parameters.vsYear }}.sln @@ -48,6 +55,7 @@ steps: msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) - task: VSBuild@1 displayName: Build solution DirectXTK_GDKX_${{ parameters.vsYear }} xbrel + condition: eq(${{ parameters.xboxone }}, true) continueOnError: true inputs: solution: DirectXTK_GDKX_${{ parameters.vsYear }}.sln @@ -58,6 +66,7 @@ steps: msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) - task: VSBuild@1 displayName: Build solution DirectXTK_GDKX_${{ parameters.vsYear }} scardbg + condition: eq(${{ parameters.scarlett }}, true) continueOnError: true inputs: solution: DirectXTK_GDKX_${{ parameters.vsYear }}.sln @@ -68,6 +77,7 @@ steps: msbuildArgs: /p:GDKEditionNumber=$(GDK_EDITION) - task: VSBuild@1 displayName: Build solution DirectXTK_GDKX_${{ parameters.vsYear }} scarrel + condition: eq(${{ parameters.scarlett }}, true) continueOnError: true inputs: solution: DirectXTK_GDKX_${{ parameters.vsYear }}.sln diff --git a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml index 9b7d5b38..86baeccb 100644 --- a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml +++ b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml @@ -6,9 +6,6 @@ # Template used by GitHub-GDK-* pipelines parameters: - - name: xboxone - type: boolean - default: true - name: scarlett type: boolean default: true @@ -29,7 +26,7 @@ steps: arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 displayName: 'NuGet install Xbox One GDK' - condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.xboxone }}, true)) + condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.scarlett }}, false)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' From 8613b904313883be866a9a3866686f7fb11c8404 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 11 Nov 2025 10:39:56 -0800 Subject: [PATCH 6/9] Was missing Microsoft.GDK.Windows --- .../pipelines/DirectXTK12-GitHub-GDK-Dev17.yml | 6 ++++++ .../templates/DirectXTK12-setup-gdk-auto.yml | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml index ae351afc..ef180c20 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml @@ -173,6 +173,7 @@ jobs: displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: + windows: true scarlett: true - task: CopyFiles@2 displayName: Set up Directory.Build.props @@ -236,6 +237,7 @@ jobs: displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: + windows: true scarlett: false - task: CopyFiles@2 displayName: Set up Directory.Build.props @@ -298,6 +300,7 @@ jobs: displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: + windows: false scarlett: true - task: CmdLine@2 displayName: Setup BWOI for GDK command-line @@ -411,6 +414,7 @@ jobs: displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: + windows: false scarlett: false - task: CmdLine@2 displayName: Setup BWOI for GDK command-line @@ -530,6 +534,7 @@ jobs: displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: + windows: false scarlett: false - task: NuGetCommand@2 displayName: NuGet restore @@ -623,6 +628,7 @@ jobs: displayName: 'NuGet Auth' - template: '/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml' parameters: + windows: false scarlett: true - task: NuGetCommand@2 displayName: NuGet restore diff --git a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml index 86baeccb..36191621 100644 --- a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml +++ b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml @@ -6,6 +6,9 @@ # Template used by GitHub-GDK-* pipelines parameters: + - name: windows + type: boolean + default: true - name: scarlett type: boolean default: true @@ -19,19 +22,25 @@ steps: arguments: -GDKEditionNumber $(GDK_EDITION) -OutputDirectory $(EXTRACTED_FOLDER) -AutoLayout failOnStderr: true - task: NuGetCommand@2 - displayName: 'NuGet install Xbox Series X|S GDK' + displayName: 'NuGet install GDK (Windows)' + condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.windows }}, true)) + inputs: + command: custom + arguments: 'install -directdownload Microsoft.GDK.Windows -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + - task: NuGetCommand@2 + displayName: 'NuGet install GDK (Xbox Series X|S)' condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.scarlett }}, true)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 - displayName: 'NuGet install Xbox One GDK' + displayName: 'NuGet install GDK (Xbox One)' condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.scarlett }}, false)) inputs: command: custom arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' - task: NuGetCommand@2 - displayName: 'NuGet install Xbox GDK' + displayName: 'NuGet install GDK (Xbox)' condition: lt(variables.GDKEditionNumber, '251000') inputs: command: custom From 514fc84dd77340c490e7a62431ff8c608b26c1d3 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 11 Nov 2025 10:52:01 -0800 Subject: [PATCH 7/9] Export new variables --- .azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml index ef180c20..5c3c3678 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK-Dev17.yml @@ -314,7 +314,10 @@ jobs: echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64 call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) Scarlett + echo ##vso[task.setvariable variable=GameDK;]%GameDK% echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest% + echo ##vso[task.setvariable variable=GameDKCoreLatest;]%GameDKCoreLatest% + echo ##vso[task.setvariable variable=GameDKXboxLatest;]%GameDKXboxLatest% echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest% echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% @@ -428,7 +431,10 @@ jobs: echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64 echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64 call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) XboxOne + echo ##vso[task.setvariable variable=GameDK;]%GameDK% echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest% + echo ##vso[task.setvariable variable=GameDKCoreLatest;]%GameDKCoreLatest% + echo ##vso[task.setvariable variable=GameDKXboxLatest;]%GameDKXboxLatest% echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest% echo ##vso[task.setvariable variable=GXDKLatest;]%GXDKLatest% echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE% From 86022fd4d694efad369dce1d2d70be7e62eaaa21 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 11 Nov 2025 11:14:15 -0800 Subject: [PATCH 8/9] Clear warning --- .azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml index ba8b516d..a32a4dc7 100644 --- a/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml +++ b/.azuredevops/pipelines/DirectXTK12-GitHub-GDK.yml @@ -221,7 +221,6 @@ jobs: displayName: Setup BWOI VCTargets inputs: solution: build/SetupBWOI.targets - msbuildVersion: 16.0 msbuildArchitecture: x64 msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION) - task: MSBuild@1 @@ -236,7 +235,6 @@ jobs: continueOnError: true inputs: solution: '**\*GDK_2019*.sln' - vsVersion: 16.0 platform: Gaming.Xbox.XboxOne.x64 configuration: Debug msbuildArchitecture: x64 @@ -246,7 +244,6 @@ jobs: continueOnError: true inputs: solution: '**\*GDK_2019*.sln' - vsVersion: 16.0 platform: Gaming.Xbox.XboxOne.x64 configuration: Release msbuildArchitecture: x64 @@ -323,7 +320,6 @@ jobs: displayName: Setup BWOI VCTargets inputs: solution: build/SetupBWOI.targets - msbuildVersion: 16.0 msbuildArchitecture: x64 msbuildArguments: /p:GDKEditionNumber=$(GDK_EDITION) - task: MSBuild@1 @@ -338,7 +334,6 @@ jobs: continueOnError: true inputs: solution: '**\*GDK_2019*.sln' - vsVersion: 16.0 platform: Gaming.Xbox.Scarlett.x64 configuration: Debug msbuildArchitecture: x64 @@ -348,7 +343,6 @@ jobs: continueOnError: true inputs: solution: '**\*GDK_2019*.sln' - vsVersion: 16.0 platform: Gaming.Xbox.Scarlett.x64 configuration: Release msbuildArchitecture: x64 From 5007c3bdd48ead0326326b6dd2bdba5c887c88ab Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Tue, 11 Nov 2025 17:48:57 -0800 Subject: [PATCH 9/9] Pick lint --- .../templates/DirectXTK12-setup-gdk-auto.yml | 16 ++++++++++++---- build/RestoreGDK.ps1 | 6 +++--- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml index 36191621..e8ea7362 100644 --- a/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml +++ b/.azuredevops/templates/DirectXTK12-setup-gdk-auto.yml @@ -26,22 +26,30 @@ steps: condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.windows }}, true)) inputs: command: custom - arguments: 'install -directdownload Microsoft.GDK.Windows -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + arguments: > + install -directdownload Microsoft.GDK.Windows -ExcludeVersion -Version $(GDKNuGetPackageVersion) + -OutputDirectory $(EXTRACTED_FOLDER) - task: NuGetCommand@2 displayName: 'NuGet install GDK (Xbox Series X|S)' condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.scarlett }}, true)) inputs: command: custom - arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + arguments: > + install -directdownload Microsoft.GDK.Xbox.XboxSeriesX_S -ExcludeVersion -Version $(GDKNuGetPackageVersion) + -OutputDirectory $(EXTRACTED_FOLDER) - task: NuGetCommand@2 displayName: 'NuGet install GDK (Xbox One)' condition: and(ge(variables.GDKEditionNumber, '251000'), eq(${{ parameters.scarlett }}, false)) inputs: command: custom - arguments: 'install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + arguments: > + install -directdownload Microsoft.GDK.Xbox.XboxOne -ExcludeVersion -Version $(GDKNuGetPackageVersion) + -OutputDirectory $(EXTRACTED_FOLDER) - task: NuGetCommand@2 displayName: 'NuGet install GDK (Xbox)' condition: lt(variables.GDKEditionNumber, '251000') inputs: command: custom - arguments: 'install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) -OutputDirectory $(EXTRACTED_FOLDER)' + arguments: > + install -directdownload Microsoft.GDK.Xbox -ExcludeVersion -Version $(GDKNuGetPackageVersion) + -OutputDirectory $(EXTRACTED_FOLDER) diff --git a/build/RestoreGDK.ps1 b/build/RestoreGDK.ps1 index 3fba438c..8a3ee954 100644 --- a/build/RestoreGDK.ps1 +++ b/build/RestoreGDK.ps1 @@ -113,9 +113,9 @@ $props = $props -replace '.+', (".+', ("{0}" -f $GDK_ID) Set-Content -Path $propsfile -Value $props -$args = "restore RestoreGDK.proj -PackageSaveMode nuspec -packagesDirectory `"{0}`"" -f $OutputDirectory.TrimEnd('\') -Write-Host "##[command]nuget $args" -$nugetrun = Start-Process -PassThru -Wait -FilePath $nuget.Path -WorkingDirectory $PSScriptRoot -ArgumentList $args -NoNewWindow +$nugetArgs = "restore RestoreGDK.proj -PackageSaveMode nuspec -packagesDirectory `"{0}`"" -f $OutputDirectory.TrimEnd('\') +Write-Host "##[command]nuget $nugetArgs" +$nugetrun = Start-Process -PassThru -Wait -FilePath $nuget.Path -WorkingDirectory $PSScriptRoot -ArgumentList $nugetArgs -NoNewWindow if ($nugetrun.ExitCode -gt 0) { Write-Error "##[error]nuget restore failed" -ErrorAction Stop }