bugfix xmake config

This commit is contained in:
ouczbs 2024-05-09 16:40:30 +08:00
parent d1068d5b97
commit db1938998d
4 changed files with 13 additions and 7 deletions

View File

@ -2,5 +2,6 @@
add_requires("gtest") add_requires("gtest")
add_requires("vulkansdk","spirv-tools") add_requires("vulkansdk","spirv-tools")
add_requires("glfw") add_requires("glfw")
add_requires("glslang 1.3.211") add_requires("shaderc")
add_requires("glslang")
add_requires("assimp","freetype","glad","spirv-cross","stb") add_requires("assimp","freetype","glad","spirv-cross","stb")

View File

@ -289,7 +289,7 @@ ManagedErrorString::ManagedErrorString(DWORD NTStatusMessage, ...)
{ {
va_list list; va_list list;
va_start(list, NTStatusMessage); va_start(list, NTStatusMessage);
Hand = LoadLibrary("NTDLL.DLL"); Hand = LoadLibrary(L"NTDLL.DLL");
numChars = FormatMessage( numChars = FormatMessage(
@ -306,7 +306,7 @@ ManagedErrorString::ManagedErrorString(DWORD NTStatusMessage, ...)
} }
ManagedErrorString::ManagedErrorString(DWORD NTStatusMessage, int count , DWORD_PTR* test ) ManagedErrorString::ManagedErrorString(DWORD NTStatusMessage, int count , DWORD_PTR* test )
{ {
Hand = LoadLibrary("NTDLL.DLL"); Hand = LoadLibrary(L"NTDLL.DLL");
numChars = FormatMessage( numChars = FormatMessage(
@ -423,7 +423,7 @@ void RegisterUnhandledExceptionHandler()
auto errStr = ManagedErrorString{ errorCode,2,info->ExceptionRecord->ExceptionInformation[0],info->ExceptionRecord->ExceptionInformation[1] };// , info->ExceptionRecord->NumberParameters, info->ExceptionRecord->ExceptionInformation }; auto errStr = ManagedErrorString{ errorCode,2,info->ExceptionRecord->ExceptionInformation[0],info->ExceptionRecord->ExceptionInformation[1] };// , info->ExceptionRecord->NumberParameters, info->ExceptionRecord->ExceptionInformation };
overrideMinHide = true; overrideMinHide = true;
auto str = GetErrorString(*info->ExceptionRecord); auto str = GetErrorString(*info->ExceptionRecord);
MessageBox(_hwnd, "SetUnhandledExceptionFilter", "Unhandled Exception", MB_OK); MessageBox(_hwnd, str.c_str(), L"Unhandled Exception", MB_OK);
auto str2 = GetErrorString(*info->ExceptionRecord); auto str2 = GetErrorString(*info->ExceptionRecord);
auto errStr2 = ManagedErrorString{ errorCode,2,info->ExceptionRecord->ExceptionInformation[0],info->ExceptionRecord->ExceptionInformation[1] };// , info->ExceptionRecord->NumberParameters, info->ExceptionRecord->ExceptionInformation }; auto errStr2 = ManagedErrorString{ errorCode,2,info->ExceptionRecord->ExceptionInformation[0],info->ExceptionRecord->ExceptionInformation[1] };// , info->ExceptionRecord->NumberParameters, info->ExceptionRecord->ExceptionInformation };
auto errStr3 = ManagedErrorString{ errorCode,2,(DWORD_PTR*)info->ExceptionRecord->ExceptionInformation };// , info->ExceptionRecord->NumberParameters, info->ExceptionRecord->ExceptionInformation }; auto errStr3 = ManagedErrorString{ errorCode,2,(DWORD_PTR*)info->ExceptionRecord->ExceptionInformation };// , info->ExceptionRecord->NumberParameters, info->ExceptionRecord->ExceptionInformation };

View File

@ -22,6 +22,7 @@ target("asset_compiler")
target("editor") target("editor")
set_kind("static") set_kind("static")
set_languages("cxx20")
add_deps("idk","vkn", "opengl","editorstatic", {public = true}) add_deps("idk","vkn", "opengl","editorstatic", {public = true})
add_includedirs("engine", "engine/editor", {public = true}) add_includedirs("engine", "engine/editor", {public = true})
add_files("engine/editor/*.cpp","engine/editor/**.cpp") add_files("engine/editor/*.cpp","engine/editor/**.cpp")
@ -45,7 +46,10 @@ target("game")
target("launcher") target("launcher")
set_kind("binary") set_kind("binary")
add_deps("editor") add_deps("editor", "win32")
add_syslinks("Xinput")
add_defines([[TEST_DATA_PATH=R"($(ProjectDir)test_data)"]])
add_defines([[TEST_BIN_DIR=R"($(OutDir))"]])
add_includedirs("engine", "engine/launcher", {public = true}) add_includedirs("engine", "engine/launcher", {public = true})
add_files("engine/launcher/*.cpp") add_files("engine/launcher/*.cpp")
add_headerfiles("engine/launcher/*.h") add_headerfiles("engine/launcher/*.h")
@ -62,7 +66,7 @@ target("opengl")
target("vkn") target("vkn")
set_kind("static") set_kind("static")
add_deps("idk","win32") add_deps("idk","win32")
add_packages("vulkansdk","stb", "glslang","spirv-cross", {public = true}) add_packages("vulkansdk","stb", "glslang","shaderc","spirv-cross", {public = true})
add_includedirs("engine", "engine/vkn", {public = true}) add_includedirs("engine", "engine/vkn", {public = true})
add_files("engine/vkn/*.cpp","engine/vkn/**.cpp") add_files("engine/vkn/*.cpp","engine/vkn/**.cpp")
add_headerfiles("engine/vkn/*.h","engine/vkn/**.h") add_headerfiles("engine/vkn/*.h","engine/vkn/**.h")

View File

@ -7,6 +7,7 @@ set_toolchains("msvc")
-- 添加 /bigobj 编译选项 -- 添加 /bigobj 编译选项
add_cxflags("/bigobj") add_cxflags("/bigobj")
includes("src/xmake.lua") includes("src/xmake.lua")
--xmake f --vs_toolset=14.2 -c --__std_find_trivial_1 msvc 版本不一致会有这个报错
--xmake f --vs_toolset=14.3 -c
--xmake project -k vsxmake2022 -a x64 --xmake project -k vsxmake2022 -a x64
--xmake project -k vsxmake2022 -m "debug;release" --xmake project -k vsxmake2022 -m "debug;release"