mirror of
https://github.com/godotengine/godot.git
synced 2024-12-15 10:12:40 +08:00
Merge pull request #37295 from SkyLucilfer/AndroidExportValidation
Validate supported architectures when exporting to Android
This commit is contained in:
commit
d4b211bb3d
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user