Skip to content
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
15 changes: 13 additions & 2 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,14 @@
},
"hidden": true
},
{
"name": "XINPUT",
"cacheVariables": {
"BUILD_XAUDIO_WIN10": true,
"BUILD_XINPUT": true
},
"hidden": true
},
{
"name": "GDK",
"cacheVariables": {
Expand Down Expand Up @@ -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" ] },
Expand Down
14 changes: 9 additions & 5 deletions Src/Shaders/CompileShaders.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 39 additions & 6 deletions build/copysourcetree.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -36,7 +39,8 @@ param(
[string]$Destination,
[switch]$Quiet,
[switch]$Overwrite,
[switch]$Clean
[switch]$Clean,
[switch]$AssetsOnly
)

$xcopyFlags = "/Y/S"
Expand All @@ -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"
Expand All @@ -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
}
Expand All @@ -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
Loading