Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Only use long executable path when necessary, fix broken apksigner detection. #96777

Merged
merged 1 commit into from
Sep 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading