mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-25 22:23:42 +08:00
[godot] More Live++ build changes.
This commit is contained in:
parent
8759370947
commit
1290108bd6
@ -1,25 +1,31 @@
|
|||||||
From 3077827d8145f4689b6f43db9924dd71d9963b5d Mon Sep 17 00:00:00 2001
|
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
|
||||||
From: badlogic <badlogicgames@gmail.com>
|
index 8b28cbf1f23d6574aac41a3676fea64ddf786fc4..0124d4ac9652df9ba682ab8cc18b4008461d74cf 100644
|
||||||
Date: Mon, 11 Apr 2022 13:33:10 +0200
|
--- a/platform/windows/os_windows.cpp
|
||||||
Subject: [PATCH] Add support for Live++ on Windows
|
+++ b/platform/windows/os_windows.cpp
|
||||||
|
@@ -53,6 +53,11 @@
|
||||||
When the LIVEPP_PATH environment variable is set, the build adds a CPPDEFINE called LIVEPP_PATH, which then triggers setup, synchronization, and tear down of Live++.
|
#include <regstr.h>
|
||||||
|
#include <shlobj.h>
|
||||||
Improve inclusion of Live++ API header as per PR review.
|
|
||||||
|
+#ifdef LIVEPP_PATH
|
||||||
Still requires a separate wide char version of _MKSTR as that's what lpp::lppLoadAndRegister requires.
|
+#include "API/LPP_API.h"
|
||||||
|
+extern HMODULE livePP;
|
||||||
Use build option livepp instead of environment variable LIVEPP_PATH
|
+#endif
|
||||||
|
+
|
||||||
E.g. `scons livepp=c:/tools/LivePP`
|
static const WORD MAX_CONSOLE_LINES = 1500;
|
||||||
---
|
|
||||||
platform/windows/detect.py | 13 ++++++++++++-
|
extern "C" {
|
||||||
platform/windows/godot_windows.cpp | 20 ++++++++++++++++++++
|
@@ -3371,6 +3376,9 @@ void OS_Windows::run() {
|
||||||
platform/windows/os_windows.cpp | 8 ++++++++
|
process_events(); // get rid of pending events
|
||||||
3 files changed, 40 insertions(+), 1 deletion(-)
|
if (Main::iteration())
|
||||||
|
break;
|
||||||
|
+#ifdef LIVEPP_PATH
|
||||||
|
+ lpp::lppSyncPoint(livePP);
|
||||||
|
+#endif
|
||||||
|
};
|
||||||
|
|
||||||
|
main_loop->finish();
|
||||||
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
|
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
|
||||||
index 249a0d2e79..fb42edff8b 100644
|
index e4facad816b7584fe38dc760356310e0a3937288..2d9da3df65cd3a0b0882ace984002320ebf6c3fc 100644
|
||||||
--- a/platform/windows/detect.py
|
--- a/platform/windows/detect.py
|
||||||
+++ b/platform/windows/detect.py
|
+++ b/platform/windows/detect.py
|
||||||
@@ -44,7 +44,7 @@ def can_build():
|
@@ -44,7 +44,7 @@ def can_build():
|
||||||
@ -31,7 +37,7 @@ index 249a0d2e79..fb42edff8b 100644
|
|||||||
|
|
||||||
mingw32 = ""
|
mingw32 = ""
|
||||||
mingw64 = ""
|
mingw64 = ""
|
||||||
@@ -73,6 +73,7 @@ def get_opts():
|
@@ -72,6 +72,7 @@ def get_opts():
|
||||||
BoolVariable("use_thinlto", "Use ThinLTO", False),
|
BoolVariable("use_thinlto", "Use ThinLTO", False),
|
||||||
BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
|
BoolVariable("use_static_cpp", "Link MinGW/MSVC C++ runtime libraries statically", True),
|
||||||
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
|
BoolVariable("use_asan", "Use address sanitizer (ASAN)", False),
|
||||||
@ -39,7 +45,7 @@ index 249a0d2e79..fb42edff8b 100644
|
|||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
@@ -309,6 +310,16 @@ def configure_msvc(env, manual_msvc_config):
|
@@ -296,6 +297,18 @@ def configure_msvc(env, manual_msvc_config):
|
||||||
|
|
||||||
env.AppendUnique(LINKFLAGS=["/STACK:" + str(STACK_SIZE)])
|
env.AppendUnique(LINKFLAGS=["/STACK:" + str(STACK_SIZE)])
|
||||||
|
|
||||||
@ -53,11 +59,13 @@ index 249a0d2e79..fb42edff8b 100644
|
|||||||
+ env.AppendUnique(LINKFLAGS=["/FUNCTIONPADMIN"])
|
+ env.AppendUnique(LINKFLAGS=["/FUNCTIONPADMIN"])
|
||||||
+ else:
|
+ else:
|
||||||
+ print("Live++ can only be used with targets 'debug' and 'release_debug'")
|
+ print("Live++ can only be used with targets 'debug' and 'release_debug'")
|
||||||
|
+ else:
|
||||||
|
+ print("No Live++ specified.")
|
||||||
|
|
||||||
def configure_mingw(env):
|
def configure_mingw(env):
|
||||||
# Workaround for MinGW. See:
|
# Workaround for MinGW. See:
|
||||||
diff --git a/platform/windows/godot_windows.cpp b/platform/windows/godot_windows.cpp
|
diff --git a/platform/windows/godot_windows.cpp b/platform/windows/godot_windows.cpp
|
||||||
index ad4e3ae77c..0974d3d9ae 100644
|
index d7d9e4eace00a696abbb47cb9632f40e183a4ec4..e362320e51c725cd01f292887bd93442752c1c48 100644
|
||||||
--- a/platform/windows/godot_windows.cpp
|
--- a/platform/windows/godot_windows.cpp
|
||||||
+++ b/platform/windows/godot_windows.cpp
|
+++ b/platform/windows/godot_windows.cpp
|
||||||
@@ -34,6 +34,11 @@
|
@@ -34,6 +34,11 @@
|
||||||
@ -75,7 +83,7 @@ index ad4e3ae77c..0974d3d9ae 100644
|
|||||||
@@ -136,6 +141,16 @@ char *wc_to_utf8(const wchar_t *wc) {
|
@@ -136,6 +141,16 @@ char *wc_to_utf8(const wchar_t *wc) {
|
||||||
}
|
}
|
||||||
|
|
||||||
int widechar_main(int argc, wchar_t **argv) {
|
__declspec(dllexport) int widechar_main(int argc, wchar_t **argv) {
|
||||||
+#ifdef LIVEPP_PATH
|
+#ifdef LIVEPP_PATH
|
||||||
+#define _MKSTR_L(x) _STR_L(x)
|
+#define _MKSTR_L(x) _STR_L(x)
|
||||||
+#define _STR_L(x) L#x
|
+#define _STR_L(x) L#x
|
||||||
@ -86,10 +94,10 @@ index ad4e3ae77c..0974d3d9ae 100644
|
|||||||
+#undef _STR_L
|
+#undef _STR_L
|
||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
OS_Windows os(nullptr);
|
OS_Windows os(NULL);
|
||||||
|
|
||||||
setlocale(LC_CTYPE, "");
|
setlocale(LC_CTYPE, "");
|
||||||
@@ -173,6 +188,11 @@ int widechar_main(int argc, wchar_t **argv) {
|
@@ -170,6 +185,11 @@ __declspec(dllexport) int widechar_main(int argc, wchar_t **argv) {
|
||||||
}
|
}
|
||||||
delete[] argv_utf8;
|
delete[] argv_utf8;
|
||||||
|
|
||||||
@ -99,34 +107,5 @@ index ad4e3ae77c..0974d3d9ae 100644
|
|||||||
+#endif
|
+#endif
|
||||||
+
|
+
|
||||||
return os.get_exit_code();
|
return os.get_exit_code();
|
||||||
}
|
};
|
||||||
|
|
||||||
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
|
|
||||||
index b4669e452a..42f675598a 100644
|
|
||||||
--- a/platform/windows/os_windows.cpp
|
|
||||||
+++ b/platform/windows/os_windows.cpp
|
|
||||||
@@ -53,6 +53,11 @@
|
|
||||||
#include <regstr.h>
|
|
||||||
#include <shlobj.h>
|
|
||||||
|
|
||||||
+#ifdef LIVEPP_PATH
|
|
||||||
+#include "API/LPP_API.h"
|
|
||||||
+extern HMODULE livePP;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
extern "C" {
|
|
||||||
__declspec(dllexport) DWORD NvOptimusEnablement = 1;
|
|
||||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
|
|
||||||
@@ -677,6 +682,9 @@ void OS_Windows::run() {
|
|
||||||
if (Main::iteration()) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
+#ifdef LIVEPP_PATH
|
|
||||||
+ lpp::lppSyncPoint(livePP);
|
|
||||||
+#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
main_loop->finalize();
|
|
||||||
--
|
|
||||||
2.27.0.windows.1
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
git clean -x -f -d
|
|
||||||
rmdir godot /s /q
|
rmdir godot /s /q
|
||||||
git clone --depth 1 https://github.com/godotengine/godot.git -b 3.4.4-stable
|
git clone --depth 1 https://github.com/godotengine/godot.git -b 3.4.4-stable
|
||||||
xcopy /E /I .idea godot\.idea
|
xcopy /E /I .idea godot\.idea
|
||||||
|
|||||||
@ -1,6 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -e
|
set -e
|
||||||
git clean -x -f -d
|
|
||||||
rm -rf godot
|
rm -rf godot
|
||||||
git clone --depth 1 https://github.com/godotengine/godot.git -b 3.4.4-stable
|
git clone --depth 1 https://github.com/godotengine/godot.git -b 3.4.4-stable
|
||||||
cp -r .idea godot
|
cp -r .idea godot
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user