[gimp] meson: -Dcheck-update option as a yes|no|platform-default combo.



commit f0be2256d00a7409357f890f662e4829cfec61d1
Author: Jehan <jehan girinstud io>
Date:   Thu Aug 26 01:22:32 2021 +0200

    meson: -Dcheck-update option as a yes|no|platform-default combo.
    
    Similar to the previous commit for the meson build system, the
    'check-update' option is not a boolean anymore, but has now 3 values.

 meson.build       | 18 ++++++++++++++++--
 meson_options.txt |  4 +++-
 2 files changed, 19 insertions(+), 3 deletions(-)
---
diff --git a/meson.build b/meson.build
index 2f84503893..15dafa5610 100644
--- a/meson.build
+++ b/meson.build
@@ -1066,7 +1066,21 @@ else
   conf.set_quoted('GIMP_BUILD_PLATFORM_FAMILY', 'other')
 endif
 
-conf.set('CHECK_UPDATE', get_option('check-update'))
+if get_option('check-update') == 'yes'
+  check_update = true
+elif get_option('check-update') == 'no'
+  check_update = false
+else # == 'platform-default'
+  if platform_windows or platform_osx
+    check_update = true
+  else
+    # Other packages usually have their own update system (software
+    # repositories on Linux and other *BSDs for instance) so we
+    # shouldn't notify about new versions, at least not as a default.
+    check_update = false
+  endif
+endif
+conf.set('CHECK_UPDATE', check_update)
 
 # Default ICC directory #
 
@@ -1746,7 +1760,7 @@ final_message = [
 '''  gimp-console:        @0@'''.format(enable_console_bin),
 '',
 '''Optional Features:''',
-'''  Check updates at startup:  @0@'''.format(get_option('check-update')),
+'''  Check updates at startup:  @0@'''.format(check_update),
 '''  Language selection:        @0@'''.format(isocodes.found()),
 '''  Vector icons:              @0@'''.format(have_vector_icons),
 '''  Dr. Mingw (Win32):         @0@'''.format(drmingw.found()),
diff --git a/meson_options.txt b/meson_options.txt
index 7b6ad78045..6e7ae86228 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -16,7 +16,9 @@ option('shmem-type',        type: 'combo',   value: 'auto', description: 'Shared
 
 option('build-id',          type: 'string',  value: 'unknown', description: 'Unique string used to define 
your build')
 option('revision',          type: 'integer', value: 0,    description: 'Revision increment for a package')
-option('check-update',      type: 'boolean', value: true, description: 'GIMP will look up new version 
availability on startup')
+option('check-update',      type: 'combo', value: 'platform-default',
+                            description: 'GIMP will look up new version availability on startup',
+                            choices: [ 'yes', 'no', 'platform-default' ])
 
 option('bug-report-url',    type: 'string',  value: '',   description: 'URL used by the debug dialog to 
report bugs')
 option('gimpdir',           type: 'string',  value: '',   description: 'Change default gimpdir from 
~/.config/GIMP/2.9 to ~/.config/DIR/2.9 (if relative), or to DIR (if absolute)')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]