Skip to content

Commit

Permalink
Merge pull request godotengine#96777 from bruvzg/and_exp_win
Browse files Browse the repository at this point in the history
[Windows] Only use long executable path when necessary, fix broken apksigner detection.
  • Loading branch information
akien-mga committed Sep 10, 2024
2 parents 1a51637 + 2c991a7 commit 444683b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions platform/android/export/export_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion platform/windows/os_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 444683b

Please sign in to comment.