mirror of
https://gitlab.gnome.org/GNOME/gimp.git
synced 2025-10-06 01:12:40 +02:00
app: Make possible to append _NT_SYMBOL_PATH
This commit is contained in:
@@ -53,7 +53,9 @@ void
|
|||||||
gimp_init_signal_handlers (gchar **backtrace_file)
|
gimp_init_signal_handlers (gchar **backtrace_file)
|
||||||
{
|
{
|
||||||
time_t t;
|
time_t t;
|
||||||
#ifdef G_OS_WIN32
|
#if defined(G_OS_WIN32) && defined(ENABLE_RELOCATABLE_RESOURCES)
|
||||||
|
gchar *bin_dir;
|
||||||
|
size_t codeview_path_len;
|
||||||
gchar *codeview_path;
|
gchar *codeview_path;
|
||||||
#endif
|
#endif
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
@@ -63,11 +65,23 @@ gimp_init_signal_handlers (gchar **backtrace_file)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
#ifdef ENABLE_RELOCATABLE_RESOURCES
|
||||||
/* FIXME: https://github.com/jrfonseca/drmingw/issues/91 */
|
/* FIXME: https://github.com/jrfonseca/drmingw/issues/91 */
|
||||||
codeview_path = g_build_filename (gimp_installation_directory (),
|
bin_dir = g_build_filename (gimp_installation_directory (), "bin", NULL);
|
||||||
"bin", NULL);
|
codeview_path_len = strlen (g_getenv ("_NT_SYMBOL_PATH") ? g_getenv ("_NT_SYMBOL_PATH") : "") + strlen (bin_dir) + 2;
|
||||||
|
codeview_path = g_try_malloc (codeview_path_len);
|
||||||
|
if (codeview_path == NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Failed to allocate memory");
|
||||||
|
}
|
||||||
|
if (g_getenv ("_NT_SYMBOL_PATH"))
|
||||||
|
g_snprintf (codeview_path, codeview_path_len, "%s;%s", bin_dir, g_getenv ("_NT_SYMBOL_PATH"));
|
||||||
|
else
|
||||||
|
g_snprintf (codeview_path, codeview_path_len, "%s", bin_dir);
|
||||||
g_setenv ("_NT_SYMBOL_PATH", codeview_path, TRUE);
|
g_setenv ("_NT_SYMBOL_PATH", codeview_path, TRUE);
|
||||||
g_free (codeview_path);
|
g_free (codeview_path);
|
||||||
|
g_free (bin_dir);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This has to be the non-roaming directory (i.e., the local
|
/* This has to be the non-roaming directory (i.e., the local
|
||||||
directory) as backtraces correspond to the binaries on this
|
directory) as backtraces correspond to the binaries on this
|
||||||
|
@@ -227,16 +227,33 @@ gimp_main (GType plug_in_type,
|
|||||||
/* Use Dr. Mingw (dumps backtrace on crash) if it is available. */
|
/* Use Dr. Mingw (dumps backtrace on crash) if it is available. */
|
||||||
{
|
{
|
||||||
time_t t;
|
time_t t;
|
||||||
|
#ifdef ENABLE_RELOCATABLE_RESOURCES
|
||||||
|
gchar *plugin_dir;
|
||||||
|
size_t codeview_path_len;
|
||||||
gchar *codeview_path;
|
gchar *codeview_path;
|
||||||
|
#endif
|
||||||
gchar *filename;
|
gchar *filename;
|
||||||
gchar *dir;
|
gchar *dir;
|
||||||
wchar_t *plug_in_backtrace_path_utf16;
|
wchar_t *plug_in_backtrace_path_utf16;
|
||||||
|
|
||||||
/* FIXME: https://github.com/jrfonseca/drmingw/issues/91 */
|
#ifdef ENABLE_RELOCATABLE_RESOURCES
|
||||||
codeview_path = g_build_filename (gimp_installation_directory (),
|
/* FIXME: https://github.com/jrfonseca/drmingw/issues/91
|
||||||
"bin", NULL);
|
* FIXME: This needs to take into account the plugin path
|
||||||
|
plugin_dir = ???
|
||||||
|
codeview_path_len = strlen (g_getenv ("_NT_SYMBOL_PATH") ? g_getenv ("_NT_SYMBOL_PATH") : "") + strlen (plugin_dir) + 2;
|
||||||
|
codeview_path = g_try_malloc (codeview_path_len);
|
||||||
|
if (codeview_path == NULL)
|
||||||
|
{
|
||||||
|
g_warning ("Failed to allocate memory");
|
||||||
|
}
|
||||||
|
if (g_getenv ("_NT_SYMBOL_PATH"))
|
||||||
|
g_snprintf (codeview_path, codeview_path_len, "%s;%s", plugin_dir, g_getenv ("_NT_SYMBOL_PATH"));
|
||||||
|
else
|
||||||
|
g_snprintf (codeview_path, codeview_path_len, "%s", plugin_dir);
|
||||||
g_setenv ("_NT_SYMBOL_PATH", codeview_path, TRUE);
|
g_setenv ("_NT_SYMBOL_PATH", codeview_path, TRUE);
|
||||||
g_free (codeview_path);
|
g_free (codeview_path);
|
||||||
|
g_free (plugin_dir);*/
|
||||||
|
#endif
|
||||||
|
|
||||||
/* This has to be the non-roaming directory (i.e., the local
|
/* This has to be the non-roaming directory (i.e., the local
|
||||||
* directory) as backtraces correspond to the binaries on this
|
* directory) as backtraces correspond to the binaries on this
|
||||||
|
Reference in New Issue
Block a user