diff --git a/Binaries/Debug/LightPixelShader.cso b/Binaries/Debug/LightPixelShader.cso
index cd0b73c..6e1f025 100644
Binary files a/Binaries/Debug/LightPixelShader.cso and b/Binaries/Debug/LightPixelShader.cso differ
diff --git a/Binaries/Debug/LightVertexShader.cso b/Binaries/Debug/LightVertexShader.cso
index ab9fbd9..6869217 100644
Binary files a/Binaries/Debug/LightVertexShader.cso and b/Binaries/Debug/LightVertexShader.cso differ
diff --git a/Binaries/Debug/MyD3DFramework.exe b/Binaries/Debug/MyD3DFramework.exe
index e77d08a..70bbadb 100644
Binary files a/Binaries/Debug/MyD3DFramework.exe and b/Binaries/Debug/MyD3DFramework.exe differ
diff --git a/Binaries/Debug/SimplePixelShader.cso b/Binaries/Debug/SimplePixelShader.cso
index d0e307b..7e2dfb9 100644
Binary files a/Binaries/Debug/SimplePixelShader.cso and b/Binaries/Debug/SimplePixelShader.cso differ
diff --git a/Binaries/Debug/SimpleVertexShader.cso b/Binaries/Debug/SimpleVertexShader.cso
index 8f63213..0d49b0e 100644
Binary files a/Binaries/Debug/SimpleVertexShader.cso and b/Binaries/Debug/SimpleVertexShader.cso differ
diff --git a/DirectXTK/.github/workflows/codeql.yml b/DirectXTK/.github/workflows/codeql.yml
index a1dfdb9..7f7f4c1 100644
--- a/DirectXTK/.github/workflows/codeql.yml
+++ b/DirectXTK/.github/workflows/codeql.yml
@@ -44,7 +44,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- if: matrix.language == 'c-cpp'
name: 'Install Ninja'
@@ -53,7 +53,7 @@ jobs:
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Initialize CodeQL
- uses: github/codeql-action/init@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
+ uses: github/codeql-action/init@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
with:
languages: ${{ matrix.language }}
build-mode: manual
@@ -74,6 +74,6 @@ jobs:
run: msbuild MakeSpriteFont.csproj /p:Configuration=Debug /p:Platform=AnyCPU
- name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
+ uses: github/codeql-action/analyze@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
with:
category: "/language:${{ matrix.language }}"
diff --git a/DirectXTK/.github/workflows/main.yml b/DirectXTK/.github/workflows/main.yml
index ff7ad3b..afdac7c 100644
--- a/DirectXTK/.github/workflows/main.yml
+++ b/DirectXTK/.github/workflows/main.yml
@@ -74,7 +74,7 @@ jobs:
arch: amd64_arm64
steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: 'Install Ninja'
run: choco install ninja
diff --git a/DirectXTK/.github/workflows/msbuild.yml b/DirectXTK/.github/workflows/msbuild.yml
index ccc5130..ff57d6d 100644
--- a/DirectXTK/.github/workflows/msbuild.yml
+++ b/DirectXTK/.github/workflows/msbuild.yml
@@ -32,7 +32,7 @@ jobs:
platform: [x86, x64, ARM64]
steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Add MSBuild to PATH
uses: microsoft/setup-msbuild@6fb02220983dee41ce7ae257b6f4d8f9bf5ed4ce # v2.0.0
diff --git a/DirectXTK/.github/workflows/msvc.yml b/DirectXTK/.github/workflows/msvc.yml
index 7950146..a7290c7 100644
--- a/DirectXTK/.github/workflows/msvc.yml
+++ b/DirectXTK/.github/workflows/msvc.yml
@@ -37,7 +37,7 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
with:
@@ -64,6 +64,6 @@ jobs:
# Upload SARIF file to GitHub Code Scanning Alerts
- name: Upload SARIF to GitHub
- uses: github/codeql-action/upload-sarif@4dd16135b69a43b6c8efb853346f8437d92d3c93 # v3.26.6
+ uses: github/codeql-action/upload-sarif@461ef6c76dfe95d5c364de2f431ddbd31a417628 # v3.26.9
with:
sarif_file: ${{ steps.run-analysis.outputs.sarif }}
diff --git a/DirectXTK/.github/workflows/test.yml b/DirectXTK/.github/workflows/test.yml
index 7d25e3e..b5fbcdd 100644
--- a/DirectXTK/.github/workflows/test.yml
+++ b/DirectXTK/.github/workflows/test.yml
@@ -75,10 +75,10 @@ jobs:
arch: amd64_arm64
steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: Clone test repository
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
repository: walbourn/directxtktest
path: Tests
diff --git a/DirectXTK/.github/workflows/vcpkg.yml b/DirectXTK/.github/workflows/vcpkg.yml
index 6838ed0..0f8c5e5 100644
--- a/DirectXTK/.github/workflows/vcpkg.yml
+++ b/DirectXTK/.github/workflows/vcpkg.yml
@@ -41,7 +41,7 @@ jobs:
arch: amd64_arm64
steps:
- - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
+ - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
- name: 'Install Ninja'
run: choco install ninja
diff --git a/DirectXTK/CMakeLists.txt b/DirectXTK/CMakeLists.txt
index 61f07d3..bb6724e 100644
--- a/DirectXTK/CMakeLists.txt
+++ b/DirectXTK/CMakeLists.txt
@@ -86,6 +86,7 @@ set(LIBRARY_SOURCES
Src/BasicEffect.cpp
Src/BasicPostProcess.cpp
Src/BufferHelpers.cpp
+ Src/CMO.h
Src/CommonStates.cpp
Src/DDSTextureLoader.cpp
Src/DebugEffect.cpp
@@ -367,6 +368,7 @@ if(BUILD_TOOLS AND WIN32)
xwbtool/xwbtool.cpp
xwbtool/xwbtool.rc
xwbtool/settings.manifest
+ xwbtool/CmdLineHelpers.h
Audio/WAVFileReader.cpp
Audio/WAVFileReader.h)
target_compile_features(xwbtool PRIVATE cxx_std_17)
@@ -381,6 +383,10 @@ if(directxmath_FOUND)
endforeach()
endif()
+if(TOOL_EXES)
+ message(STATUS "Building tools: ${TOOL_EXES}")
+endif()
+
# Model uses dynamic_cast, so we need /GR (Enable RTTI)
if(MSVC)
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
@@ -428,6 +434,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "Intel")
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14)
elseif(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
if(ENABLE_CODE_ANALYSIS)
+ message(STATUS "Building with Code Analysis (PREFIX)")
foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME})
target_compile_options(${t} PRIVATE /analyze /WX)
endforeach()
diff --git a/DirectXTK/CMakePresets.json b/DirectXTK/CMakePresets.json
index 5cc2aa9..9eeca50 100644
--- a/DirectXTK/CMakePresets.json
+++ b/DirectXTK/CMakePresets.json
@@ -294,7 +294,9 @@
{ "name": "x64-Debug-ICX" , "description": "Intel oneAPI Compiler (Debug) for Windows 8", "inherits": [ "base", "x64", "Debug", "IntelLLVM" ] },
{ "name": "x64-Release-ICX" , "description": "Intel oneAPI Compiler (Release) for Windows 8", "inherits": [ "base", "x64", "Release", "IntelLLVM" ] },
- { "name": "x64-Fuzzing" , "description": "MSVC for x64 (Release) with ASan", "inherits": [ "base", "x64", "Release", "MSVC", "Win10", "Fuzzing" ] }
+ { "name": "x64-Fuzzing" , "description": "MSVC for x64 (Release) with ASan", "inherits": [ "base", "x64", "Release", "MSVC", "Win10", "Fuzzing" ] },
+ { "name": "x64-Analyze" , "description": "MSVC for x64 (Debug) for Windows 8 using /analyze", "inherits": [ "base", "x64", "Debug", "MSVC" ], "cacheVariables": { "ENABLE_CODE_ANALYSIS": true } },
+ { "name": "x64-Analyze-Win10" , "description": "MSVC for x64 (Debug) for Windows 10 using /analyze", "inherits": [ "base", "x64", "Debug", "MSVC", "Win10" ], "cacheVariables": { "ENABLE_CODE_ANALYSIS": true } }
],
"testPresets": [
{ "name": "x64-Debug" , "configurePreset": "x64-Debug" },
diff --git a/DirectXTK/DirectXTK_Desktop_2019.vcxproj b/DirectXTK/DirectXTK_Desktop_2019.vcxproj
index b640aae..5fcac91 100644
--- a/DirectXTK/DirectXTK_Desktop_2019.vcxproj
+++ b/DirectXTK/DirectXTK_Desktop_2019.vcxproj
@@ -42,6 +42,7 @@
+
diff --git a/DirectXTK/DirectXTK_Desktop_2019.vcxproj.filters b/DirectXTK/DirectXTK_Desktop_2019.vcxproj.filters
index ccd54fe..0c8732b 100644
--- a/DirectXTK/DirectXTK_Desktop_2019.vcxproj.filters
+++ b/DirectXTK/DirectXTK_Desktop_2019.vcxproj.filters
@@ -120,6 +120,9 @@
Inc
+
+ Src\Shared
+
diff --git a/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj b/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj
index 45425d4..5102994 100644
--- a/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj
+++ b/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj
@@ -54,6 +54,7 @@
+
diff --git a/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj.filters b/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj.filters
index aad1757..3eead7e 100644
--- a/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj.filters
+++ b/DirectXTK/DirectXTK_Desktop_2019_Win10.vcxproj.filters
@@ -135,6 +135,9 @@
Inc
+
+ Src\Shared
+
diff --git a/DirectXTK/DirectXTK_Desktop_2022.vcxproj b/DirectXTK/DirectXTK_Desktop_2022.vcxproj
index 20df2e9..d1bc9c7 100644
--- a/DirectXTK/DirectXTK_Desktop_2022.vcxproj
+++ b/DirectXTK/DirectXTK_Desktop_2022.vcxproj
@@ -42,6 +42,7 @@
+
diff --git a/DirectXTK/DirectXTK_Desktop_2022.vcxproj.filters b/DirectXTK/DirectXTK_Desktop_2022.vcxproj.filters
index ccd54fe..0c8732b 100644
--- a/DirectXTK/DirectXTK_Desktop_2022.vcxproj.filters
+++ b/DirectXTK/DirectXTK_Desktop_2022.vcxproj.filters
@@ -120,6 +120,9 @@
Inc
+
+ Src\Shared
+
diff --git a/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj b/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj
index 0aa9da3..d73fda6 100644
--- a/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj
+++ b/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj
@@ -54,6 +54,7 @@
+
diff --git a/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj.filters b/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj.filters
index aad1757..3eead7e 100644
--- a/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj.filters
+++ b/DirectXTK/DirectXTK_Desktop_2022_Win10.vcxproj.filters
@@ -135,6 +135,9 @@
Inc
+
+ Src\Shared
+
diff --git a/DirectXTK/DirectXTK_GDK_2019.vcxproj b/DirectXTK/DirectXTK_GDK_2019.vcxproj
index d4f8907..e0eec53 100644
--- a/DirectXTK/DirectXTK_GDK_2019.vcxproj
+++ b/DirectXTK/DirectXTK_GDK_2019.vcxproj
@@ -199,6 +199,7 @@
+
@@ -321,4 +322,4 @@
-
+
\ No newline at end of file
diff --git a/DirectXTK/DirectXTK_GDK_2019.vcxproj.filters b/DirectXTK/DirectXTK_GDK_2019.vcxproj.filters
index 2af9a6b..f3b9fda 100644
--- a/DirectXTK/DirectXTK_GDK_2019.vcxproj.filters
+++ b/DirectXTK/DirectXTK_GDK_2019.vcxproj.filters
@@ -137,6 +137,9 @@
Inc
+
+ Src\Shared
+
@@ -280,6 +283,9 @@
Src
+
+ Audio
+
diff --git a/DirectXTK/DirectXTK_GDK_2022.vcxproj b/DirectXTK/DirectXTK_GDK_2022.vcxproj
index bba1cff..69cac35 100644
--- a/DirectXTK/DirectXTK_GDK_2022.vcxproj
+++ b/DirectXTK/DirectXTK_GDK_2022.vcxproj
@@ -199,6 +199,7 @@
+
diff --git a/DirectXTK/DirectXTK_GDK_2022.vcxproj.filters b/DirectXTK/DirectXTK_GDK_2022.vcxproj.filters
index 8b7bb34..f3b9fda 100644
--- a/DirectXTK/DirectXTK_GDK_2022.vcxproj.filters
+++ b/DirectXTK/DirectXTK_GDK_2022.vcxproj.filters
@@ -137,6 +137,9 @@
Inc
+
+ Src\Shared
+
@@ -281,7 +284,7 @@
Src
- Src
+ Audio
diff --git a/DirectXTK/DirectXTK_Windows10_2022.vcxproj b/DirectXTK/DirectXTK_Windows10_2022.vcxproj
index cdf2b5b..699f868 100644
--- a/DirectXTK/DirectXTK_Windows10_2022.vcxproj
+++ b/DirectXTK/DirectXTK_Windows10_2022.vcxproj
@@ -53,6 +53,7 @@
+
diff --git a/DirectXTK/DirectXTK_Windows10_2022.vcxproj.filters b/DirectXTK/DirectXTK_Windows10_2022.vcxproj.filters
index 1a30b58..e875551 100644
--- a/DirectXTK/DirectXTK_Windows10_2022.vcxproj.filters
+++ b/DirectXTK/DirectXTK_Windows10_2022.vcxproj.filters
@@ -132,6 +132,9 @@
Inc
+
+ Src\Shared
+
diff --git a/DirectXTK/Inc/Effects.h b/DirectXTK/Inc/Effects.h
index f9161da..811d0a1 100644
--- a/DirectXTK/Inc/Effects.h
+++ b/DirectXTK/Inc/Effects.h
@@ -929,7 +929,7 @@ namespace DirectX
void __cdecl SetDirectory(_In_opt_z_ const wchar_t* path) noexcept;
- // Property.
+ // Properties.
ID3D11Device* GetDevice() const noexcept;
private:
@@ -967,7 +967,7 @@ namespace DirectX
void __cdecl SetDirectory(_In_opt_z_ const wchar_t* path) noexcept;
- // Property.
+ // Properties.
ID3D11Device* GetDevice() const noexcept;
private:
@@ -1025,7 +1025,7 @@ namespace DirectX
void __cdecl SetDirectory(_In_opt_z_ const wchar_t* path) noexcept;
- // Property.
+ // Properties.
ID3D11Device* GetDevice() const noexcept;
private:
diff --git a/DirectXTK/Inc/PostProcess.h b/DirectXTK/Inc/PostProcess.h
index 8cccb82..0e91f4a 100644
--- a/DirectXTK/Inc/PostProcess.h
+++ b/DirectXTK/Inc/PostProcess.h
@@ -81,7 +81,7 @@ namespace DirectX
// Shader control
void __cdecl SetEffect(Effect fx);
- // Property
+ // Properties
void __cdecl SetSourceTexture(_In_opt_ ID3D11ShaderResourceView* value);
// Sets multiplier for GaussianBlur_5x5
@@ -130,7 +130,7 @@ namespace DirectX
// Shader control
void __cdecl SetEffect(Effect fx);
- // Property
+ // Properties
void __cdecl SetSourceTexture(_In_opt_ ID3D11ShaderResourceView* value);
void __cdecl SetSourceTexture2(_In_opt_ ID3D11ShaderResourceView* value);
@@ -204,7 +204,7 @@ namespace DirectX
void __cdecl SetMRTOutput(bool value = true);
#endif
- // Property
+ // Properties
void __cdecl SetHDRSourceTexture(_In_opt_ ID3D11ShaderResourceView* value);
// Sets the Color Rotation Transform for HDR10 signal output
diff --git a/DirectXTK/Inc/SimpleMath.h b/DirectXTK/Inc/SimpleMath.h
index 56a16ea..37381bb 100644
--- a/DirectXTK/Inc/SimpleMath.h
+++ b/DirectXTK/Inc/SimpleMath.h
@@ -527,7 +527,7 @@ namespace DirectX
Matrix operator+ () const noexcept { return *this; }
Matrix operator- () const noexcept;
- // Property
+ // Properties
Vector3 Up() const noexcept { return Vector3(_21, _22, _23); }
void Up(const Vector3& v) noexcept { _21 = v.x; _22 = v.y; _23 = v.z; }
@@ -656,7 +656,7 @@ namespace DirectX
// Assignment operators
Plane& operator= (const XMVECTORF32& F) noexcept { x = F.f[0]; y = F.f[1]; z = F.f[2]; w = F.f[3]; return *this; }
- // Property
+ // Properties
Vector3 Normal() const noexcept { return Vector3(x, y, z); }
void Normal(const Vector3& normal) noexcept { x = normal.x; y = normal.y; z = normal.z; }
@@ -824,7 +824,7 @@ namespace DirectX
Color operator+ () const noexcept { return *this; }
Color operator- () const noexcept;
- // Property
+ // Properties
float R() const noexcept { return x; }
void R(float r) noexcept { x = r; }
diff --git a/DirectXTK/Src/BasicPostProcess.cpp b/DirectXTK/Src/BasicPostProcess.cpp
index 8439bcf..1e9b608 100644
--- a/DirectXTK/Src/BasicPostProcess.cpp
+++ b/DirectXTK/Src/BasicPostProcess.cpp
@@ -526,7 +526,7 @@ void BasicPostProcess::SetEffect(Effect fx)
}
-// Property
+// Properties
void BasicPostProcess::SetSourceTexture(_In_opt_ ID3D11ShaderResourceView* value)
{
pImpl->texture = value;
diff --git a/DirectXTK/Src/CMO.h b/DirectXTK/Src/CMO.h
new file mode 100644
index 0000000..c40151a
--- /dev/null
+++ b/DirectXTK/Src/CMO.h
@@ -0,0 +1,181 @@
+//--------------------------------------------------------------------------------------
+// File: CMO.h
+//
+// .CMO files are built by Visual Studio's MeshContentTask and an example renderer was
+// provided in the VS Direct3D Starter Kit
+// https://devblogs.microsoft.com/cppblog/developing-an-app-with-the-visual-studio-3d-starter-kit-part-1-of-3/
+// https://devblogs.microsoft.com/cppblog/developing-an-app-with-the-visual-studio-3d-starter-kit-part-2-of-3/
+// https://devblogs.microsoft.com/cppblog/developing-an-app-with-the-visual-studio-3d-starter-kit-part-3-of-3/
+//
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+//
+// http://go.microsoft.com/fwlink/?LinkId=248929
+// http://go.microsoft.com/fwlink/?LinkID=615561
+//--------------------------------------------------------------------------------------
+
+#pragma once
+
+#include
+
+#include
+
+
+namespace VSD3DStarter
+{
+ // .CMO files
+
+ // UINT - Mesh count
+ // { [Mesh count]
+ // UINT - Length of name
+ // wchar_t[] - Name of mesh (if length > 0)
+ // UINT - Material count
+ // { [Material count]
+ // UINT - Length of material name
+ // wchar_t[] - Name of material (if length > 0)
+ // Material structure
+ // UINT - Length of pixel shader name
+ // wchar_t[] - Name of pixel shader (if length > 0)
+ // { [8]
+ // UINT - Length of texture name
+ // wchar_t[] - Name of texture (if length > 0)
+ // }
+ // }
+ // BYTE - 1 if there is skeletal animation data present
+ // UINT - SubMesh count
+ // { [SubMesh count]
+ // SubMesh structure
+ // }
+ // UINT - IB Count
+ // { [IB Count]
+ // UINT - Number of USHORTs in IB
+ // USHORT[] - Array of indices
+ // }
+ // UINT - VB Count
+ // { [VB Count]
+ // UINT - Number of verts in VB
+ // Vertex[] - Array of vertices
+ // }
+ // UINT - Skinning VB Count
+ // { [Skinning VB Count]
+ // UINT - Number of verts in Skinning VB
+ // SkinningVertex[] - Array of skinning verts
+ // }
+ // MeshExtents structure
+ // [If skeleton animation data is not present, file ends here]
+ // UINT - Bone count
+ // { [Bone count]
+ // UINT - Length of bone name
+ // wchar_t[] - Bone name (if length > 0)
+ // Bone structure
+ // }
+ // UINT - Animation clip count
+ // { [Animation clip count]
+ // UINT - Length of clip name
+ // wchar_t[] - Clip name (if length > 0)
+ // float - Start time
+ // float - End time
+ // UINT - Keyframe count
+ // { [Keyframe count]
+ // Keyframe structure
+ // }
+ // }
+ // }
+
+#pragma pack(push,1)
+
+ struct Material
+ {
+ DirectX::XMFLOAT4 Ambient;
+ DirectX::XMFLOAT4 Diffuse;
+ DirectX::XMFLOAT4 Specular;
+ float SpecularPower;
+ DirectX::XMFLOAT4 Emissive;
+ DirectX::XMFLOAT4X4 UVTransform;
+ };
+
+ constexpr uint32_t MAX_TEXTURE = 8;
+
+ struct SubMesh
+ {
+ uint32_t MaterialIndex;
+ uint32_t IndexBufferIndex;
+ uint32_t VertexBufferIndex;
+ uint32_t StartIndex;
+ uint32_t PrimCount;
+ };
+
+ constexpr uint32_t NUM_BONE_INFLUENCES = 4;
+
+ // Vertex struct for Visual Studio Shader Designer (DGSL) holding position, normal,
+ // tangent, color (RGBA), and texture mapping information
+ struct VertexPositionNormalTangentColorTexture
+ {
+ DirectX::XMFLOAT3 position;
+ DirectX::XMFLOAT3 normal;
+ DirectX::XMFLOAT4 tangent;
+ uint32_t color;
+ DirectX::XMFLOAT2 textureCoordinate;
+ };
+
+ struct SkinningVertex
+ {
+ uint32_t boneIndex[NUM_BONE_INFLUENCES];
+ float boneWeight[NUM_BONE_INFLUENCES];
+ };
+
+ struct MeshExtents
+ {
+ float CenterX, CenterY, CenterZ;
+ float Radius;
+
+ float MinX, MinY, MinZ;
+ float MaxX, MaxY, MaxZ;
+ };
+
+ struct Bone
+ {
+ int32_t ParentIndex;
+ DirectX::XMFLOAT4X4 InvBindPos;
+ DirectX::XMFLOAT4X4 BindPos;
+ DirectX::XMFLOAT4X4 LocalTransform;
+ };
+
+ struct Clip
+ {
+ float StartTime;
+ float EndTime;
+ uint32_t keys;
+ };
+
+ struct Keyframe
+ {
+ uint32_t BoneIndex;
+ float Time;
+ DirectX::XMFLOAT4X4 Transform;
+ };
+
+#pragma pack(pop)
+
+ const Material s_defMaterial =
+ {
+ { 0.2f, 0.2f, 0.2f, 1.f },
+ { 0.8f, 0.8f, 0.8f, 1.f },
+ { 0.0f, 0.0f, 0.0f, 1.f },
+ 1.f,
+ { 0.0f, 0.0f, 0.0f, 1.0f },
+ { 1.f, 0.f, 0.f, 0.f,
+ 0.f, 1.f, 0.f, 0.f,
+ 0.f, 0.f, 1.f, 0.f,
+ 0.f, 0.f, 0.f, 1.f },
+ };
+} // namespace
+
+static_assert(sizeof(VSD3DStarter::Material) == 132, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::SubMesh) == 20, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::VertexPositionNormalTangentColorTexture) == 52, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::SkinningVertex) == 32, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::MeshExtents) == 40, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::Bone) == 196, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::Clip) == 12, "CMO Mesh structure size incorrect");
+static_assert(sizeof(VSD3DStarter::Keyframe) == 72, "CMO Mesh structure size incorrect");
diff --git a/DirectXTK/Src/DualPostProcess.cpp b/DirectXTK/Src/DualPostProcess.cpp
index 8786490..03cab6f 100644
--- a/DirectXTK/Src/DualPostProcess.cpp
+++ b/DirectXTK/Src/DualPostProcess.cpp
@@ -312,7 +312,7 @@ void DualPostProcess::SetEffect(Effect fx)
}
-// Property
+// Properties
void DualPostProcess::SetSourceTexture(_In_opt_ ID3D11ShaderResourceView* value)
{
pImpl->texture = value;
diff --git a/DirectXTK/Src/ModelLoadCMO.cpp b/DirectXTK/Src/ModelLoadCMO.cpp
index 4f81fa7..84f6dd0 100644
--- a/DirectXTK/Src/ModelLoadCMO.cpp
+++ b/DirectXTK/Src/ModelLoadCMO.cpp
@@ -18,163 +18,10 @@
using namespace DirectX;
using Microsoft::WRL::ComPtr;
+#include "CMO.h"
-//--------------------------------------------------------------------------------------
-// .CMO files are built by Visual Studio's MeshContentTask and an example renderer was
-// provided in the VS Direct3D Starter Kit
-// https://devblogs.microsoft.com/cppblog/developing-an-app-with-the-visual-studio-3d-starter-kit-part-1-of-3/
-// https://devblogs.microsoft.com/cppblog/developing-an-app-with-the-visual-studio-3d-starter-kit-part-2-of-3/
-// https://devblogs.microsoft.com/cppblog/developing-an-app-with-the-visual-studio-3d-starter-kit-part-3-of-3/
-//--------------------------------------------------------------------------------------
-
-namespace VSD3DStarter
-{
- // .CMO files
-
- // UINT - Mesh count
- // { [Mesh count]
- // UINT - Length of name
- // wchar_t[] - Name of mesh (if length > 0)
- // UINT - Material count
- // { [Material count]
- // UINT - Length of material name
- // wchar_t[] - Name of material (if length > 0)
- // Material structure
- // UINT - Length of pixel shader name
- // wchar_t[] - Name of pixel shader (if length > 0)
- // { [8]
- // UINT - Length of texture name
- // wchar_t[] - Name of texture (if length > 0)
- // }
- // }
- // BYTE - 1 if there is skeletal animation data present
- // UINT - SubMesh count
- // { [SubMesh count]
- // SubMesh structure
- // }
- // UINT - IB Count
- // { [IB Count]
- // UINT - Number of USHORTs in IB
- // USHORT[] - Array of indices
- // }
- // UINT - VB Count
- // { [VB Count]
- // UINT - Number of verts in VB
- // Vertex[] - Array of vertices
- // }
- // UINT - Skinning VB Count
- // { [Skinning VB Count]
- // UINT - Number of verts in Skinning VB
- // SkinningVertex[] - Array of skinning verts
- // }
- // MeshExtents structure
- // [If skeleton animation data is not present, file ends here]
- // UINT - Bone count
- // { [Bone count]
- // UINT - Length of bone name
- // wchar_t[] - Bone name (if length > 0)
- // Bone structure
- // }
- // UINT - Animation clip count
- // { [Animation clip count]
- // UINT - Length of clip name
- // wchar_t[] - Clip name (if length > 0)
- // float - Start time
- // float - End time
- // UINT - Keyframe count
- // { [Keyframe count]
- // Keyframe structure
- // }
- // }
- // }
-
-#pragma pack(push,1)
-
- struct Material
- {
- DirectX::XMFLOAT4 Ambient;
- DirectX::XMFLOAT4 Diffuse;
- DirectX::XMFLOAT4 Specular;
- float SpecularPower;
- DirectX::XMFLOAT4 Emissive;
- DirectX::XMFLOAT4X4 UVTransform;
- };
-
- constexpr uint32_t MAX_TEXTURE = 8;
-
- struct SubMesh
- {
- uint32_t MaterialIndex;
- uint32_t IndexBufferIndex;
- uint32_t VertexBufferIndex;
- uint32_t StartIndex;
- uint32_t PrimCount;
- };
-
- constexpr uint32_t NUM_BONE_INFLUENCES = 4;
-
- static_assert(sizeof(VertexPositionNormalTangentColorTexture) == 52, "mismatch with CMO vertex type");
-
- struct SkinningVertex
- {
- uint32_t boneIndex[NUM_BONE_INFLUENCES];
- float boneWeight[NUM_BONE_INFLUENCES];
- };
-
- struct MeshExtents
- {
- float CenterX, CenterY, CenterZ;
- float Radius;
-
- float MinX, MinY, MinZ;
- float MaxX, MaxY, MaxZ;
- };
-
- struct Bone
- {
- int32_t ParentIndex;
- DirectX::XMFLOAT4X4 InvBindPos;
- DirectX::XMFLOAT4X4 BindPos;
- DirectX::XMFLOAT4X4 LocalTransform;
- };
-
- struct Clip
- {
- float StartTime;
- float EndTime;
- uint32_t keys;
- };
-
- struct Keyframe
- {
- uint32_t BoneIndex;
- float Time;
- DirectX::XMFLOAT4X4 Transform;
- };
-
-#pragma pack(pop)
-
- const Material s_defMaterial =
- {
- { 0.2f, 0.2f, 0.2f, 1.f },
- { 0.8f, 0.8f, 0.8f, 1.f },
- { 0.0f, 0.0f, 0.0f, 1.f },
- 1.f,
- { 0.0f, 0.0f, 0.0f, 1.0f },
- { 1.f, 0.f, 0.f, 0.f,
- 0.f, 1.f, 0.f, 0.f,
- 0.f, 0.f, 1.f, 0.f,
- 0.f, 0.f, 0.f, 1.f },
- };
-} // namespace
+static_assert(sizeof(VertexPositionNormalTangentColorTexture) == sizeof(VSD3DStarter::VertexPositionNormalTangentColorTexture), "mismatch with CMO vertex type");
-static_assert(sizeof(VSD3DStarter::Material) == 132, "CMO Mesh structure size incorrect");
-static_assert(sizeof(VSD3DStarter::SubMesh) == 20, "CMO Mesh structure size incorrect");
-static_assert(sizeof(VSD3DStarter::SkinningVertex) == 32, "CMO Mesh structure size incorrect");
-static_assert(sizeof(VSD3DStarter::MeshExtents) == 40, "CMO Mesh structure size incorrect");
-static_assert(sizeof(VSD3DStarter::Bone) == 196, "CMO Mesh structure size incorrect");
-static_assert(sizeof(VSD3DStarter::Clip) == 12, "CMO Mesh structure size incorrect");
-static_assert(sizeof(VSD3DStarter::Keyframe) == 72, "CMO Mesh structure size incorrect");
namespace
{
@@ -299,7 +146,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");
- auto meshName = reinterpret_cast(static_cast(meshData + usedSize));
+ auto meshName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
@@ -328,7 +175,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");
- auto matName = reinterpret_cast(static_cast(meshData + usedSize));
+ auto matName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
@@ -350,7 +197,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");
- auto psName = reinterpret_cast(static_cast(meshData + usedSize));
+ auto psName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
@@ -365,7 +212,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");
- auto txtName = reinterpret_cast(static_cast(meshData + usedSize));
+ auto txtName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
usedSize += sizeof(wchar_t)*(*nName);
if (dataSize < usedSize)
@@ -598,7 +445,7 @@ std::unique_ptr DirectX::Model::CreateFromCMO(
if (dataSize < usedSize)
throw std::runtime_error("End of file");
- auto boneName = reinterpret_cast(static_cast(meshData + usedSize));
+ auto boneName = reinterpret_cast(static_cast(meshData + usedSize)); // [CodeQL.SM02986]: The cast here is intentional.
usedSize += sizeof(wchar_t) * (*nName);
if (dataSize < usedSize)
diff --git a/DirectXTK/Src/ToneMapPostProcess.cpp b/DirectXTK/Src/ToneMapPostProcess.cpp
index 3f3f43b..92e4e97 100644
--- a/DirectXTK/Src/ToneMapPostProcess.cpp
+++ b/DirectXTK/Src/ToneMapPostProcess.cpp
@@ -441,7 +441,7 @@ void ToneMapPostProcess::SetMRTOutput(bool value)
#endif
-// Property
+// Properties
void ToneMapPostProcess::SetHDRSourceTexture(_In_opt_ ID3D11ShaderResourceView* value)
{
pImpl->hdrTexture = value;
diff --git a/DirectXTK/XWBTool/CmdLineHelpers.h b/DirectXTK/XWBTool/CmdLineHelpers.h
new file mode 100644
index 0000000..b3af3ee
--- /dev/null
+++ b/DirectXTK/XWBTool/CmdLineHelpers.h
@@ -0,0 +1,375 @@
+//--------------------------------------------------------------------------------------
+// File: CmdLineHelpers.h
+//
+// Command-line tool shared functions
+//
+// Copyright (c) Microsoft Corporation.
+// Licensed under the MIT License.
+//--------------------------------------------------------------------------------------
+
+#pragma once
+
+#if __cplusplus < 201703L
+#error Requires C++17 (and /Zc:__cplusplus with MSVC)
+#endif
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+#include
+
+#ifndef TOOL_VERSION
+#error Define TOOL_VERSION before including this header
+#endif
+
+
+namespace Helpers
+{
+ struct handle_closer { void operator()(HANDLE h) { if (h) CloseHandle(h); } };
+
+ using ScopedHandle = std::unique_ptr;
+
+ inline HANDLE safe_handle(HANDLE h) noexcept { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
+
+ struct find_closer { void operator()(HANDLE h) noexcept { assert(h != INVALID_HANDLE_VALUE); if (h) FindClose(h); } };
+
+ using ScopedFindHandle = std::unique_ptr;
+
+#ifdef _PREFAST_
+#pragma prefast(disable : 26018, "Only used with static internal arrays")
+#endif
+
+ struct SConversion
+ {
+ std::wstring szSrc;
+ std::wstring szFolder;
+ };
+
+ template
+ struct SValue
+ {
+ const wchar_t* name;
+ T value;
+ };
+
+ template
+ T LookupByName(const wchar_t _In_z_ *pName, const SValue *pArray)
+ {
+ while (pArray->name)
+ {
+ if (!_wcsicmp(pName, pArray->name))
+ return pArray->value;
+
+ pArray++;
+ }
+
+ return static_cast(0);
+ }
+
+ template
+ const wchar_t* LookupByValue(T value, const SValue *pArray)
+ {
+ while (pArray->name)
+ {
+ if (value == pArray->value)
+ return pArray->name;
+
+ pArray++;
+ }
+
+ return L"";
+ }
+
+ void PrintFormat(DXGI_FORMAT Format, const SValue* pFormatList)
+ {
+ for (auto pFormat = pFormatList; pFormat->name; pFormat++)
+ {
+ if (pFormat->value == Format)
+ {
+ wprintf(L"%ls", pFormat->name);
+ return;
+ }
+ }
+
+ wprintf(L"*UNKNOWN*");
+ }
+
+ void PrintFormat(DXGI_FORMAT Format, const SValue* pFormatList1, const SValue* pFormatList2)
+ {
+ for (auto pFormat = pFormatList1; pFormat->name; pFormat++)
+ {
+ if (pFormat->value == Format)
+ {
+ wprintf(L"%ls", pFormat->name);
+ return;
+ }
+ }
+
+ for (auto pFormat = pFormatList2; pFormat->name; pFormat++)
+ {
+ if (pFormat->value == Format)
+ {
+ wprintf(L"%ls", pFormat->name);
+ return;
+ }
+ }
+
+ wprintf(L"*UNKNOWN*");
+ }
+
+ template
+ void PrintList(size_t cch, const SValue *pValue)
+ {
+ while (pValue->name)
+ {
+ const size_t cchName = wcslen(pValue->name);
+
+ if (cch + cchName + 2 >= 80)
+ {
+ wprintf(L"\n ");
+ cch = 6;
+ }
+
+ wprintf(L"%ls ", pValue->name);
+ cch += cchName + 2;
+ pValue++;
+ }
+
+ wprintf(L"\n");
+ }
+
+ void PrintLogo(bool versionOnly, _In_z_ const wchar_t* name, _In_z_ const wchar_t* desc)
+ {
+ wchar_t version[32] = {};
+
+ wchar_t appName[_MAX_PATH] = {};
+ if (GetModuleFileNameW(nullptr, appName, _MAX_PATH))
+ {
+ const DWORD size = GetFileVersionInfoSizeW(appName, nullptr);
+ if (size > 0)
+ {
+ auto verInfo = std::make_unique(size);
+ if (GetFileVersionInfoW(appName, 0, size, verInfo.get()))
+ {
+ LPVOID lpstr = nullptr;
+ UINT strLen = 0;
+ if (VerQueryValueW(verInfo.get(), L"\\StringFileInfo\\040904B0\\ProductVersion", &lpstr, &strLen))
+ {
+ wcsncpy_s(version, reinterpret_cast(lpstr), strLen);
+ }
+ }
+ }
+ }
+
+ if (!*version || wcscmp(version, L"1.0.0.0") == 0)
+ {
+ swprintf_s(version, L"%03d (library)", TOOL_VERSION);
+ }
+
+ if (versionOnly)
+ {
+ wprintf(L"%ls version %ls\n", name, version);
+ }
+ else
+ {
+ wprintf(L"%ls Version %ls\n", desc, version);
+ wprintf(L"Copyright (C) Microsoft Corp.\n");
+ #ifdef _DEBUG
+ wprintf(L"*** Debug build ***\n");
+ #endif
+ wprintf(L"\n");
+ }
+ }
+
+ void SearchForFiles(const std::filesystem::path& path, std::list& files, bool recursive, _In_opt_z_ const wchar_t* folder)
+ {
+ // Process files
+ WIN32_FIND_DATAW findData = {};
+ ScopedFindHandle hFile(safe_handle(FindFirstFileExW(path.c_str(),
+ FindExInfoBasic, &findData,
+ FindExSearchNameMatch, nullptr,
+ FIND_FIRST_EX_LARGE_FETCH)));
+ if (hFile)
+ {
+ for (;;)
+ {
+ if (!(findData.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY)))
+ {
+ SConversion conv = {};
+ conv.szSrc = path.parent_path().append(findData.cFileName).native();
+ if (folder)
+ {
+ conv.szFolder = folder;
+ }
+ files.push_back(conv);
+ }
+
+ if (!FindNextFileW(hFile.get(), &findData))
+ break;
+ }
+ }
+
+ // Process directories
+ if (recursive)
+ {
+ auto searchDir = path.parent_path().append(L"*");
+
+ hFile.reset(safe_handle(FindFirstFileExW(searchDir.c_str(),
+ FindExInfoBasic, &findData,
+ FindExSearchLimitToDirectories, nullptr,
+ FIND_FIRST_EX_LARGE_FETCH)));
+ if (!hFile)
+ return;
+
+ for (;;)
+ {
+ if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
+ if (findData.cFileName[0] != L'.')
+ {
+ auto subfolder = (folder)
+ ? (std::wstring(folder) + std::wstring(findData.cFileName) + std::filesystem::path::preferred_separator)
+ : (std::wstring(findData.cFileName) + std::filesystem::path::preferred_separator);
+
+ auto subdir = path.parent_path().append(findData.cFileName).append(path.filename().c_str());
+
+ SearchForFiles(subdir, files, recursive, subfolder.c_str());
+ }
+ }
+
+ if (!FindNextFileW(hFile.get(), &findData))
+ break;
+ }
+ }
+ }
+
+ void ProcessFileList(std::wifstream& inFile, std::list& files)
+ {
+ std::list flist;
+ std::set excludes;
+
+ for (;;)
+ {
+ std::wstring fname;
+ std::getline(inFile, fname);
+ if (!inFile)
+ break;
+
+ if (fname[0] == L'#')
+ {
+ // Comment
+ }
+ else if (fname[0] == L'-')
+ {
+ if (flist.empty())
+ {
+ wprintf(L"WARNING: Ignoring the line '%ls' in -flist\n", fname.c_str());
+ }
+ else
+ {
+ std::filesystem::path path(fname.c_str() + 1);
+ auto& npath = path.make_preferred();
+ if (wcspbrk(fname.c_str(), L"?*") != nullptr)
+ {
+ std::list removeFiles;
+ SearchForFiles(npath, removeFiles, false, nullptr);
+
+ for (auto& it : removeFiles)
+ {
+ std::wstring name = it.szSrc;
+ std::transform(name.begin(), name.end(), name.begin(), towlower);
+ excludes.insert(name);
+ }
+ }
+ else
+ {
+ std::wstring name = npath.c_str();
+ std::transform(name.begin(), name.end(), name.begin(), towlower);
+ excludes.insert(name);
+ }
+ }
+ }
+ else if (wcspbrk(fname.c_str(), L"?*") != nullptr)
+ {
+ std::filesystem::path path(fname.c_str());
+ SearchForFiles(path.make_preferred(), flist, false, nullptr);
+ }
+ else
+ {
+ SConversion conv = {};
+ std::filesystem::path path(fname.c_str());
+ conv.szSrc = path.make_preferred().native();
+ flist.push_back(conv);
+ }
+ }
+
+ inFile.close();
+
+ if (!excludes.empty())
+ {
+ // Remove any excluded files
+ for (auto it = flist.begin(); it != flist.end();)
+ {
+ std::wstring name = it->szSrc;
+ std::transform(name.begin(), name.end(), name.begin(), towlower);
+ auto item = it;
+ ++it;
+ if (excludes.find(name) != excludes.end())
+ {
+ flist.erase(item);
+ }
+ }
+ }
+
+ if (flist.empty())
+ {
+ wprintf(L"WARNING: No file names found in -flist\n");
+ }
+ else
+ {
+ files.splice(files.end(), flist);
+ }
+ }
+
+ const wchar_t* GetErrorDesc(HRESULT hr)
+ {
+ static wchar_t desc[1024] = {};
+
+ LPWSTR errorText = nullptr;
+
+ const DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
+ nullptr, static_cast(hr),
+ MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast(&errorText), 0, nullptr);
+
+ *desc = 0;
+
+ if (result > 0 && errorText)
+ {
+ swprintf_s(desc, L": %ls", errorText);
+
+ size_t len = wcslen(desc);
+ if (len >= 1)
+ {
+ desc[len - 1] = 0;
+ }
+
+ if (errorText)
+ LocalFree(errorText);
+
+ for(wchar_t* ptr = desc; *ptr != 0; ++ptr)
+ {
+ if (*ptr == L'\r' || *ptr == L'\n')
+ {
+ *ptr = L' ';
+ }
+ }
+ }
+
+ return desc;
+ }
+}
diff --git a/DirectXTK/XWBTool/xwbtool.cpp b/DirectXTK/XWBTool/xwbtool.cpp
index be0b515..804c6e2 100644
--- a/DirectXTK/XWBTool/xwbtool.cpp
+++ b/DirectXTK/XWBTool/xwbtool.cpp
@@ -31,6 +31,7 @@
#endif
#include
+#include
#if __cplusplus < 201703L
#error Requires C++17 (and /Zc:__cplusplus with MSVC)
@@ -57,6 +58,11 @@
#include "WAVFileReader.h"
+#define TOOL_VERSION 0
+#include "CmdLineHelpers.h"
+
+using namespace Helpers;
+
#ifdef __INTEL_COMPILER
#pragma warning(disable : 161)
// warning #161: unrecognized #pragma
@@ -112,16 +118,6 @@ static_assert(sizeof(XMA2WAVEFORMATEX) == 52, "Mismatch of XMA2 type");
namespace
{
- struct handle_closer { void operator()(HANDLE h) { if (h) CloseHandle(h); } };
-
- using ScopedHandle = std::unique_ptr;
-
- inline HANDLE safe_handle(HANDLE h) { return (h == INVALID_HANDLE_VALUE) ? nullptr : h; }
-
- struct find_closer { void operator()(HANDLE h) { assert(h != INVALID_HANDLE_VALUE); if (h) FindClose(h); } };
-
- using ScopedFindHandle = std::unique_ptr;
-
#define BLOCKALIGNPAD(a, b) \
((((a) + ((b) - 1)) / (b)) * (b))
@@ -784,65 +780,53 @@ namespace
return false;
}
}
-}
+ //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
+ const wchar_t* g_ToolName = L"xwbtool";
+ const wchar_t* g_Description = L"Microsoft (R) XACT-style Wave Bank Tool [DirectXTK]";
-enum OPTIONS : uint32_t
-{
- OPT_RECURSIVE = 1,
- OPT_STREAMING,
- OPT_ADVANCED_FORMAT,
- OPT_OUTPUTFILE,
- OPT_OUTPUTHEADER,
- OPT_TOLOWER,
- OPT_OVERWRITE,
- OPT_COMPACT,
- OPT_NOCOMPACT,
- OPT_FRIENDLY_NAMES,
- OPT_NOLOGO,
- OPT_FILELIST,
- OPT_MAX
-};
+ enum OPTIONS : uint32_t
+ {
+ OPT_RECURSIVE = 1,
+ OPT_STREAMING,
+ OPT_ADVANCED_FORMAT,
+ OPT_OUTPUTFILE,
+ OPT_OUTPUTHEADER,
+ OPT_TOLOWER,
+ OPT_OVERWRITE,
+ OPT_COMPACT,
+ OPT_NOCOMPACT,
+ OPT_FRIENDLY_NAMES,
+ OPT_NOLOGO,
+ OPT_FILELIST,
+ OPT_MAX
+ };
-static_assert(OPT_MAX <= 32, "dwOptions is a unsigned int bitfield");
+ static_assert(OPT_MAX <= 32, "dwOptions is a unsigned int bitfield");
-struct SConversion
-{
- std::wstring szSrc;
-};
+ struct WaveFile
+ {
+ DirectX::WAVData data;
+ size_t conv;
+ MINIWAVEFORMAT miniFmt;
+ std::unique_ptr waveData;
-struct SValue
-{
- const wchar_t* name;
- uint32_t value;
-};
+ WaveFile() noexcept :
+ data{},
+ conv(0),
+ miniFmt{}
+ {}
-struct WaveFile
-{
- DirectX::WAVData data;
- size_t conv;
- MINIWAVEFORMAT miniFmt;
- std::unique_ptr waveData;
-
- WaveFile() noexcept :
- data{},
- conv(0),
- miniFmt{}
- {}
-
- WaveFile(WaveFile&) = delete;
- WaveFile& operator= (WaveFile&) = delete;
-
- WaveFile(WaveFile&&) = default;
- WaveFile& operator= (WaveFile&&) = default;
-};
+ WaveFile(WaveFile&) = delete;
+ WaveFile& operator= (WaveFile&) = delete;
+
+ WaveFile(WaveFile&&) = default;
+ WaveFile& operator= (WaveFile&&) = default;
+ };
-namespace
-{
void FileNameToIdentifier(_Inout_updates_all_(count) wchar_t* str, size_t count)
{
size_t j = 0;
@@ -854,240 +838,35 @@ namespace
*c = t;
}
}
-}
-
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-
-const SValue g_pOptions[] =
-{
- { L"r", OPT_RECURSIVE },
- { L"s", OPT_STREAMING },
- { L"af", OPT_ADVANCED_FORMAT },
- { L"o", OPT_OUTPUTFILE },
- { L"l", OPT_TOLOWER },
- { L"h", OPT_OUTPUTHEADER },
- { L"y", OPT_OVERWRITE },
- { L"c", OPT_COMPACT },
- { L"nc", OPT_NOCOMPACT },
- { L"f", OPT_FRIENDLY_NAMES },
- { L"nologo", OPT_NOLOGO },
- { L"flist", OPT_FILELIST },
- { nullptr, 0 }
-};
-
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-//////////////////////////////////////////////////////////////////////////////
-
-namespace
-{
-#ifdef _PREFAST_
-#pragma prefast(disable : 26018, "Only used with static internal arrays")
-#endif
-
- uint32_t LookupByName(const wchar_t *pName, const SValue *pArray)
- {
- while (pArray->name)
- {
- if (!_wcsicmp(pName, pArray->name))
- return pArray->value;
-
- pArray++;
- }
-
- return 0;
- }
-
- void SearchForFiles(const std::filesystem::path& path, std::list& files, bool recursive)
- {
- // Process files
- WIN32_FIND_DATAW findData = {};
- ScopedFindHandle hFile(safe_handle(FindFirstFileExW(path.c_str(),
- FindExInfoBasic, &findData,
- FindExSearchNameMatch, nullptr,
- FIND_FIRST_EX_LARGE_FETCH)));
- if (hFile)
- {
- for (;;)
- {
- if (!(findData.dwFileAttributes & (FILE_ATTRIBUTE_HIDDEN | FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_DIRECTORY)))
- {
- SConversion conv = {};
- conv.szSrc = path.parent_path().append(findData.cFileName).native();
- files.push_back(conv);
- }
-
- if (!FindNextFileW(hFile.get(), &findData))
- break;
- }
- }
-
- // Process directories
- if (recursive)
- {
- auto searchDir = path.parent_path().append(L"*");
-
- hFile.reset(safe_handle(FindFirstFileExW(searchDir.c_str(),
- FindExInfoBasic, &findData,
- FindExSearchLimitToDirectories, nullptr,
- FIND_FIRST_EX_LARGE_FETCH)));
- if (!hFile)
- return;
-
- for (;;)
- {
- if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
- {
- if (findData.cFileName[0] != L'.')
- {
- auto subdir = path.parent_path().append(findData.cFileName).append(path.filename().c_str());
-
- SearchForFiles(subdir, files, recursive);
- }
- }
-
- if (!FindNextFileW(hFile.get(), &findData))
- break;
- }
- }
- }
-
- void ProcessFileList(std::wifstream& inFile, std::list& files)
- {
- std::list flist;
- std::set excludes;
- for (;;)
- {
- std::wstring fname;
- std::getline(inFile, fname);
- if (!inFile)
- break;
-
- if (fname[0] == L'#')
- {
- // Comment
- }
- else if (fname[0] == L'-')
- {
- if (flist.empty())
- {
- wprintf(L"WARNING: Ignoring the line '%ls' in -flist\n", fname.c_str());
- }
- else
- {
- std::filesystem::path path(fname.c_str() + 1);
- auto& npath = path.make_preferred();
- if (wcspbrk(fname.c_str(), L"?*") != nullptr)
- {
- std::list removeFiles;
- SearchForFiles(npath, removeFiles, false);
-
- for (auto& it : removeFiles)
- {
- std::wstring name = it.szSrc;
- std::transform(name.begin(), name.end(), name.begin(), towlower);
- excludes.insert(name);
- }
- }
- else
- {
- std::wstring name = npath.c_str();
- std::transform(name.begin(), name.end(), name.begin(), towlower);
- excludes.insert(name);
- }
- }
- }
- else if (wcspbrk(fname.c_str(), L"?*") != nullptr)
- {
- std::filesystem::path path(fname.c_str());
- SearchForFiles(path.make_preferred(), flist, false);
- }
- else
- {
- SConversion conv = {};
- std::filesystem::path path(fname.c_str());
- conv.szSrc = path.make_preferred().native();
- flist.push_back(conv);
- }
- }
-
- inFile.close();
-
- if (!excludes.empty())
- {
- // Remove any excluded files
- for (auto it = flist.begin(); it != flist.end();)
- {
- std::wstring name = it->szSrc;
- std::transform(name.begin(), name.end(), name.begin(), towlower);
- auto item = it;
- ++it;
- if (excludes.find(name) != excludes.end())
- {
- flist.erase(item);
- }
- }
- }
-
- if (flist.empty())
- {
- wprintf(L"WARNING: No file names found in -flist\n");
- }
- else
- {
- files.splice(files.end(), flist);
- }
- }
+ //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
- void PrintLogo(bool versionOnly)
+ const SValue g_pOptions[] =
{
- wchar_t version[32] = {};
-
- wchar_t appName[_MAX_PATH] = {};
- if (GetModuleFileNameW(nullptr, appName, _MAX_PATH))
- {
- DWORD size = GetFileVersionInfoSizeW(appName, nullptr);
- if (size > 0)
- {
- auto verInfo = std::make_unique(size);
- if (GetFileVersionInfoW(appName, 0, size, verInfo.get()))
- {
- LPVOID lpstr = nullptr;
- UINT strLen = 0;
- if (VerQueryValueW(verInfo.get(), L"\\StringFileInfo\\040904B0\\ProductVersion", &lpstr, &strLen))
- {
- wcsncpy_s(version, reinterpret_cast(lpstr), strLen);
- }
- }
- }
- }
-
- if (!*version)
- {
- wcscpy_s(version, L"MISSING");
- }
+ { L"r", OPT_RECURSIVE },
+ { L"s", OPT_STREAMING },
+ { L"af", OPT_ADVANCED_FORMAT },
+ { L"o", OPT_OUTPUTFILE },
+ { L"l", OPT_TOLOWER },
+ { L"h", OPT_OUTPUTHEADER },
+ { L"y", OPT_OVERWRITE },
+ { L"c", OPT_COMPACT },
+ { L"nc", OPT_NOCOMPACT },
+ { L"f", OPT_FRIENDLY_NAMES },
+ { L"nologo", OPT_NOLOGO },
+ { L"flist", OPT_FILELIST },
+ { nullptr, 0 }
+ };
- if (versionOnly)
- {
- wprintf(L"xwbtool version %ls\n", version);
- }
- else
- {
- wprintf(L"Microsoft (R) XACT-style Wave Bank Tool [DirectXTK] Version %ls\n", version);
- wprintf(L"Copyright (C) Microsoft Corp.\n");
- #ifdef _DEBUG
- wprintf(L"*** Debug build ***\n");
- #endif
- wprintf(L"\n");
- }
- }
+ //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////
void PrintUsage()
{
- PrintLogo(false);
+ PrintLogo(false, g_ToolName, g_Description);
static const wchar_t* const s_usage =
L"Usage: xwbtool [--] \n"
@@ -1112,44 +891,6 @@ namespace
wprintf(L"%ls", s_usage);
}
- const wchar_t* GetErrorDesc(HRESULT hr)
- {
- static wchar_t desc[1024] = {};
-
- LPWSTR errorText = nullptr;
-
- DWORD result = FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_ALLOCATE_BUFFER,
- nullptr, static_cast(hr),
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), reinterpret_cast(&errorText), 0, nullptr);
-
- *desc = 0;
-
- if (result > 0 && errorText)
- {
- swprintf_s(desc, L": %ls", errorText);
-
- size_t len = wcslen(desc);
- if (len >= 2)
- {
- desc[len - 2] = 0;
- desc[len - 1] = 0;
- }
-
- if (errorText)
- LocalFree(errorText);
-
- for (wchar_t* ptr = desc; *ptr != 0; ++ptr)
- {
- if (*ptr == L'\r' || *ptr == L'\n')
- {
- *ptr = L' ';
- }
- }
- }
-
- return desc;
- }
-
const char* GetFormatTagName(WORD wFormatTag)
{
switch (wFormatTag)
@@ -1242,7 +983,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
}
else if (!_wcsicmp(pArg, L"--version"))
{
- PrintLogo(true);
+ PrintLogo(true, g_ToolName, g_Description);
return 0;
}
else if (!_wcsicmp(pArg, L"--help"))
@@ -1365,7 +1106,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
{
size_t count = conversion.size();
std::filesystem::path path(pArg);
- SearchForFiles(path.make_preferred(), conversion, (dwOptions & (1 << OPT_RECURSIVE)) != 0);
+ SearchForFiles(path.make_preferred(), conversion, (dwOptions & (1 << OPT_RECURSIVE)) != 0, nullptr);
if (conversion.size() <= count)
{
wprintf(L"No matching files found for %ls\n", pArg);
@@ -1389,7 +1130,7 @@ int __cdecl wmain(_In_ int argc, _In_z_count_(argc) wchar_t* argv[])
}
if (~dwOptions & (1 << OPT_NOLOGO))
- PrintLogo(false);
+ PrintLogo(false, g_ToolName, g_Description);
// Determine output file name
if (outputFile.empty())
diff --git a/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj b/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj
index b6126af..6d5d936 100644
--- a/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj
+++ b/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj
@@ -256,6 +256,7 @@
+
diff --git a/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj.filters b/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj.filters
index 858d434..409a0f5 100644
--- a/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj.filters
+++ b/DirectXTK/XWBTool/xwbtool_Desktop_2019.vcxproj.filters
@@ -6,6 +6,7 @@
+
diff --git a/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj b/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj
index 4e16759..f227ec9 100644
--- a/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj
+++ b/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj
@@ -256,6 +256,7 @@
+
diff --git a/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj.filters b/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj.filters
index 6e94161..f383386 100644
--- a/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj.filters
+++ b/DirectXTK/XWBTool/xwbtool_Desktop_2022.vcxproj.filters
@@ -6,6 +6,7 @@
+
diff --git a/DirectXTK/build/CMakeCache.txt b/DirectXTK/build/CMakeCache.txt
deleted file mode 100644
index 4c9cf7c..0000000
--- a/DirectXTK/build/CMakeCache.txt
+++ /dev/null
@@ -1,96 +0,0 @@
-# This is the CMakeCache file.
-# For build in directory: c:/Users/Ahnjiwoo/Desktop/Projects/MyDX3DFramework/Includes/DirectXTK/build
-# It was generated by CMake: C:/Program Files/CMake/bin/cmake.exe
-# You can edit this file to change values found and used by cmake.
-# If you do not want to change any of the values, simply exit the editor.
-# If you do want to change a value, simply edit, save, and exit the editor.
-# The syntax for the file is as follows:
-# KEY:TYPE=VALUE
-# KEY is the name of a variable in the cache.
-# TYPE is a hint to GUIs for the type of VALUE, DO NOT EDIT TYPE!.
-# VALUE is the current value for the KEY.
-
-########################
-# EXTERNAL cache entries
-########################
-
-//Semicolon separated list of supported configuration types, only
-// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything
-// else will be ignored.
-CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo
-
-//Value Computed by CMake.
-CMAKE_FIND_PACKAGE_REDIRECTS_DIR:STATIC=C:/Users/Ahnjiwoo/Desktop/Projects/MyDX3DFramework/Includes/DirectXTK/build/CMakeFiles/pkgRedirects
-
-//Value Computed by CMake
-CMAKE_PROJECT_DESCRIPTION:STATIC=DirectX Tool Kit for DirectX 11
-
-//Value Computed by CMake
-CMAKE_PROJECT_HOMEPAGE_URL:STATIC=https://go.microsoft.com/fwlink/?LinkId=248929
-
-//Value Computed by CMake
-CMAKE_PROJECT_NAME:STATIC=DirectXTK
-
-//Value Computed by CMake
-CMAKE_PROJECT_VERSION:STATIC=1.8.9
-
-//Value Computed by CMake
-CMAKE_PROJECT_VERSION_MAJOR:STATIC=1
-
-//Value Computed by CMake
-CMAKE_PROJECT_VERSION_MINOR:STATIC=8
-
-//Value Computed by CMake
-CMAKE_PROJECT_VERSION_PATCH:STATIC=9
-
-//Value Computed by CMake
-CMAKE_PROJECT_VERSION_TWEAK:STATIC=
-
-//Value Computed by CMake
-DirectXTK_BINARY_DIR:STATIC=C:/Users/Ahnjiwoo/Desktop/Projects/MyDX3DFramework/Includes/DirectXTK/build
-
-//Value Computed by CMake
-DirectXTK_IS_TOP_LEVEL:STATIC=ON
-
-//Value Computed by CMake
-DirectXTK_SOURCE_DIR:STATIC=C:/Users/Ahnjiwoo/Desktop/Projects/MyDX3DFramework/Includes/DirectXTK
-
-
-########################
-# INTERNAL cache entries
-########################
-
-//This is the directory where this CMakeCache.txt was created
-CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/Ahnjiwoo/Desktop/Projects/MyDX3DFramework/Includes/DirectXTK/build
-//Major version of cmake used to create the current loaded cache
-CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
-//Minor version of cmake used to create the current loaded cache
-CMAKE_CACHE_MINOR_VERSION:INTERNAL=30
-//Patch version of cmake used to create the current loaded cache
-CMAKE_CACHE_PATCH_VERSION:INTERNAL=2
-//Path to CMake executable.
-CMAKE_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cmake.exe
-//Path to cpack program executable.
-CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files/CMake/bin/cpack.exe
-//Path to ctest program executable.
-CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files/CMake/bin/ctest.exe
-//Name of external makefile project generator.
-CMAKE_EXTRA_GENERATOR:INTERNAL=
-//Name of generator.
-CMAKE_GENERATOR:INTERNAL=Visual Studio 17 2022
-//Generator instance identifier.
-CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files/Microsoft Visual Studio/2022/Community
-//Name of generator platform.
-CMAKE_GENERATOR_PLATFORM:INTERNAL=
-//Name of generator toolset.
-CMAKE_GENERATOR_TOOLSET:INTERNAL=
-//Source directory with the top level CMakeLists.txt file for this
-// project
-CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/Ahnjiwoo/Desktop/Projects/MyDX3DFramework/Includes/DirectXTK
-//number of local generators
-CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
-//Platform information initialized
-CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
-//Path to CMake installation.
-CMAKE_ROOT:INTERNAL=C:/Program Files/CMake/share/cmake-3.30
-
diff --git a/DirectXTK/build/CMakeFiles/3.30.2/CMakeSystem.cmake b/DirectXTK/build/CMakeFiles/3.30.2/CMakeSystem.cmake
deleted file mode 100644
index 9c49cbb..0000000
--- a/DirectXTK/build/CMakeFiles/3.30.2/CMakeSystem.cmake
+++ /dev/null
@@ -1,15 +0,0 @@
-set(CMAKE_HOST_SYSTEM "Windows-10.0.22631")
-set(CMAKE_HOST_SYSTEM_NAME "Windows")
-set(CMAKE_HOST_SYSTEM_VERSION "10.0.22631")
-set(CMAKE_HOST_SYSTEM_PROCESSOR "AMD64")
-
-
-
-set(CMAKE_SYSTEM "Windows-10.0.22631")
-set(CMAKE_SYSTEM_NAME "Windows")
-set(CMAKE_SYSTEM_VERSION "10.0.22631")
-set(CMAKE_SYSTEM_PROCESSOR "AMD64")
-
-set(CMAKE_CROSSCOMPILING "FALSE")
-
-set(CMAKE_SYSTEM_LOADED 1)
diff --git a/DirectXTK/build/CMakeFiles/3.30.2/VCTargetsPath.vcxproj b/DirectXTK/build/CMakeFiles/3.30.2/VCTargetsPath.vcxproj
deleted file mode 100644
index ccb7d62..0000000
--- a/DirectXTK/build/CMakeFiles/3.30.2/VCTargetsPath.vcxproj
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
-
- Debug
- x64
-
-
-
- {F3FC6D86-508D-3FB1-96D2-995F08B142EC}
- Win32Proj
- x64
- 10.0.22621.0
-
-
-
- x64
-
-
- Utility
- MultiByte
- v143
-
-
-
-
- echo VCTargetsPath=$(VCTargetsPath)
-
-
-
-
diff --git a/DirectXTK/build/CMakeFiles/CMakeConfigureLog.yaml b/DirectXTK/build/CMakeFiles/CMakeConfigureLog.yaml
deleted file mode 100644
index 1ab59b4..0000000
--- a/DirectXTK/build/CMakeFiles/CMakeConfigureLog.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
-
----
-events:
- -
- kind: "message-v1"
- backtrace:
- - "C:/Program Files/CMake/share/cmake-3.30/Modules/CMakeDetermineSystem.cmake:205 (message)"
- - "CMakeLists.txt:12 (project)"
- message: |
- The system is: Windows - 10.0.22631 - AMD64
-...
diff --git a/DirectXTK/build/CMakeFiles/cmake.check_cache b/DirectXTK/build/CMakeFiles/cmake.check_cache
deleted file mode 100644
index 3dccd73..0000000
--- a/DirectXTK/build/CMakeFiles/cmake.check_cache
+++ /dev/null
@@ -1 +0,0 @@
-# This file is generated by cmake for dependency checking of the CMakeCache.txt file
diff --git a/DirectXTK/build/DirectXTK-GitHub-GDK-Dev17.yml b/DirectXTK/build/DirectXTK-GitHub-GDK-Dev17.yml
index f2e71f0..b98b162 100644
--- a/DirectXTK/build/DirectXTK-GitHub-GDK-Dev17.yml
+++ b/DirectXTK/build/DirectXTK-GitHub-GDK-Dev17.yml
@@ -88,7 +88,7 @@ jobs:
displayName: NuGet install PGDK
inputs:
command: custom
- arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\GDK
+ arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
@@ -159,7 +159,7 @@ jobs:
displayName: NuGet install PGDK
inputs:
command: custom
- arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\GDK
+ arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CmdLine@2
displayName: Setup BWOI for GDK command-line
inputs:
@@ -171,7 +171,7 @@ jobs:
echo ##vso[task.prependpath]%WindowsSdkBinPath%x64
echo ##vso[task.prependpath]%WindowsSdkVerBinPath%x64
echo ##vso[task.prependpath]%VCToolsInstallDir%bin\HostX64\x64
- call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER)\GDK $(GDK_EDITION) PC
+ call $(Build.SourcesDirectory)\build\SetupBWOI.cmd $(EXTRACTED_FOLDER) $(GDK_EDITION) PC
echo ##vso[task.setvariable variable=GameDKLatest;]%GameDKLatest%
echo ##vso[task.setvariable variable=GRDKLatest;]%GRDKLatest%
echo ##vso[task.setvariable variable=INCLUDE;]%INCLUDE%
diff --git a/DirectXTK/build/DirectXTK-GitHub-GDK.yml b/DirectXTK/build/DirectXTK-GitHub-GDK.yml
index d53ac88..dd7d3e4 100644
--- a/DirectXTK/build/DirectXTK-GitHub-GDK.yml
+++ b/DirectXTK/build/DirectXTK-GitHub-GDK.yml
@@ -109,7 +109,7 @@ jobs:
displayName: NuGet install PGDK
inputs:
command: custom
- arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\GDK
+ arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
@@ -183,7 +183,7 @@ jobs:
displayName: NuGet install PGDK
inputs:
command: custom
- arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\GDK
+ arguments: install -prerelease Microsoft.GDK.PC.$(GDK_EDITION) -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
diff --git a/DirectXTK/build/DirectXTK-GitHub-SDK-prerelease.yml b/DirectXTK/build/DirectXTK-GitHub-SDK-prerelease.yml
index 18c298b..95e6d75 100644
--- a/DirectXTK/build/DirectXTK-GitHub-SDK-prerelease.yml
+++ b/DirectXTK/build/DirectXTK-GitHub-SDK-prerelease.yml
@@ -74,17 +74,17 @@ jobs:
displayName: NuGet Install WSDK x64
inputs:
command: custom
- arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
- arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
command: custom
- arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
@@ -254,12 +254,12 @@ jobs:
displayName: NuGet Install WSDK x64
inputs:
command: custom
- arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install -prerelease Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
- arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install -prerelease Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
@@ -332,7 +332,7 @@ jobs:
displayName: NuGet Install WSDK arm64
inputs:
command: custom
- arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install -prerelease Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
diff --git a/DirectXTK/build/DirectXTK-GitHub-SDK-release.yml b/DirectXTK/build/DirectXTK-GitHub-SDK-release.yml
index 7e61585..0cbfd9e 100644
--- a/DirectXTK/build/DirectXTK-GitHub-SDK-release.yml
+++ b/DirectXTK/build/DirectXTK-GitHub-SDK-release.yml
@@ -74,17 +74,17 @@ jobs:
displayName: NuGet Install WSDK x64
inputs:
command: custom
- arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
- arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK arm64
inputs:
command: custom
- arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
@@ -254,12 +254,12 @@ jobs:
displayName: NuGet Install WSDK x64
inputs:
command: custom
- arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install Microsoft.Windows.SDK.CPP.x64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: NuGetCommand@2
displayName: NuGet Install WSDK x86
inputs:
command: custom
- arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install Microsoft.Windows.SDK.CPP.x86 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
@@ -332,7 +332,7 @@ jobs:
displayName: NuGet Install WSDK arm64
inputs:
command: custom
- arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)\SDK
+ arguments: install Microsoft.Windows.SDK.CPP.arm64 -ExcludeVersion -OutputDirectory $(EXTRACTED_FOLDER)
- task: CopyFiles@2
displayName: Set up Directory.Build.props
inputs:
diff --git a/DirectXTK/build/Directory.Build.props b/DirectXTK/build/Directory.Build.props
index 70cd3ee..f356ccf 100644
--- a/DirectXTK/build/Directory.Build.props
+++ b/DirectXTK/build/Directory.Build.props
@@ -18,34 +18,34 @@
15.0
-
+
<_PCNuGetPackage>Microsoft.PGDK
-
+
<_PCNuGetPackage>Microsoft.GDK.PC
-
+
<_PCNuGetPackage>$(_PCNuGetPackage).$(GDKEditionNumber)
-
+
+ Project="$(ExtractedFolder)Microsoft.Windows.SDK.cpp\build\Microsoft.Windows.SDK.cpp.props" />
+ Project="$(ExtractedFolder)Microsoft.Windows.SDK.cpp.x64\build\native\Microsoft.Windows.SDK.cpp.x64.props" />
+ Project="$(ExtractedFolder)Microsoft.Windows.SDK.cpp.x86\build\native\Microsoft.Windows.SDK.cpp.x86.props" />
+ Project="$(ExtractedFolder)Microsoft.Windows.SDK.cpp.arm64\build\native\Microsoft.Windows.SDK.cpp.arm64.props" />
-
+