Merge pull request #112784 from migueldeicaza/fix_dynamic_xcframework_loading
iOS: Fix loading of xcframework dynamic libraries.
This commit is contained in:
@ -195,9 +195,13 @@ Error GDExtensionLibraryLoader::open_library(const String &p_path) {
|
||||
&abs_dependencies_paths, // library_dependencies
|
||||
};
|
||||
|
||||
err = OS::get_singleton()->open_dynamic_library(is_static_library ? String() : abs_path, library, &data);
|
||||
// Apple has a complex lookup system which goes beyond looking up the filename, so we try that first.
|
||||
err = OS::get_singleton()->open_dynamic_library(abs_path, library, &data);
|
||||
if (err != OK) {
|
||||
return err;
|
||||
err = OS::get_singleton()->open_dynamic_library(String(), library, &data);
|
||||
if (err != OK) {
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
return OK;
|
||||
@ -361,8 +365,6 @@ Error GDExtensionLibraryLoader::parse_gdextension_file(const String &p_path) {
|
||||
return ERR_FILE_NOT_FOUND;
|
||||
}
|
||||
|
||||
is_static_library = library_path.ends_with(".a") || library_path.ends_with(".xcframework");
|
||||
|
||||
if (!library_path.is_resource_file() && !library_path.is_absolute_path()) {
|
||||
library_path = p_path.get_base_dir().path_join(library_path);
|
||||
}
|
||||
|
||||
@ -49,8 +49,6 @@ private:
|
||||
String library_path;
|
||||
String entry_symbol;
|
||||
|
||||
bool is_static_library = false;
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
bool is_reloadable = false;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user