mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-11-05 10:38:54 +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:
@@ -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__ */
|
||||
|
||||
Reference in New Issue
Block a user