summaryrefslogtreecommitdiffstats
path: root/platform
diff options
context:
space:
mode:
authorbruvzg <7645683+bruvzg@users.noreply.github.com>2024-09-10 10:20:28 +0300
committerbruvzg <7645683+bruvzg@users.noreply.github.com>2024-09-10 10:34:44 +0300
commit2c991a727b1ff94fa5adca3a5a196ffa1162f98d (patch)
tree2aa14fce14f1f9198c0b62d3aa14d0bba1d2a516 /platform
parent21249950da50e094b141f73646fd477d7832c8db (diff)
downloadredot-engine-2c991a727b1ff94fa5adca3a5a196ffa1162f98d.tar.gz
[Windows] Only use long executable path when necessary, fix broken apksigner detection.
Diffstat (limited to 'platform')
-rw-r--r--platform/android/export/export_plugin.cpp5
-rw-r--r--platform/windows/os_windows.cpp2
2 files changed, 6 insertions, 1 deletions
diff --git a/platform/android/export/export_plugin.cpp b/platform/android/export/export_plugin.cpp
index f8ac591a78..d78f8db79c 100644
--- a/platform/android/export/export_plugin.cpp
+++ b/platform/android/export/export_plugin.cpp
@@ -2276,6 +2276,11 @@ String EditorExportPlatformAndroid::get_apksigner_path(int p_target_sdk, bool p_
bool failed = false;
String version_to_use;
+ String java_sdk_path = EDITOR_GET("export/android/java_sdk_path");
+ if (!java_sdk_path.is_empty()) {
+ OS::get_singleton()->set_environment("JAVA_HOME", java_sdk_path);
+ }
+
List<String> args;
args.push_back("--version");
String output;
diff --git a/platform/windows/os_windows.cpp b/platform/windows/os_windows.cpp
index f9c636a4a6..e6e8c6aaef 100644
--- a/platform/windows/os_windows.cpp
+++ b/platform/windows/os_windows.cpp
@@ -101,7 +101,7 @@ static String fix_path(const String &p_path) {
}
path = path.simplify_path();
path = path.replace("/", "\\");
- if (!path.is_network_share_path() && !path.begins_with(R"(\\?\)")) {
+ if (path.size() >= MAX_PATH && !path.is_network_share_path() && !path.begins_with(R"(\\?\)")) {
path = R"(\\?\)" + path;
}
return path;