summaryrefslogtreecommitdiff
path: root/glib/glib-init.h
diff options
context:
space:
mode:
authorLoic Le Page <llepage@fluendo.com>2022-01-05 18:06:01 +0100
committerLoic Le Page <llepage@fluendo.com>2022-01-27 12:10:13 +0100
commit41f8bbd02d3fdcd75899ff37954d993509a76c68 (patch)
tree90f3a581782b0d3e417197a1b3717f5568986cb0 /glib/glib-init.h
parent94f4ec85c67bf3b9caf5d0bd029706fddffe6901 (diff)
downloadglib-41f8bbd02d3fdcd75899ff37954d993509a76c68.tar.gz
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.
Diffstat (limited to 'glib/glib-init.h')
-rw-r--r--glib/glib-init.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/glib/glib-init.h b/glib/glib-init.h
index 4c812d9d6..b77164c73 100644
--- a/glib/glib-init.h
+++ b/glib/glib-init.h
@@ -40,7 +40,9 @@ void g_clock_win32_init (void);
void g_crash_handler_win32_init (void);
void g_crash_handler_win32_deinit (void);
gboolean _g_win32_call_rtl_version (OSVERSIONINFOEXW *info);
+
extern HMODULE glib_dll;
+gchar *g_win32_find_helper_executable_path (const gchar *process_name, void *dll_handle);
#endif
#endif /* __GLIB_INIT_H__ */