diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-11-19 09:00:47 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-19 09:00:47 +0100 |
commit | 319126a0397b5d65e13b4201b9d1cf3952522b51 (patch) | |
tree | 9923fc7265093d54ed4022b368679681b921e91f | |
parent | 2ca1c17a5cfd681a4fdb72c3c9fccb77792ae0b0 (diff) | |
parent | c4f2d8774717c717d07861f690f84091d4710f43 (diff) |
Merge pull request #43671 from m4gr3d/fix_zipalign_bug_on_windows
Fix zipalign command name on Windows machines
-rw-r--r-- | platform/android/export/export.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp index 53b43ae0e8..35a7c54a8f 100644 --- a/platform/android/export/export.cpp +++ b/platform/android/export/export.cpp @@ -2269,6 +2269,13 @@ public: 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"); @@ -2283,7 +2290,7 @@ public: 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; |