From 2a023a425dd73ee476aa78fc6a544ea3bfbc010b Mon Sep 17 00:00:00 2001 From: George Marques Date: Mon, 1 Jan 2018 13:59:13 -0200 Subject: Make GDNative DLLs work on UWP --- modules/gdnative/gdnative.cpp | 3 +++ modules/gdnative/gdnative_library_editor_plugin.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/gdnative') diff --git a/modules/gdnative/gdnative.cpp b/modules/gdnative/gdnative.cpp index 9c0041cbe0..51dbba7d28 100644 --- a/modules/gdnative/gdnative.cpp +++ b/modules/gdnative/gdnative.cpp @@ -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 diff --git a/modules/gdnative/gdnative_library_editor_plugin.cpp b/modules/gdnative/gdnative_library_editor_plugin.cpp index 1e638ab702..22fb058851 100644 --- a/modules/gdnative/gdnative_library_editor_plugin.cpp +++ b/modules/gdnative/gdnative_library_editor_plugin.cpp @@ -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; -- cgit v1.2.3