From 2cdb111a1d5e53a647ed9e58e1b572b489af77f5 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 5 Dec 2024 20:52:31 -0800 Subject: [PATCH 1/4] Build for a Windows 8.1 minimum --- CMakeLists.txt | 4 ++-- CMakePresets.json | 18 +++++++++--------- DirectXMesh/DirectXMesh_Desktop_2019.vcxproj | 12 ++++++------ DirectXMesh/DirectXMesh_Desktop_2022.vcxproj | 12 ++++++------ Meshconvert/Meshconvert_Desktop_2019.vcxproj | 12 ++++++------ Meshconvert/Meshconvert_Desktop_2022.vcxproj | 12 ++++++------ 6 files changed, 35 insertions(+), 35 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2b6de305..cfa7da32 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -284,8 +284,8 @@ if(WIN32) elseif(${DIRECTX_ARCH} MATCHES "^arm") set(WINVER 0x0602) else() - message(STATUS "Building with Windows 7 compatibility") - set(WINVER 0x0601) + message(STATUS "Building with Windows 8.1 compatibility") + set(WINVER 0x0603) endif() foreach(t IN LISTS TOOL_EXES ITEMS ${PROJECT_NAME}) diff --git a/CMakePresets.json b/CMakePresets.json index 2ddf75ad..d724d7ec 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -118,7 +118,7 @@ }, { - "name": "Win7", + "name": "Win8", "cacheVariables": { "BUILD_DX12": false }, @@ -237,10 +237,10 @@ { "name": "arm64-Debug-UWP" , "description": "MSVC for ARM64 (Debug) for UWP", "inherits": [ "base", "ARM64", "Debug", "MSVC", "UWP" ] }, { "name": "arm64-Release-UWP", "description": "MSVC for ARM64 (Release) for UWP", "inherits": [ "base", "ARM64", "Release", "MSVC", "UWP" ] }, - { "name": "x64-Debug-Win7" , "description": "MSVC for x64 (Debug) for Windows 7", "inherits": [ "base", "x64", "Debug", "MSVC", "Win7" ] }, - { "name": "x64-Release-Win7" , "description": "MSVC for x64 (Release) for Windows 7", "inherits": [ "base", "x64", "Release", "MSVC", "Win7" ] }, - { "name": "x86-Debug-Win7" , "description": "MSVC for x86 (Debug) for Windows 7", "inherits": [ "base", "x86", "Debug", "MSVC", "Win7" ] }, - { "name": "x86-Release-Win7" , "description": "MSVC for x86 (Release) for Windows 7", "inherits": [ "base", "x86", "Release", "MSVC", "Win7" ] }, + { "name": "x64-Debug-Win8" , "description": "MSVC for x64 (Debug) for Windows 7", "inherits": [ "base", "x64", "Debug", "MSVC", "Win8" ] }, + { "name": "x64-Release-Win8" , "description": "MSVC for x64 (Release) for Windows 7", "inherits": [ "base", "x64", "Release", "MSVC", "Win8" ] }, + { "name": "x86-Debug-Win8" , "description": "MSVC for x86 (Debug) for Windows 7", "inherits": [ "base", "x86", "Debug", "MSVC", "Win8" ] }, + { "name": "x86-Release-Win8" , "description": "MSVC for x86 (Release) for Windows 7", "inherits": [ "base", "x86", "Release", "MSVC", "Win8" ] }, { "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" ] }, @@ -278,10 +278,10 @@ { "name": "arm64-Debug-UWP-Clang" , "description": "Clang/LLVM for AArch64 (Debug) for UWP", "inherits": [ "base", "ARM64", "Debug", "Clang", "Clang-AArch64", "UWP" ] }, { "name": "arm64-Release-UWP-Clang", "description": "Clang/LLVM for AArch64 (Release) for UWP", "inherits": [ "base", "ARM64", "Release", "Clang", "Clang-AArch64", "UWP" ] }, - { "name": "x64-Debug-Win7-Clang" , "description": "Clang/LLVM for x64 (Debug) for Windows 7", "inherits": [ "base", "x64", "Debug", "Clang", "Win7" ] }, - { "name": "x64-Release-Win7-Clang" , "description": "Clang/LLVM for x64 (Release) for Windows 7", "inherits": [ "base", "x64", "Release", "Clang", "Win7" ] }, - { "name": "x86-Debug-Win7-Clang" , "description": "Clang/LLVM for x86 (Debug) for Windows 7", "inherits": [ "base", "x86", "Debug", "Clang", "Clang-X86", "Win7" ] }, - { "name": "x86-Release-Win7-Clang" , "description": "Clang/LLVM for x86 (Release) for Windows 7", "inherits": [ "base", "x86", "Release", "Clang", "Clang-X86", "Win7" ] }, + { "name": "x64-Debug-Win8-Clang" , "description": "Clang/LLVM for x64 (Debug) for Windows 7", "inherits": [ "base", "x64", "Debug", "Clang", "Win8" ] }, + { "name": "x64-Release-Win8-Clang" , "description": "Clang/LLVM for x64 (Release) for Windows 7", "inherits": [ "base", "x64", "Release", "Clang", "Win8" ] }, + { "name": "x86-Debug-Win8-Clang" , "description": "Clang/LLVM for x86 (Debug) for Windows 7", "inherits": [ "base", "x86", "Debug", "Clang", "Clang-X86", "Win8" ] }, + { "name": "x86-Release-Win8-Clang" , "description": "Clang/LLVM for x86 (Release) for Windows 7", "inherits": [ "base", "x86", "Release", "Clang", "Clang-X86", "Win8" ] }, { "name": "x64-Debug-Scarlett-Clang" , "description": "Clang/LLVM for x64 (Debug) for Xbox Series X|S", "inherits": [ "base", "x64", "Debug", "Clang", "Scarlett" ] }, { "name": "x64-Release-Scarlett-Clang", "description": "Clang/LLVM for x64 (Release) for Xbox Series X|S", "inherits": [ "base", "x64", "Release", "Clang", "Scarlett" ] }, diff --git a/DirectXMesh/DirectXMesh_Desktop_2019.vcxproj b/DirectXMesh/DirectXMesh_Desktop_2019.vcxproj index ae328d5a..e075750f 100644 --- a/DirectXMesh/DirectXMesh_Desktop_2019.vcxproj +++ b/DirectXMesh/DirectXMesh_Desktop_2019.vcxproj @@ -138,7 +138,7 @@ Fast StreamingSIMDExtensions2 true - WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -163,7 +163,7 @@ true Fast true - WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -188,7 +188,7 @@ Fast StreamingSIMDExtensions2 true - WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -212,7 +212,7 @@ true Fast true - WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -238,7 +238,7 @@ Fast StreamingSIMDExtensions2 true - WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -262,7 +262,7 @@ true Fast true - WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb diff --git a/DirectXMesh/DirectXMesh_Desktop_2022.vcxproj b/DirectXMesh/DirectXMesh_Desktop_2022.vcxproj index baa91909..57e17c9c 100644 --- a/DirectXMesh/DirectXMesh_Desktop_2022.vcxproj +++ b/DirectXMesh/DirectXMesh_Desktop_2022.vcxproj @@ -138,7 +138,7 @@ Fast StreamingSIMDExtensions2 true - WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -163,7 +163,7 @@ true Fast true - WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -188,7 +188,7 @@ Fast StreamingSIMDExtensions2 true - WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -212,7 +212,7 @@ true Fast true - WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -238,7 +238,7 @@ Fast StreamingSIMDExtensions2 true - WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb @@ -262,7 +262,7 @@ true Fast true - WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0601;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_WINDOWS;_LIB;_WIN32_WINNT=0x0603;_CRT_STDIO_ARBITRARY_WIDE_SPECIFIERS;%(PreprocessorDefinitions) Use DirectXMeshP.h $(IntDir)$(TargetName).pdb diff --git a/Meshconvert/Meshconvert_Desktop_2019.vcxproj b/Meshconvert/Meshconvert_Desktop_2019.vcxproj index 6169f80e..15c9267b 100644 --- a/Meshconvert/Meshconvert_Desktop_2019.vcxproj +++ b/Meshconvert/Meshconvert_Desktop_2019.vcxproj @@ -136,7 +136,7 @@ StreamingSIMDExtensions2 ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) true /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) 26812 @@ -161,7 +161,7 @@ Fast ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) true /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) 26812 @@ -185,7 +185,7 @@ StreamingSIMDExtensions2 ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) @@ -212,7 +212,7 @@ Fast ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) @@ -239,7 +239,7 @@ StreamingSIMDExtensions2 ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) @@ -266,7 +266,7 @@ Fast ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus /ZH:SHA_256 %(AdditionalOptions) diff --git a/Meshconvert/Meshconvert_Desktop_2022.vcxproj b/Meshconvert/Meshconvert_Desktop_2022.vcxproj index b74fb1e6..9569e5f7 100644 --- a/Meshconvert/Meshconvert_Desktop_2022.vcxproj +++ b/Meshconvert/Meshconvert_Desktop_2022.vcxproj @@ -136,7 +136,7 @@ StreamingSIMDExtensions2 ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) true /Zc:__cplusplus %(AdditionalOptions) 26812 @@ -161,7 +161,7 @@ Fast ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;_DEBUG;DEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) true /Zc:__cplusplus %(AdditionalOptions) 26812 @@ -185,7 +185,7 @@ StreamingSIMDExtensions2 ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus %(AdditionalOptions) @@ -212,7 +212,7 @@ Fast ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus %(AdditionalOptions) @@ -239,7 +239,7 @@ StreamingSIMDExtensions2 ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus %(AdditionalOptions) @@ -266,7 +266,7 @@ Fast ..\DirectXMesh;..\Utilities;%(AdditionalIncludeDirectories) true - WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions) + WIN32;NDEBUG;PROFILE;_CONSOLE;_WIN32_WINNT=0x0603;%(PreprocessorDefinitions) Guard true /Zc:__cplusplus %(AdditionalOptions) From 776caf24e2527777aceedf1dbe2844f492f91171 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 5 Dec 2024 20:54:10 -0800 Subject: [PATCH 2/4] Code review --- CMakePresets.json | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index d724d7ec..7b32836a 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -237,10 +237,10 @@ { "name": "arm64-Debug-UWP" , "description": "MSVC for ARM64 (Debug) for UWP", "inherits": [ "base", "ARM64", "Debug", "MSVC", "UWP" ] }, { "name": "arm64-Release-UWP", "description": "MSVC for ARM64 (Release) for UWP", "inherits": [ "base", "ARM64", "Release", "MSVC", "UWP" ] }, - { "name": "x64-Debug-Win8" , "description": "MSVC for x64 (Debug) for Windows 7", "inherits": [ "base", "x64", "Debug", "MSVC", "Win8" ] }, - { "name": "x64-Release-Win8" , "description": "MSVC for x64 (Release) for Windows 7", "inherits": [ "base", "x64", "Release", "MSVC", "Win8" ] }, - { "name": "x86-Debug-Win8" , "description": "MSVC for x86 (Debug) for Windows 7", "inherits": [ "base", "x86", "Debug", "MSVC", "Win8" ] }, - { "name": "x86-Release-Win8" , "description": "MSVC for x86 (Release) for Windows 7", "inherits": [ "base", "x86", "Release", "MSVC", "Win8" ] }, + { "name": "x64-Debug-Win8" , "description": "MSVC for x64 (Debug) for Windows 8.1", "inherits": [ "base", "x64", "Debug", "MSVC", "Win8" ] }, + { "name": "x64-Release-Win8" , "description": "MSVC for x64 (Release) for Windows 8.1", "inherits": [ "base", "x64", "Release", "MSVC", "Win8" ] }, + { "name": "x86-Debug-Win8" , "description": "MSVC for x86 (Debug) for Windows 8.1", "inherits": [ "base", "x86", "Debug", "MSVC", "Win8" ] }, + { "name": "x86-Release-Win8" , "description": "MSVC for x86 (Release) for Windows 8.1", "inherits": [ "base", "x86", "Release", "MSVC", "Win8" ] }, { "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" ] }, @@ -278,10 +278,10 @@ { "name": "arm64-Debug-UWP-Clang" , "description": "Clang/LLVM for AArch64 (Debug) for UWP", "inherits": [ "base", "ARM64", "Debug", "Clang", "Clang-AArch64", "UWP" ] }, { "name": "arm64-Release-UWP-Clang", "description": "Clang/LLVM for AArch64 (Release) for UWP", "inherits": [ "base", "ARM64", "Release", "Clang", "Clang-AArch64", "UWP" ] }, - { "name": "x64-Debug-Win8-Clang" , "description": "Clang/LLVM for x64 (Debug) for Windows 7", "inherits": [ "base", "x64", "Debug", "Clang", "Win8" ] }, - { "name": "x64-Release-Win8-Clang" , "description": "Clang/LLVM for x64 (Release) for Windows 7", "inherits": [ "base", "x64", "Release", "Clang", "Win8" ] }, - { "name": "x86-Debug-Win8-Clang" , "description": "Clang/LLVM for x86 (Debug) for Windows 7", "inherits": [ "base", "x86", "Debug", "Clang", "Clang-X86", "Win8" ] }, - { "name": "x86-Release-Win8-Clang" , "description": "Clang/LLVM for x86 (Release) for Windows 7", "inherits": [ "base", "x86", "Release", "Clang", "Clang-X86", "Win8" ] }, + { "name": "x64-Debug-Win8-Clang" , "description": "Clang/LLVM for x64 (Debug) for Windows 8.1", "inherits": [ "base", "x64", "Debug", "Clang", "Win8" ] }, + { "name": "x64-Release-Win8-Clang" , "description": "Clang/LLVM for x64 (Release) for Windows 8.1", "inherits": [ "base", "x64", "Release", "Clang", "Win8" ] }, + { "name": "x86-Debug-Win8-Clang" , "description": "Clang/LLVM for x86 (Debug) for Windows 8.1", "inherits": [ "base", "x86", "Debug", "Clang", "Clang-X86", "Win8" ] }, + { "name": "x86-Release-Win8-Clang" , "description": "Clang/LLVM for x86 (Release) for Windows 8.1", "inherits": [ "base", "x86", "Release", "Clang", "Clang-X86", "Win8" ] }, { "name": "x64-Debug-Scarlett-Clang" , "description": "Clang/LLVM for x64 (Debug) for Xbox Series X|S", "inherits": [ "base", "x64", "Debug", "Clang", "Scarlett" ] }, { "name": "x64-Release-Scarlett-Clang", "description": "Clang/LLVM for x64 (Release) for Xbox Series X|S", "inherits": [ "base", "x64", "Release", "Clang", "Scarlett" ] }, From 12e28c97c185dd5256f48c6f0f1263e6f2036ced Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Thu, 5 Dec 2024 22:50:18 -0800 Subject: [PATCH 3/4] Always use CreateFile2 --- Meshconvert/Mesh.cpp | 42 ++++++++++++++++-------------------------- 1 file changed, 16 insertions(+), 26 deletions(-) diff --git a/Meshconvert/Mesh.cpp b/Meshconvert/Mesh.cpp index ac0ab005..669046ca 100644 --- a/Meshconvert/Mesh.cpp +++ b/Meshconvert/Mesh.cpp @@ -1073,13 +1073,10 @@ HRESULT Mesh::ExportToVBO(const wchar_t* szFileName) const noexcept } // Write header and data -#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) - ScopedHandle hFile(safe_handle(CreateFile2(szFileName, - GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr))); -#else - ScopedHandle hFile(safe_handle(CreateFileW(szFileName, - GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr))); -#endif + ScopedHandle hFile(safe_handle(CreateFile2( + szFileName, + GENERIC_WRITE, 0, CREATE_ALWAYS, + nullptr))); if (!hFile) return HRESULT_FROM_WIN32(GetLastError()); @@ -1119,11 +1116,10 @@ HRESULT Mesh::CreateFromVBO(const wchar_t* szFileName, std::unique_ptr& re result.reset(); -#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) - ScopedHandle hFile(safe_handle(CreateFile2(szFileName, GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, nullptr))); -#else - ScopedHandle hFile(safe_handle(CreateFileW(szFileName, GENERIC_READ, FILE_SHARE_READ, nullptr, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, nullptr))); -#endif + ScopedHandle hFile(safe_handle(CreateFile2( + szFileName, + GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, + nullptr))); if (!hFile) { return HRESULT_FROM_WIN32(GetLastError()); @@ -1480,13 +1476,10 @@ HRESULT Mesh::ExportToCMO(const wchar_t* szFileName, size_t nMaterials, const Ma } // Create CMO file -#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) - ScopedHandle hFile(safe_handle(CreateFile2(szFileName, - GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr))); -#else - ScopedHandle hFile(safe_handle(CreateFileW(szFileName, - GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr))); -#endif + ScopedHandle hFile(safe_handle(CreateFile2( + szFileName, + GENERIC_WRITE, 0, CREATE_ALWAYS, + nullptr))); if (!hFile) return HRESULT_FROM_WIN32(GetLastError()); @@ -2264,13 +2257,10 @@ HRESULT Mesh::ExportToSDKMESH(const wchar_t* szFileName, } // Create file -#if (_WIN32_WINNT >= _WIN32_WINNT_WIN8) - ScopedHandle hFile(safe_handle(CreateFile2(szFileName, - GENERIC_WRITE, 0, CREATE_ALWAYS, nullptr))); -#else - ScopedHandle hFile(safe_handle(CreateFileW(szFileName, - GENERIC_WRITE, 0, nullptr, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, nullptr))); -#endif + ScopedHandle hFile(safe_handle(CreateFile2( + szFileName, + GENERIC_WRITE, 0, CREATE_ALWAYS, + nullptr))); if (!hFile) return HRESULT_FROM_WIN32(GetLastError()); From 5bdd040428d686562aa69abbe5ee2513da0e2056 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Mon, 9 Dec 2024 14:33:33 -0800 Subject: [PATCH 4/4] Add more jobs --- .github/workflows/main.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index fa5e3ec3..60a056d6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -59,6 +59,12 @@ jobs: - os: windows-2022 build_type: arm64ec-Release arch: amd64_arm64 + - os: windows-2022 + build_type: x64-Debug-Win8 + arch: amd64 + - os: windows-2022 + build_type: x64-Release-Win8 + arch: amd64 - os: windows-2022 build_type: x64-Debug-Clang arch: amd64