[gnome-nibbles/arnaudb/modernize-code: 9/58] Make D-Bus activatable.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles/arnaudb/modernize-code: 9/58] Make D-Bus activatable.
- Date: Wed, 10 Jun 2020 17:13:41 +0000 (UTC)
commit 8cec61f13a367460bcd6a3bc841566a0ce76daae
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Tue May 26 16:57:23 2020 +0200
Make D-Bus activatable.
data/meson.build | 14 ++++++++++++++
data/org.gnome.Nibbles.desktop.in | 1 +
data/org.gnome.Nibbles.service.in | 3 +++
meson.build | 13 +++++++------
4 files changed, 25 insertions(+), 6 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 49e35aa..e06888e 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -38,6 +38,20 @@ install_data(join_paths('icons', 'hicolor', 'scalable', 'org.gnome.Nibbles.svg')
install_data(join_paths('icons', 'hicolor', 'symbolic', 'org.gnome.Nibbles-symbolic.svg'),
install_dir: join_paths (datadir, 'icons', 'hicolor', 'symbolic', 'apps'))
+# Make D-Bus activatable
+service_conf = configuration_data()
+service_conf.set('bindir', bindir)
+
+service = 'org.gnome.Nibbles.service'
+
+configure_file (
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths (datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
# Appdata
appdata_file = i18n.merge_file(
input: 'org.gnome.Nibbles.appdata.xml.in',
diff --git a/data/org.gnome.Nibbles.desktop.in b/data/org.gnome.Nibbles.desktop.in
index c6c2d16..46bc2ee 100644
--- a/data/org.gnome.Nibbles.desktop.in
+++ b/data/org.gnome.Nibbles.desktop.in
@@ -10,3 +10,4 @@ Terminal=false
Type=Application
Categories=GNOME;GTK;Game;ArcadeGame;
StartupNotify=true
+DBusActivatable=true
diff --git a/data/org.gnome.Nibbles.service.in b/data/org.gnome.Nibbles.service.in
new file mode 100644
index 0000000..b624015
--- /dev/null
+++ b/data/org.gnome.Nibbles.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Nibbles
+Exec=@bindir@/gnome-nibbles --gapplication-service
diff --git a/meson.build b/meson.build
index 9bb6ce2..e372857 100644
--- a/meson.build
+++ b/meson.build
@@ -7,12 +7,13 @@ project('gnome-nibbles', ['c', 'vala'],
gnome = import('gnome')
i18n = import('i18n')
-prefix = get_option('prefix')
-datadir = join_paths(prefix, get_option('datadir'))
-pkgdatadir = join_paths(datadir, meson.project_name())
-sounddir = join_paths(pkgdatadir, 'sounds')
-localedir = join_paths(prefix, get_option('localedir'))
-podir = join_paths(meson.source_root(), 'po')
+prefix = get_option('prefix')
+datadir = join_paths(prefix, get_option('datadir'))
+pkgdatadir = join_paths(datadir, meson.project_name())
+sounddir = join_paths(pkgdatadir, 'sounds')
+localedir = join_paths(prefix, get_option('localedir'))
+podir = join_paths(meson.source_root(), 'po')
+bindir = join_paths(prefix, get_option ('bindir'))
# Dependencies
glib_version = '2.42.0'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]