summaryrefslogtreecommitdiff
path: root/editor/plugins
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2022-05-25 01:17:59 +0200
committerGitHub <noreply@github.com>2022-05-25 01:17:59 +0200
commit360119ffbf3e7690971fe54d3772cb3dffd004ad (patch)
tree9baeb787cf98b55b80d2e187dd52671f29e56418 /editor/plugins
parentcc21892fa4f8ea7e8f1618e72546f1d4efe24a35 (diff)
parent9c2b5ae5ce737ad3cd7507e76ac3a35a9dcaa31f (diff)
Merge pull request #61352 from Faless/ext/linux_export
[Editor] Fix GDExtension GNU/Linux export.
Diffstat (limited to 'editor/plugins')
-rw-r--r--editor/plugins/gdextension_export_plugin.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h
index c17e02e1fd..b91a17d9e5 100644
--- a/editor/plugins/gdextension_export_plugin.h
+++ b/editor/plugins/gdextension_export_plugin.h
@@ -47,14 +47,9 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
config.instantiate();
Error err = config->load(p_path);
+ ERR_FAIL_COND_MSG(err, "Failed to load GDExtension file: " + p_path);
- if (err != OK) {
- return;
- }
-
- if (!config->has_section_key("configuration", "entry_symbol")) {
- return;
- }
+ ERR_FAIL_COND_MSG(!config->has_section_key("configuration", "entry_symbol"), "Failed to export GDExtension file, missing entry symbol: " + p_path);
String entry_symbol = config->get_value("configuration", "entry_symbol");
@@ -62,6 +57,7 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
config->get_section_keys("libraries", &libraries);
+ bool could_export = false;
for (const String &E : libraries) {
Vector<String> tags = E.split(".");
bool all_tags_met = true;
@@ -101,13 +97,23 @@ void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p
String linker_flags = "-Wl,-U,_" + entry_symbol;
add_ios_linker_flags(linker_flags);
}
+ could_export = true;
break;
}
}
+ if (!could_export) {
+ Vector<String> tags;
+ for (const String &E : p_features) {
+ tags.append(E);
+ }
+ ERR_FAIL_MSG(vformat("Couldn't export extension: %s. No suitable library found for export flags: %s", p_path, String(", ").join(tags)));
+ }
List<String> dependencies;
+ if (config->has_section("dependencies")) {
+ config->get_section_keys("dependencies", &dependencies);
+ }
- config->get_section_keys("dependencies", &dependencies);
for (const String &E : libraries) {
Vector<String> tags = E.split(".");
bool all_tags_met = true;