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

Fix zipalign command name on Windows machines #43671

Merged
merged 1 commit into from
Nov 19, 2020
Merged
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
9 changes: 8 additions & 1 deletion platform/android/export/export.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2269,6 +2269,13 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {

Error _zip_align_project(const String &sdk_path, const String &unaligned_file_path, const String &aligned_file_path) {
// Look for the zipalign tool.
String zipalign_command_name;
#ifdef WINDOWS_ENABLED
zipalign_command_name = "zipalign.exe";
#else
zipalign_command_name = "zipalign";
#endif

String zipalign_command;
Error errn;
String build_tools_dir = sdk_path.plus_file("build-tools");
Expand All @@ -2283,7 +2290,7 @@ class EditorExportPlatformAndroid : public EditorExportPlatform {
while (!sub_dir.empty()) {
if (!sub_dir.begins_with(".") && da->current_is_dir()) {
// Check if the tool is here.
String tool_path = build_tools_dir.plus_file(sub_dir).plus_file("zipalign");
String tool_path = build_tools_dir.plus_file(sub_dir).plus_file(zipalign_command_name);
if (FileAccess::exists(tool_path)) {
zipalign_command = tool_path;
break;
Expand Down