Skip to content

Commit 444683b

Browse files
committed
Merge pull request godotengine#96777 from bruvzg/and_exp_win
[Windows] Only use long executable path when necessary, fix broken apksigner detection.
2 parents 1a51637 + 2c991a7 commit 444683b

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

platform/android/export/export_plugin.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2276,6 +2276,11 @@ String EditorExportPlatformAndroid::get_apksigner_path(int p_target_sdk, bool p_
22762276
bool failed = false;
22772277
String version_to_use;
22782278

2279+
String java_sdk_path = EDITOR_GET("export/android/java_sdk_path");
2280+
if (!java_sdk_path.is_empty()) {
2281+
OS::get_singleton()->set_environment("JAVA_HOME", java_sdk_path);
2282+
}
2283+
22792284
List<String> args;
22802285
args.push_back("--version");
22812286
String output;

platform/windows/os_windows.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ static String fix_path(const String &p_path) {
101101
}
102102
path = path.simplify_path();
103103
path = path.replace("/", "\\");
104-
if (!path.is_network_share_path() && !path.begins_with(R"(\\?\)")) {
104+
if (path.size() >= MAX_PATH && !path.is_network_share_path() && !path.begins_with(R"(\\?\)")) {
105105
path = R"(\\?\)" + path;
106106
}
107107
return path;

0 commit comments

Comments
 (0)