[gnome-klotski] Make D-Bus activatable.
- From: Arnaud B. <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-klotski] Make D-Bus activatable.
- Date: Sat, 26 Oct 2019 01:37:56 +0000 (UTC)
commit fbc4d170d63b2d8523555454afaac9ae765f28b5
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Sat Oct 26 03:36:03 2019 +0200
Make D-Bus activatable.
data/meson.build | 14 ++++++++++++++
data/org.gnome.Klotski.desktop.in | 1 +
data/org.gnome.Klotski.service.in | 3 +++
meson.build | 5 +++--
4 files changed, 21 insertions(+), 2 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 4a9e55c..780df88 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -24,6 +24,20 @@ install_data(
install_dir : join_paths(get_option('datadir'), 'glib-2.0', 'schemas')
)
+# Make D-Bus activatable
+service_conf = configuration_data()
+service_conf.set('bindir', bindir)
+
+service = project_id + '.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
# Desktop file
desktop_file = i18n.merge_file(
input: '@0 desktop in'.format(project_id),
diff --git a/data/org.gnome.Klotski.desktop.in b/data/org.gnome.Klotski.desktop.in
index 7b4bd73..cea02b2 100644
--- a/data/org.gnome.Klotski.desktop.in
+++ b/data/org.gnome.Klotski.desktop.in
@@ -10,3 +10,4 @@ Terminal=false
Type=Application
Categories=GNOME;GTK;Game;LogicGame;
StartupNotify=true
+DBusActivatable=true
diff --git a/data/org.gnome.Klotski.service.in b/data/org.gnome.Klotski.service.in
new file mode 100644
index 0000000..75dcc01
--- /dev/null
+++ b/data/org.gnome.Klotski.service.in
@@ -0,0 +1,3 @@
+[D-BUS Service]
+Name=org.gnome.Klotski
+Exec=@bindir@/gnome-klotski --gapplication-service
diff --git a/meson.build b/meson.build
index 39e57c7..22084a3 100644
--- a/meson.build
+++ b/meson.build
@@ -24,8 +24,9 @@ glib_compile_schema = find_program('glib-compile-schemas', required: true)
# Set gettext package name
add_global_arguments('-DGETTEXT_PACKAGE="@0@"'.format (meson.project_name()), language: 'c')
-localedir = join_paths(get_option('prefix'), get_option('localedir'))
-datadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
+localedir = join_paths(get_option('prefix'), get_option('localedir'))
+datadir = join_paths(get_option('prefix'), get_option('datadir'), meson.project_name())
+bindir = join_paths(get_option('prefix'), get_option('bindir'))
conf = configuration_data ()
conf.set_quoted ('VERSION', meson.project_version())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]