[gnome-builder] build: add development=true and remove tracing=true



commit 799b2b72710331ce78a45f0d204733c7335259a0
Author: Christian Hergert <chergert redhat com>
Date:   Wed Jul 13 09:44:49 2022 -0700

    build: add development=true and remove tracing=true
    
    Setting development=true implies tracing=true, so just do that. This is
    helpful so that development RPMs and what not do not need to have to handle
    different icon/desktop paths for .Devel even though they are alpha builds.
    
    Additionally, install proper icons based on app-id.

 build-aux/flatpak/org.gnome.Builder.Devel.json     |  1 +
 .../apps/org.gnome.Builder.Devel-symbolic.svg      |  1 +
 data/icons/meson.build                             |  9 +++++---
 meson.build                                        | 26 +++++++++++-----------
 meson_options.txt                                  | 17 +++++---------
 src/libide/core/meson.build                        |  2 +-
 src/plugins/recent/gbp-recent-section.c            |  2 +-
 src/plugins/shellcmd/gbp-shellcmd-command-dialog.c |  2 +-
 8 files changed, 30 insertions(+), 30 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.Builder.Devel.json b/build-aux/flatpak/org.gnome.Builder.Devel.json
index f18f5c264..78d9909fe 100644
--- a/build-aux/flatpak/org.gnome.Builder.Devel.json
+++ b/build-aux/flatpak/org.gnome.Builder.Devel.json
@@ -656,6 +656,7 @@
                 "--libdir=lib",
                 "--buildtype=debugoptimized",
                 "-Dctags_path=/app/bin/ctags",
+                "-Ddevelopment=true",
                 "-Dtcmalloc=true",
                 "-Dtracing=true",
                 "-Dhelp=true",
diff --git a/data/icons/hicolor/scalable/apps/org.gnome.Builder.Devel-symbolic.svg 
b/data/icons/hicolor/scalable/apps/org.gnome.Builder.Devel-symbolic.svg
new file mode 100644
index 000000000..aaeedc955
--- /dev/null
+++ b/data/icons/hicolor/scalable/apps/org.gnome.Builder.Devel-symbolic.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; width="16" height="16"><g color="#000" fill="#2e3436"><path d="m1.09 
13.218.91-.221 1.433-1.418c.354.156 1.614.167 1.968 0l1.566 1.418.775.22.199.234v1.546H.936v-1.524zM7.535 
1.987a1.528 1.528 0 0 0-1.528 1.527 1.528 1.528 0 0 0 .122.594L4.63 5.93a2.5 2.5 0 0 0-.189-.01 2.5 2.5 0 0 
0-2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0-.293-1.173l.877-2.205a1.528 1.528 0 0 0 
.01 0 1.528 1.528 0 0 0 1.355-.827l1.951.45a1.528 1.528 0 0 0 1.51 1.304 1.528 1.528 0 0 0 1.53-1.527 1.528 
1.528 0 0 0-1.53-1.527 1.528 1.528 0 0 0-1.367.851L9.043 3.27a1.528 1.528 0 0 0-1.508-1.283z" 
style="isolation:auto;mix-blend-mode:normal;marker:none" overflow="visible"/><path d="m10.941 7.997-1.066 
1.91.779 2.09h.531l-.244-2.469 1.219-.187.215 1.698.575-.004.21-1.663.937.093.094 
2.5.562.032.594-2.563-1.395-1.219V6.987h-2.949z" style="isolation:auto;mix-blend-mode:normal;marker:none" 
overflow="visible"/></g></svg>
\ No newline at end of file
diff --git a/data/icons/meson.build b/data/icons/meson.build
index 1b44e59a8..03e6462e5 100644
--- a/data/icons/meson.build
+++ b/data/icons/meson.build
@@ -11,7 +11,10 @@ install_subdir('hicolor/256x256', install_dir: pkgicondir)
 install_subdir('hicolor/512x512', install_dir: pkgicondir)
 install_subdir('hicolor/scalable', install_dir: pkgicondir)
 
-install_data(['hicolor/scalable/apps/org.gnome.Builder.svg',
-              'hicolor/scalable/apps/org.gnome.Builder-symbolic.svg'],
-  install_dir: join_paths(icondir, 'scalable/apps'))
+app_icon = '@0@.svg'.format(app_id)
+
+install_data([
+  'hicolor/scalable/apps/@0@.svg'.format(app_id),
+  'hicolor/scalable/apps/@0 -symbolic svg'.format(app_id)
+], install_dir: join_paths(icondir, 'scalable/apps'))
 
diff --git a/meson.build b/meson.build
index e0e4c4c75..3666b7b74 100644
--- a/meson.build
+++ b/meson.build
@@ -9,14 +9,21 @@ project('gnome-builder', 'c',
                    ],
 )
 
-version_split = meson.project_version().split('.')
-MAJOR_VERSION = version_split[0]
+config_h = configuration_data()
+config_h.set_quoted('PACKAGE_NAME', 'gnome-builder')
+config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
 
-app_id = 'org.gnome.Builder'
-if version_split[1][0] in ['a', 'b', 'r']
+# Development builds get an alternate application-id
+if get_option('development')
   app_id = 'org.gnome.Builder.Devel'
+  config_h.set10('DEVELOPMENT_BUILD', true)
+else
+  app_id = 'org.gnome.Builder'
 endif
+config_h.set_quoted('APP_ID', app_id)
 
+version_split = meson.project_version().split('.')
+MAJOR_VERSION = version_split[0]
 libide_api_version = '@0@'.format(MAJOR_VERSION)
 
 pkgdocdir_abs = join_paths(get_option('prefix'), get_option('datadir'), 'doc', 'gnome-builder')
@@ -76,12 +83,9 @@ status = [
   '', '',
 ]
 
-config_h = configuration_data()
-config_h.set_quoted('APP_ID', app_id)
 
-# Message of doom
+# Message of Doom
 if version_split[1][0] in ['a', 'b', 'r']
-  config_h.set10('DEVELOPMENT_BUILD', true)
   MINOR_VERSION = 0
   status += [
     'You are building a development version of GNOME Builder. There may be more',
@@ -102,7 +106,7 @@ status += [
   'Libdir ................ : @0@'.format(join_paths(get_option('prefix'), get_option('libdir'))),
   'Safe PATH ............. : @0@'.format(safe_path),
   '',
-  'Tracing ............... : @0@'.format(get_option('tracing')),
+  'Development Build ..... : @0@'.format(get_option('development')),
   'Profiling ............. : @0@'.format(get_option('profiling')),
   'tcmalloc_minimal ...... : @0@'.format(get_option('tcmalloc')),
   '',
@@ -113,10 +117,8 @@ status += [
   '', ''
 ]
 
-config_h.set_quoted('PACKAGE_NAME', 'gnome-builder')
 config_h.set_quoted('PACKAGE_ABI_S', libide_api_version)
 config_h.set('PACKAGE_ABI', libide_api_version)
-config_h.set_quoted('PACKAGE_VERSION', meson.project_version())
 config_h.set_quoted('PACKAGE_STRING', 'gnome-builder-' + meson.project_version())
 config_h.set_quoted('PACKAGE_DATADIR', join_paths(get_option('prefix'), get_option('datadir')))
 config_h.set_quoted('PACKAGE_ICONDIR', join_paths(get_option('prefix'), get_option('datadir'), 
'gnome-builder/icons'))
@@ -125,10 +127,8 @@ config_h.set_quoted('PACKAGE_LIBDIR', join_paths(get_option('prefix'), get_optio
 config_h.set_quoted('PACKAGE_LOCALE_DIR', join_paths(get_option('prefix'), get_option('datadir'), 'locale'))
 config_h.set_quoted('PACKAGE_LIBEXECDIR', join_paths(get_option('prefix'), get_option('libexecdir')))
 config_h.set_quoted('SAFE_PATH', safe_path)
-
 config_h.set('GETTEXT_PACKAGE', 'PACKAGE_NAME')
 config_h.set('LOCALEDIR', 'PACKAGE_LOCALE_DIR')
-
 config_h.set10('ENABLE_NLS', true) # Always enabled
 
 # We should probably avoid using these
diff --git a/meson_options.txt b/meson_options.txt
index 7b0ec1ce4..bbe04b514 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,24 +1,19 @@
-option('tracing', type: 'boolean', value: false, description: 'Enable tracing of internals for 
troubleshooting Builder')
-option('profiling', type: 'boolean', value: false, description: 'Enable profiling of the Builder codebase')
-option('tcmalloc', type: 'boolean', value: false, description: 'Use tcmalloc for dynamic allocations')
-
-option('with_safe_path', type: 'string', value: '', description: 'PATH variable to run build commands 
(default: platform-specific)')
-
-option('gnome_sdk_version', type: 'string', value: 'master', description: 'The GNOME SDK release to use for 
templates')
-
 option('channel',
           type: 'combo',
        choices: [ 'other', 'flatpak-stable', 'flatpak-beta', 'flatpak-nightly' ],
    description: 'The distribution channel for Builder',
 )
 
+option('development', type: 'boolean', value: false, description: 'If this is a development build 
(org.gnome.Builder.Devel)')
+option('tracing', type: 'boolean', value: false, description: 'Enable tracing of internals for 
troubleshooting Builder')
+option('profiling', type: 'boolean', value: false, description: 'Enable profiling of the Builder codebase')
+option('tcmalloc', type: 'boolean', value: false, description: 'Use tcmalloc for dynamic allocations')
+option('with_safe_path', type: 'string', value: '', description: 'PATH variable to run build commands 
(default: platform-specific)')
+option('gnome_sdk_version', type: 'string', value: 'master', description: 'The GNOME SDK release to use for 
templates')
 option('help', type: 'boolean', value: false)
 option('docs', type: 'boolean', value: false)
-
 option('network_tests', type: 'boolean', value: true, description: 'Allow networking in unit-tests')
-
 option('ctags_path', type: 'string', value: '')
-
 option('webkit', type: 'feature', value: 'enabled', description: 'Enable features which require WebKit')
 
 option('plugin_autotools', type: 'boolean')
diff --git a/src/libide/core/meson.build b/src/libide/core/meson.build
index fb1d909f9..e0f496fd2 100644
--- a/src/libide/core/meson.build
+++ b/src/libide/core/meson.build
@@ -35,7 +35,7 @@ libide_core_generated_headers += [libide_build_ident_h]
 #
 
 libide_core_conf = configuration_data()
-libide_core_conf.set10('ENABLE_TRACING', get_option('tracing'))
+libide_core_conf.set10('ENABLE_TRACING', get_option('development'))
 libide_core_conf.set('BUGREPORT_URL', 'https://gitlab.gnome.org/GNOME/gnome-builder/issues')
 
 libide_debug_h = configure_file(
diff --git a/src/plugins/recent/gbp-recent-section.c b/src/plugins/recent/gbp-recent-section.c
index 0401570a7..920a0fbd3 100644
--- a/src/plugins/recent/gbp-recent-section.c
+++ b/src/plugins/recent/gbp-recent-section.c
@@ -427,7 +427,7 @@ gbp_recent_section_purge_selected_full (IdeGreeterSection *section,
                              "default-height", 500,
                              "use-header-bar", TRUE,
                              NULL);
-#if DEVELOPMENT_BUILD
+#ifdef DEVELOPMENT_BUILD
       gtk_widget_add_css_class (GTK_WIDGET (dialog), "devel");
 #endif
       gtk_dialog_add_button (dialog, _("_Close"), GTK_RESPONSE_CLOSE);
diff --git a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c 
b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
index 872069c4d..b4c1a1d23 100644
--- a/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
+++ b/src/plugins/shellcmd/gbp-shellcmd-command-dialog.c
@@ -601,7 +601,7 @@ gbp_shellcmd_command_dialog_init (GbpShellcmdCommandDialog *self)
 {
   gtk_widget_init_template (GTK_WIDGET (self));
 
-#if DEVELOPMENT_BUILD
+#ifdef DEVELOPMENT_BUILD
   gtk_widget_add_css_class (GTK_WIDGET (self), "devel");
 #endif
 


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