[gnome-notes/development-profile: 4/8] Add "development" profile




commit e3f029af718596427057215ea31673fd99c31a2b
Author: Felipe Borges <felipeborges gnome org>
Date:   Wed Oct 7 13:49:48 2020 +0200

    Add "development" profile

 build-aux/flatpak/org.gnome.Notes.json |  5 +++--
 data/meson.build                       | 10 ++++++++--
 data/org.gnome.Notes.desktop.in        |  2 +-
 meson.build                            | 10 ++++++++++
 meson_options.txt                      |  1 +
 src/bjb-application.c                  |  2 +-
 6 files changed, 24 insertions(+), 6 deletions(-)
---
diff --git a/build-aux/flatpak/org.gnome.Notes.json b/build-aux/flatpak/org.gnome.Notes.json
index ce76553..85fda96 100644
--- a/build-aux/flatpak/org.gnome.Notes.json
+++ b/build-aux/flatpak/org.gnome.Notes.json
@@ -1,5 +1,5 @@
 {
-    "app-id" : "org.gnome.Notes",
+    "app-id" : "org.gnome.Notes.Devel",
     "runtime" : "org.gnome.Platform",
     "runtime-version" : "master",
     "sdk" : "org.gnome.Sdk",
@@ -175,7 +175,8 @@
             "buildsystem" : "meson",
             "builddir" : true,
             "config-opts" : [
-                "-Dprivate_store=true"
+                "-Dprivate_store=true",
+                "-Dprofile=development"
             ],
             "sources" : [
                 {
diff --git a/data/meson.build b/data/meson.build
index bbf2c6d..d00d98f 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -14,12 +14,18 @@ i18n.merge_file(
 )
 
 desktop = 'org.gnome.Notes.desktop'
+desktop_conf = configuration_data()
+desktop_conf.set ('icon', application_id)
 
 i18n.merge_file(
   desktop,
   type: 'desktop',
-  input: desktop + '.in',
-  output: desktop,
+  input: configure_file(
+    input: files (desktop + '.in'),
+    output: desktop + '.in',
+    configuration: desktop_conf
+  ),
+  output: '@0@.desktop'.format(application_id),
   po_dir: po_dir,
   install: true,
   install_dir: join_paths(bijiben_datadir, 'applications')
diff --git a/data/org.gnome.Notes.desktop.in b/data/org.gnome.Notes.desktop.in
index e317995..f717ab3 100644
--- a/data/org.gnome.Notes.desktop.in
+++ b/data/org.gnome.Notes.desktop.in
@@ -6,7 +6,7 @@ Comment=Post notes, tag files!
 GenericName=Note-taker
 Exec=bijiben %u
 # Translators: Do NOT translate or transliterate this text (this is an icon file name)!
-Icon=org.gnome.Notes
+Icon=@icon@
 MimeType=x-scheme-handler/note;
 StartupNotify=true
 Terminal=false
diff --git a/meson.build b/meson.build
index 3d95f54..70e4b09 100644
--- a/meson.build
+++ b/meson.build
@@ -21,9 +21,18 @@ cc = meson.get_compiler('c')
 
 config_h = configuration_data()
 
+if get_option('profile') == 'development'
+    bijiben_profile = '.Devel'
+else
+    bijiben_profile = ''
+endif
+
+application_id = 'org.gnome.Notes@0@'.format(bijiben_profile)
+
 # defines
 set_defines = [
   # package
+  ['BIJIBEN_APPLICATION_ID', application_id],
   ['PACKAGE', bijiben_name],
   ['PACKAGE_BUGREPORT', 'https://gitlab.gnome.org/GNOME/gnome-notes/issues'],
   ['PACKAGE_NAME', bijiben_name],
@@ -31,6 +40,7 @@ set_defines = [
   ['PACKAGE_TARNAME', bijiben_name],
   ['PACKAGE_URL', 'https://wiki.gnome.org/Apps/Notes'],
   ['PACKAGE_VERSION', bijiben_version],
+  ['PROFILE', bijiben_profile],
   ['VERSION', bijiben_version],
   # i18n
   ['GETTEXT_PACKAGE', bijiben_name]
diff --git a/meson_options.txt b/meson_options.txt
index db8f705..1e9a06a 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -1,3 +1,4 @@
 option('zeitgeist', type: 'boolean', value: false, description: 'Enable Zeitgeist')
 option('update_mimedb', type: 'boolean', value: true, description: 'update-mime-database after install')
 option('private_store', type: 'boolean', value: false, description: 'Use Tracker private store instead of 
Tracker service')
+option('profile', type: 'combo', choices: [ 'default', 'development'], value: 'default')
diff --git a/src/bjb-application.c b/src/bjb-application.c
index 4a342eb..20f9c02 100644
--- a/src/bjb-application.c
+++ b/src/bjb-application.c
@@ -529,7 +529,7 @@ BjbApplication *
 bjb_application_new (void)
 {
   return g_object_new (BJB_TYPE_APPLICATION,
-                       "application-id", "org.gnome.Notes",
+                       "application-id", BIJIBEN_APPLICATION_ID,
                        "flags", G_APPLICATION_HANDLES_OPEN,
                        NULL);
 }


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