[sysprof] build: define APP_ID and APP_ID_S in config.h



commit 4b68b9180b829c1dc74a0fe8dee8e95855c79fd5
Author: Christian Hergert <chergert redhat com>
Date:   Fri Jul 22 12:54:31 2022 -0700

    build: define APP_ID and APP_ID_S in config.h
    
    This allows us to change the app-id in sysprof based on the configuration
    so that nightlies do not get the same app-id as regular builds.

 meson.build                       | 8 ++++++++
 src/sysprof/sysprof-application.c | 4 ++--
 2 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 3dbac8cd..fee7d709 100644
--- a/meson.build
+++ b/meson.build
@@ -14,6 +14,12 @@ gnome = import('gnome', required: get_option('gtk'))
 pkgconfig = import('pkgconfig')
 i18n = import('i18n')
 
+if get_option('development')
+  app_id = 'org.gnome.Sysprof.Devel'
+else
+  app_id = 'org.gnome.Sysprof'
+endif
+
 libsysprof_api_version = 4
 libsysprof_ui_api_version = 5
 
@@ -45,6 +51,8 @@ config_h.set_quoted('PACKAGE_LIBDIR', join_paths(get_option('prefix'), get_optio
 config_h.set('PACKAGE_TARNAME', 'PACKAGE_STRING')
 config_h.set('PACKAGE', 'PACKAGE_NAME')
 config_h.set('VERSION', 'PACKAGE_VERSION')
+config_h.set('APP_ID', app_id)
+config_h.set_quoted('APP_ID_S', app_id)
 
 # Detect and set symbol visibility
 if get_option('default_library') != 'static'
diff --git a/src/sysprof/sysprof-application.c b/src/sysprof/sysprof-application.c
index e3443980..ebe45beb 100644
--- a/src/sysprof/sysprof-application.c
+++ b/src/sysprof/sysprof-application.c
@@ -194,7 +194,7 @@ sysprof_about (GSimpleAction *action,
 
   adw_show_about_window(best_toplevel,
                          "application-name", _("Sysprof"),
-                         "application-icon", "org.gnome.Sysprof",
+                         "application-icon", APP_ID_S,
                          "version", "GNOME " SYMBOLIC_VERSION " (" PACKAGE_VERSION ")",
                          "copyright", "Copyright 2004-2009 Søren Sandmann Pedersen\n"
                                       "Copyright 2016-2021 Christian Hergert",
@@ -329,7 +329,7 @@ SysprofApplication *
 sysprof_application_new (void)
 {
   return g_object_new (SYSPROF_TYPE_APPLICATION,
-                       "application-id", "org.gnome.Sysprof",
+                       "application-id", APP_ID_S,
                        "resource-base-path", "/org/gnome/sysprof",
                        "flags", G_APPLICATION_HANDLES_OPEN,
                        NULL);


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