summaryrefslogtreecommitdiff
path: root/platform/android/export
diff options
context:
space:
mode:
authorSkyJJ <jjchai01@hotmail.com>2020-03-31 09:11:23 +0200
committerSkyJJ <jjchai01@hotmail.com>2020-04-13 12:16:08 +0200
commit7fcd13575eb88386dcf32a291c816569da6b42d0 (patch)
treedede721204711c6d4a78a7e4cf61351dc9f3caeb /platform/android/export
parente2b01a7cc6f6007996086af6aafeb4ba9aa50ae8 (diff)
Validate supported architectures when exporting to Android
Diffstat (limited to 'platform/android/export')
-rw-r--r--platform/android/export/export.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/platform/android/export/export.cpp b/platform/android/export/export.cpp
index b6c30d120c..1eb1ee0d29 100644
--- a/platform/android/export/export.cpp
+++ b/platform/android/export/export.cpp
@@ -1932,6 +1932,7 @@ public:
ImageLoader::load_image(path, launcher_adaptive_icon_background_image);
}
+ Vector<String> invalid_abis(enabled_abis);
while (ret == UNZ_OK) {
//get filename
@@ -1977,6 +1978,7 @@ public:
bool enabled = false;
for (int i = 0; i < enabled_abis.size(); ++i) {
if (file.begins_with("lib/" + enabled_abis[i] + "/")) {
+ invalid_abis.erase(enabled_abis[i]);
enabled = true;
break;
}
@@ -2016,6 +2018,13 @@ public:
ret = unzGoToNextFile(pkg);
}
+ if (!invalid_abis.empty()) {
+ String unsupported_arch = String(", ").join(invalid_abis);
+ EditorNode::add_io_error("Missing libraries in the export template for the selected architectures: " + unsupported_arch + ".\n" +
+ "Please build a template with all required libraries, or uncheck the missing architectures in the export preset.");
+ CLEANUP_AND_RETURN(ERR_FILE_NOT_FOUND);
+ }
+
if (ep.step("Adding files...", 1)) {
CLEANUP_AND_RETURN(ERR_SKIP);
}