From fcf524fbc3d865aaf80d53ab3b42e499d2917657 Mon Sep 17 00:00:00 2001 From: Jehan Date: Sun, 17 Nov 2024 12:25:23 +0900 Subject: [PATCH] Issue #12277: GIMP 3.0 RC1 opens Windows Console. This was a bug in the meson port which was not taking into account the stable or release state of a build (unlike how it was in the old autotools). The rules are: * All unstable builds (release or not) have the console. * Non-release builds in stable series have the console. * Only release of stable series don't have the console. * The RC of a stable release should behave as a stable release. --- meson.build | 6 +++++- meson_options.txt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/meson.build b/meson.build index 1f5c13fdb4..d6a3b25c43 100644 --- a/meson.build +++ b/meson.build @@ -555,7 +555,11 @@ libarchive = dependency('libarchive') # Check for debug console (Win32) if platform_windows - conf.set('ENABLE_WIN32_DEBUG_CONSOLE', get_option('win32-debug-console')) + enable_win32_debug_console = get_option('win32-debug-console').enabled() or \ + (get_option('win32-debug-console').auto() and (not stable or not release)) + conf.set('ENABLE_WIN32_DEBUG_CONSOLE', enable_win32_debug_console) + # When we'll depend on meson >= 1.1.0, we can just use: + # conf.set('ENABLE_WIN32_DEBUG_CONSOLE', get_option('win32-debug-console').enable_auto_if(not stable or not release).enabled()) endif ################################################################################ diff --git a/meson_options.txt b/meson_options.txt index 93b54178b0..7db3ccb73a 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -1,7 +1,7 @@ # Build properties option('ansi', type: 'boolean', value: false, description: 'Turn on strict ansi') option('enable-console-bin',type: 'boolean', value: true, description: 'Build a console-only binary which does not link GTK') -option('win32-debug-console',type:'boolean', value: true, description: 'Open a console when starting the program') +option('win32-debug-console',type:'feature', value: 'auto', description: 'Open a console when starting the program') option('enable-multiproc', type: 'boolean', value: true, description: 'Support for multiple processors') option('profiling', type: 'boolean', value: false, description: 'Enable profiling') option('windows-installer', type: 'boolean', value: false, description: 'Generate files needed for the Inno Windows installer')