mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 19:36:18 +01:00
Merge branch 'nirbheek/preliminary-uwp-support' into 'master'
Preliminary patches for Universal Windows Platform support See merge request GNOME/glib!951
This commit is contained in:
commit
5e7c18fa48
@ -408,7 +408,7 @@ registry_cache_add_item (GNode *parent,
|
|||||||
item->block_count = 0;
|
item->block_count = 0;
|
||||||
item->readable = FALSE;
|
item->readable = FALSE;
|
||||||
|
|
||||||
trace ("\treg cache: adding %s to %s\n",
|
trace ("\tregistry cache: adding %s to %s\n",
|
||||||
name, ((RegistryCacheItem *)parent->data)->name);
|
name, ((RegistryCacheItem *)parent->data)->name);
|
||||||
|
|
||||||
cache_node = g_node_new (item);
|
cache_node = g_node_new (item);
|
||||||
|
@ -39,6 +39,12 @@
|
|||||||
#include <sys/cygwin.h>
|
#include <sys/cygwin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Default family is DESKTOP_APP which is DESKTOP | APP
|
||||||
|
* We want to know when we're only building for apps */
|
||||||
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
||||||
|
#define G_WINAPI_ONLY_APP
|
||||||
|
#endif
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_error (const gchar *format,
|
set_error (const gchar *format,
|
||||||
...)
|
...)
|
||||||
@ -84,7 +90,15 @@ _g_module_open (const gchar *file_name,
|
|||||||
success = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, &old_mode);
|
success = SetThreadErrorMode (SEM_NOOPENFILEERRORBOX | SEM_FAILCRITICALERRORS, &old_mode);
|
||||||
if (!success)
|
if (!success)
|
||||||
set_error ("");
|
set_error ("");
|
||||||
|
|
||||||
|
/* When building for UWP, load app asset DLLs instead of filesystem DLLs.
|
||||||
|
* Needs MSVC, Windows 8 and newer, and is only usable from apps. */
|
||||||
|
#if _WIN32_WINNT >= 0x0602 && defined(G_WINAPI_ONLY_APP)
|
||||||
|
handle = LoadPackagedLibrary (wfilename, 0);
|
||||||
|
#else
|
||||||
handle = LoadLibraryW (wfilename);
|
handle = LoadLibraryW (wfilename);
|
||||||
|
#endif
|
||||||
|
|
||||||
if (success)
|
if (success)
|
||||||
SetThreadErrorMode (old_mode, NULL);
|
SetThreadErrorMode (old_mode, NULL);
|
||||||
g_free (wfilename);
|
g_free (wfilename);
|
||||||
|
Loading…
Reference in New Issue
Block a user