1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-14 13:41:12 +00:00

Proper GDNative export on Android

This commit is contained in:
Ruslan Mustakov
2017-11-21 01:12:36 +07:00
parent 5ff84070ca
commit ebf9b80a47
3 changed files with 97 additions and 51 deletions

View File

@@ -123,7 +123,13 @@ bool GDNative::initialize() {
return false;
}
#ifdef IPHONE_ENABLED
// on iOS we use static linking
String path = "";
#elif defined(ANDROID_ENABLED)
// On Android dynamic libraries are located separately from resource assets,
// we should pass library name to dlopen(). The library name is flattened
// during export.
String path = lib_path.get_file();
#else
String path = ProjectSettings::get_singleton()->globalize_path(lib_path);
#endif