[gnome-builder] build: add with_channel build option



commit 617d44753d71f32a572c35f3bc31b78cdd2de0bc
Author: Christian Hergert <chergert redhat com>
Date:   Sun Jun 18 13:57:55 2017 -0700

    build: add with_channel build option
    
    We need this so that we can display which channel the user is running
    from the About dialog. This can be useful to us when debugging.

 libide/ide-version.h.in |    8 ++++++++
 libide/meson.build      |    1 +
 meson.build             |    1 +
 meson_options.txt       |    6 ++++++
 4 files changed, 16 insertions(+), 0 deletions(-)
---
diff --git a/libide/ide-version.h.in b/libide/ide-version.h.in
index 1678336..04af60b 100644
--- a/libide/ide-version.h.in
+++ b/libide/ide-version.h.in
@@ -41,6 +41,14 @@
 #define IDE_BUILD_TYPE @BUILD_TYPE@
 
 /**
+ * IDE_BUILD_CHANNEL:
+ *
+ * The release channel of Builder. This should be a string such as
+ * "other", "flatpak-stable", or "flatpak-nightly".
+ */
+#define IDE_BUILD_CHANNEL @BUILD_CHANNEL@
+
+/**
  * IDE_MAJOR_VERSION:
  *
  * libide major version component (e.g. 1 if %IDE_VERSION is 1.2.3)
diff --git a/libide/meson.build b/libide/meson.build
index 5aca58f..a0b816e 100644
--- a/libide/meson.build
+++ b/libide/meson.build
@@ -5,6 +5,7 @@ version_data.set('MAJOR_VERSION', MAJOR_VERSION)
 version_data.set('MINOR_VERSION', MINOR_VERSION)
 version_data.set('MICRO_VERSION', MICRO_VERSION)
 version_data.set('VERSION', meson.project_version())
+version_data.set_quoted('BUILD_CHANNEL', get_option('with_channel'))
 version_data.set_quoted('BUILD_TYPE', get_option('buildtype'))
 
 libide_version_h = configure_file(
diff --git a/meson.build b/meson.build
index 43c6d67..5d8bf3f 100644
--- a/meson.build
+++ b/meson.build
@@ -6,6 +6,7 @@ project('gnome-builder', 'c',
                      'c_std=gnu11',
                      'cpp_std=c++11',
                      'warning_level=2',
+                     'with_channel=other',
                    ],
 )
 
diff --git a/meson_options.txt b/meson_options.txt
index c7067bb..49dce48 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -5,6 +5,12 @@ option('enable_rdtscp', type: 'boolean', value: false,
   description: 'High performance counters'
 )
 
+option('with_channel',
+          type: 'combo',
+       choices: [ 'other', 'flatpak-stable', 'flatpak-nightly' ],
+   description: 'The distribution channel for Builder',
+)
+
 option('with_editorconfig', type: 'boolean')
 option('with_webkit', type: 'boolean')
 option('with_introspection', type: 'boolean')


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