From f81e1cd376b3a70358fd4c667bdefa5b114a8840 Mon Sep 17 00:00:00 2001 From: cigumo Date: Mon, 1 Aug 2022 15:58:29 -0300 Subject: [PATCH] adds GDK Xbox One, Scarlett and Desktop configurations --- include/bx/platform.h | 2 +- scripts/toolchain.lua | 24 +++++++++++++++++++++++- 2 files changed, 24 insertions(+), 2 deletions(-) diff --git a/include/bx/platform.h b/include/bx/platform.h index f14f9b680..3307fc80f 100644 --- a/include/bx/platform.h +++ b/include/bx/platform.h @@ -151,7 +151,7 @@ #endif // BX_CPU_PPC // http://sourceforge.net/apps/mediawiki/predef/index.php?title=Operating_Systems -#if defined(_DURANGO) || defined(_XBOX_ONE) +#if defined (_DURANGO) || defined(_XBOX_ONE) || defined(_GAMING_XBOX) # undef BX_PLATFORM_XBOXONE # define BX_PLATFORM_XBOXONE 1 #elif defined(_WIN32) || defined(_WIN64) diff --git a/scripts/toolchain.lua b/scripts/toolchain.lua index 964e58e37..6f39553ea 100644 --- a/scripts/toolchain.lua +++ b/scripts/toolchain.lua @@ -105,6 +105,7 @@ function toolchain(_buildDir, _libDir) { "winstore100", "Universal Windows App 10.0" }, { "durango", "Durango" }, { "orbis", "Orbis" }, + { "gdk", "GDK Desktop/Xbox" }, }, } @@ -418,6 +419,11 @@ function toolchain(_buildDir, _libDir) premake.vstudio.storeapp = "durango" platforms { "Durango" } location (path.join(_buildDir, "projects", _ACTION .. "-durango")) + + elseif "gdk" == _OPTIONS["vs"] then + platforms { "gdk-desktop", "gdk-xboxone", "gdk-scarlett" } + location (path.join(_buildDir, "projects", _ACTION .. "-gdk")) + elseif "orbis" == _OPTIONS["vs"] then if not os.getenv("SCE_ORBIS_SDK_DIR") then @@ -506,7 +512,7 @@ function toolchain(_buildDir, _libDir) "EnableSSE2", } - configuration { "vs*", "not orbis", "not NX32", "not NX64" } + configuration { "vs*", "not orbis", "not NX32", "not NX64"} includedirs { path.join(bxDir, "include/compat/msvc") } defines { "WIN32", @@ -901,6 +907,22 @@ function toolchain(_buildDir, _libDir) "NOMINMAX", } + configuration { "gdk"} + targetdir (path.join(_buildDir, "gdk/bin/$(Platform)/$(Configuration)")) + objdir (path.join(_buildDir, "gdk/obj/$(Platform)/$(Configuration)")) + defines { + "_WIN64", + "NOMINMAX", + "UNICODE", + "_UNICODE", + } + removeflags { "StaticRuntime" } + + configuration { "gdk", "gdk-xboxone or gdk-scarlett"} + buildoptions { + "/favor:AMD64", + } + configuration { "netbsd" } targetdir (path.join(_buildDir, "netbsd/bin")) objdir (path.join(_buildDir, "netbsd/obj"))