mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-04 18:18:56 +01:00
Fix process spawning with static build on Windows
On Windows, process spawning needs an external helper exe which is found relatively to the glib DLL file. If glib has been built statically this file doesn't exist anymore and reference path is not the DLL path anymore but the current executable path. This patch searches for the helper exe taking as starting point the current executable path, relative 'bin', 'lib', 'glib' and 'gio' folders and then gets one level up until the root path. If this search doesn't give result then the helper exe is searched using the PATH variable.
This commit is contained in:
@@ -120,7 +120,6 @@ gboolean g_check_setuid (void);
|
||||
GMainContext * g_main_context_new_with_next_id (guint next_id);
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
gchar *_glib_get_dll_directory (void);
|
||||
GLIB_AVAILABLE_IN_ALL
|
||||
gchar *_glib_get_locale_dir (void);
|
||||
#endif
|
||||
@@ -168,6 +167,10 @@ typedef struct {
|
||||
|
||||
int (* g_win32_fstat) (int fd,
|
||||
GWin32PrivateStat *buf);
|
||||
|
||||
/* See gwin32.c */
|
||||
gchar *(*g_win32_find_helper_executable_path) (const gchar *process_name,
|
||||
void *dll_handle);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user