diff --git a/CMakePresets.json b/CMakePresets.json index 1e8f2a28..0093aae5 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -133,6 +133,14 @@ }, "hidden": true }, + { + "name": "XINPUT", + "cacheVariables": { + "BUILD_XAUDIO_WIN10": true, + "BUILD_XINPUT": true + }, + "hidden": true + }, { "name": "GDK", "cacheVariables": { @@ -309,8 +317,11 @@ { "name": "arm64ec-Debug-Redist" , "description": "MSVC for ARM64EC (Debug) with XAudio2Redist", "inherits": [ "base", "ARM64EC", "Debug", "MSVC", "XAudio2Redist", "VCPKG", "X64_ARM64EC" ] }, { "name": "arm64ec-Release-Redist", "description": "MSVC for ARM64EC (Release) with XAudio2Redist", "inherits": [ "base", "ARM64EC", "Release", "MSVC", "XAudio2Redist", "VCPKG", "X64_ARM64EC" ] }, - { "name": "x64-Debug-GDK" , "description": "MSVC for x64 (Debug) with Microsoft GDK", "inherits": [ "base", "x64", "Debug", "MSVC", "GDK" ] }, - { "name": "x64-Release-GDK" , "description": "MSVC for x64 (Release) with Microsoft GDK", "inherits": [ "base", "x64", "Release", "MSVC", "GDK" ] }, + { "name": "x64-Debug-XI" , "description": "MSVC for x64 (Debug) using XINPUT", "inherits": [ "base", "x64", "Debug", "MSVC", "XINPUT" ] }, + { "name": "x64-Release-XI" , "description": "MSVC for x64 (Release) using XINPUT", "inherits": [ "base", "x64", "Release", "MSVC", "XINPUT" ] }, + + { "name": "x64-Debug-GDK" , "description": "MSVC for x64 (Debug) using GameInput", "inherits": [ "base", "x64", "Debug", "MSVC", "GDK" ] }, + { "name": "x64-Release-GDK" , "description": "MSVC for x64 (Release) using GameInput", "inherits": [ "base", "x64", "Release", "MSVC", "GDK" ] }, { "name": "x64-Debug-Scarlett" , "description": "MSVC for x64 (Debug) for Xbox Series X|S", "inherits": [ "base", "x64", "Debug", "MSVC", "Scarlett" ] }, { "name": "x64-Release-Scarlett" , "description": "MSVC for x64 (Release) for Xbox Series X|S", "inherits": [ "base", "x64", "Release", "MSVC", "Scarlett" ] }, diff --git a/DirectXTK_GDK_2019.vcxproj b/DirectXTK_GDK_2019.vcxproj index 84376d7f..e842009d 100644 --- a/DirectXTK_GDK_2019.vcxproj +++ b/DirectXTK_GDK_2019.vcxproj @@ -710,7 +710,7 @@ - + @@ -721,7 +721,7 @@ - + diff --git a/DirectXTK_GDK_2022.vcxproj b/DirectXTK_GDK_2022.vcxproj index 7d32ad9c..688c71a8 100644 --- a/DirectXTK_GDK_2022.vcxproj +++ b/DirectXTK_GDK_2022.vcxproj @@ -710,7 +710,7 @@ - + @@ -721,7 +721,7 @@ - + diff --git a/Src/Shaders/CompileShaders.cmd b/Src/Shaders/CompileShaders.cmd index ae129a24..60eade20 100644 --- a/Src/Shaders/CompileShaders.cmd +++ b/Src/Shaders/CompileShaders.cmd @@ -37,16 +37,20 @@ goto continue set XBOXOPTS=-HV 2021 /D__XBOX_PER_THREAD_SCRATCH_SIZE_LIMIT_IN_BYTES=0 if %2.==scarlett. ( set XBOXPREFIX=XboxGamingScarlett -set XBOXDXC="%GameDKLatest%\GXDK\bin\Scarlett\DXC.exe" +set XBOXDXC="%GameDKXboxLatest%\xbox\bin\gen9\DXC.exe" ) else ( set XBOXPREFIX=XboxGamingXboxOne -set XBOXDXC="%GameDKLatest%\GXDK\bin\XboxOne\DXC.exe" +set XBOXDXC="%GameDKXboxLatest%\xbox\bin\gen8\DXC.exe" ) +if exist %XBOXDXC% goto continue +if %2.==scarlett. ( +set XBOXDXC="%GameDKLatest%\GXDK\bin\Scarlett\DXC.exe" +) else ( +set XBOXDXC="%GameDKLatest%\GXDK\bin\XboxOne\DXC.exe" +) if exist %XBOXDXC% goto continue -set XBOXDXC="%GameDKLatest%\GXDK\bin\DXC.exe" -if not exist %XBOXDXC% goto needgxdk -goto continue +goto needgxdk :continuedxil set DXILOPTS=-HV 2021 diff --git a/build/copysourcetree.ps1 b/build/copysourcetree.ps1 index bf94effd..2af63d3e 100644 --- a/build/copysourcetree.ps1 +++ b/build/copysourcetree.ps1 @@ -19,6 +19,9 @@ Indicates overwrite of existing content if present. .PARAMETER Clean Delete content in the target directory before copying. +.PARAMETER AssetsOnly +Only copy asset files, not source code. + .EXAMPLE copysourcetree.ps1 -Destination D:\temp\abc @@ -36,7 +39,8 @@ param( [string]$Destination, [switch]$Quiet, [switch]$Overwrite, - [switch]$Clean + [switch]$Clean, + [switch]$AssetsOnly ) $xcopyFlags = "/Y/S" @@ -61,10 +65,7 @@ function Copy-Source { "*.cmd", "*.hlsl", "*.hlsli", "*.fx", "*.fxh", "*.sln", "*.vcxproj", "*.vcxproj.filters", - "*.config", "*.mgc", "*.appxmanifest", "*.manifest", - "*.spritefont", "*.bmp", "*.dds", "*.png", "*.jpg", "*.tif", "*.tiff", - "*.sdkmesh*", "*.cmo", "*._obj", "*.mtl", "*.vbo", - "*.wav", "*.xwb" ) + "*.config", "*.mgc", "*.appxmanifest", "*.manifest") $excludefile = Split-Path -Path $PSScriptRoot -Parent $excludefile = Join-Path $excludefile -Child "build" @@ -79,6 +80,32 @@ function Copy-Source { } } +function Copy-Asset { + + param( + [Parameter(Mandatory)] + [string]$Path, + [Parameter(Mandatory)] + [string]$Destination + ) + + $filters = @("*.spritefont", "*.bmp", "*.dds", "*.png", "*.jpg", "*.tif", "*.tiff", + "*.sdkmesh*", "*.cmo", "*._obj", "*.mtl", "*.vbo", + "*.wav", "*.xwb") + + $excludefile = Split-Path -Path $PSScriptRoot -Parent + $excludefile = Join-Path $excludefile -Child "build" + $excludefile = Join-Path $excludefile -Child "copysourcetree.flt" + + $filters | ForEach-Object { + $files = Join-Path -Path $Path -ChildPath $_ + xcopy $xcopyFlags /EXCLUDE:$excludefile $files $Destination + if ($LastExitCode -ne 0) { + Write-Error "Failed copying asset files" -ErrorAction Stop + } + } +} + if (-Not (Test-Path $Destination)) { Write-Error "ERROR: -Destination folder does not exist" -ErrorAction Stop } @@ -105,4 +132,10 @@ $license = Join-Path -Path $sourcedir -ChildPath "LICENSE" Copy-Item $readme -Destination $destdir Copy-Item $license -Destination $destdir -Copy-Source -Path $sourcedir -Destination $destdir + +if (-Not $AssetsOnly) +{ + Copy-Source -Path $sourcedir -Destination $destdir +} + +Copy-Asset -Path $sourcedir -Destination $destdir