app: test G_OS_WIN32 rather than G_OS_UNIX for new backtrace feature.

This is just a bit more consistent with existing code. Also build the
gimpdebug tool only when GIMP_CONSOLE_COMPILATION is not set and run
when --no-interface CLI option is not set since it is a GUI tool.
This commit is contained in:
Jehan 2018-01-26 02:17:13 +01:00
parent f8411a3d1f
commit eab961c9bb
3 changed files with 10 additions and 6 deletions

View File

@ -1176,7 +1176,7 @@ prefs_dialog_new (Gimp *gimp,
_("Use OpenCL"),
GTK_BOX (vbox2));
#ifdef G_OS_UNIX
#ifndef G_OS_WIN32
vbox2 = prefs_frame_new (_("Debugging"), GTK_CONTAINER (vbox),
FALSE);

View File

@ -277,8 +277,8 @@ gimp_eek (const gchar *reason,
if (use_handler)
{
#ifdef G_OS_UNIX
if (generate_backtrace)
#ifndef GIMP_CONSOLE_COMPILATION
if (generate_backtrace && ! the_errors_gimp->no_interface)
{
/* If enabled (it is disabled by default), the GUI preference
* takes precedence over the command line argument.
@ -355,7 +355,7 @@ static gchar *
gimp_get_stack_trace (void)
{
gchar *trace = NULL;
#if defined(G_OS_UNIX)
#ifndef G_OS_WIN32
gchar *args[7] = { "gdb", "-batch", "-ex", "backtrace full",
full_prog_name, NULL, NULL };
gchar *gdb_stdout;
@ -371,7 +371,7 @@ gimp_get_stack_trace (void)
/* This works only on UNIX systems. On Windows, we'll have to find
* another method, probably with DrMingW.
*/
#if defined(G_OS_UNIX)
#ifndef G_OS_WIN32
g_snprintf (pid, 16, "%u", (guint) getpid ());
args[5] = pid;

View File

@ -14,7 +14,11 @@ gimp_debug_resume_SOURCES = gimp-debug-resume.c
else
bin_PROGRAMS = gimptool-2.0 gimpdebug-2.0
bin_PROGRAMS = gimptool-2.0
if !ENABLE_GIMP_CONSOLE
bin_PROGRAMS += gimpdebug-2.0
endif
endif