Make GDNative DLLs work on UWP

This commit is contained in:
George Marques 2018-01-01 13:59:13 -02:00
parent abf416f922
commit 2a023a425d
No known key found for this signature in database
GPG key ID: 046BD46A3201E43D
5 changed files with 65 additions and 2 deletions

View file

@ -130,6 +130,9 @@ bool GDNative::initialize() {
// we should pass library name to dlopen(). The library name is flattened
// during export.
String path = lib_path.get_file();
#elif defined(UWP_ENABLED)
// On UWP we use a relative path from the app
String path = lib_path.replace("res://", "");
#else
String path = ProjectSettings::get_singleton()->globalize_path(lib_path);
#endif

View file

@ -299,8 +299,8 @@ GDNativeLibraryEditor::GDNativeLibraryEditor() {
NativePlatformConfig platform_uwp;
platform_uwp.name = "Windows Universal";
platform_uwp.entries.push_back("arm");
platform_uwp.entries.push_back("x86");
platform_uwp.entries.push_back("x64");
platform_uwp.entries.push_back("32");
platform_uwp.entries.push_back("64");
platform_uwp.library_extension = "*.dll";
platforms["UWP"] = platform_uwp;