[gnome-chess/arnaudb/dbus-activation] Make D-Bus activatable.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-chess/arnaudb/dbus-activation] Make D-Bus activatable.
- Date: Sun, 3 May 2020 16:42:37 +0000 (UTC)
commit ff6186ba84e25fd04bd973e3fe4c67c2a6cf7f82
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sun May 3 18:41:08 2020 +0200
Make D-Bus activatable.
data/meson.build | 11 +++++++++++
data/org.gnome.Chess.desktop.in | 1 +
data/org.gnome.Chess.service.in | 3 +++
meson.build | 1 +
4 files changed, 16 insertions(+)
---
diff --git a/data/meson.build b/data/meson.build
index cd8ef12..7d254cf 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -30,6 +30,17 @@ if desktop_file_validate.found()
)
endif
+# Make D-Bus activatable
+service_conf = configuration_data()
+service_conf.set('bindir', bindir)
+
+configure_file(
+ input: '@0 service in'.format(application_id),
+ output: '@0@.service'.format(application_id),
+ install: true,
+ install_dir: join_paths(datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
# The appdata file
appdata_file = i18n.merge_file(
diff --git a/data/org.gnome.Chess.desktop.in b/data/org.gnome.Chess.desktop.in
index 523a607..cc7a701 100644
--- a/data/org.gnome.Chess.desktop.in
+++ b/data/org.gnome.Chess.desktop.in
@@ -13,3 +13,4 @@ StartupNotify=true
# Translators: Do NOT translate or transliterate this text (this is an icon file name)!
Icon=org.gnome.Chess
MimeType=application/x-chess-pgn;
+DBusActivatable=true
diff --git a/data/org.gnome.Chess.service.in b/data/org.gnome.Chess.service.in
new file mode 100644
index 0000000..90d74cc
--- /dev/null
+++ b/data/org.gnome.Chess.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Chess
+Exec=@bindir@/gnome-chess --gapplication-service
diff --git a/meson.build b/meson.build
index 684aa29..dffbb77 100644
--- a/meson.build
+++ b/meson.build
@@ -24,6 +24,7 @@ pkgdatadir = join_paths(datadir, meson.project_name())
sysconfdir = join_paths(get_option('prefix'), get_option('sysconfdir'))
pkgsysconfdir = join_paths(sysconfdir, meson.project_name())
po_dir = join_paths(meson.source_root(), 'po')
+bindir = join_paths(get_option('prefix'), get_option('bindir'))
# Dependencies
min_glib_version = '2.44.0'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]