[gnome-software] trivial: Fix launching gnome-software using D-Bus activation



commit d7c48f136afce4410e586e8a36fb3722c62f9184
Author: Richard Hughes <richard hughsie com>
Date:   Fri Apr 21 11:50:20 2017 +0100

    trivial: Fix launching gnome-software using D-Bus activation
    
    Three problems here:
    
    1. The desktop file wasn't using the global configuration object
    2. The global configuration only knew about BINDIR rather than bindir
    3. The global BINDIR was using quoting as it's designed for source files
    
    Just use a local configuration_data object with the one thing set with the
    right name.

 src/gnome-software-local-file.desktop.in |    2 +-
 src/meson.build                          |   12 +++++++++---
 2 files changed, 10 insertions(+), 4 deletions(-)
---
diff --git a/src/gnome-software-local-file.desktop.in b/src/gnome-software-local-file.desktop.in
index 1126b7b..d0c7f15 100644
--- a/src/gnome-software-local-file.desktop.in
+++ b/src/gnome-software-local-file.desktop.in
@@ -2,7 +2,7 @@
 Name=Software Install
 Comment=Install selected software on the system
 Categories=System;
-Exec=gnome-software --local-filename=%f
+Exec=@bindir@/gnome-software --local-filename=%f
 Terminal=false
 Type=Application
 # Translators: Do NOT translate or transliterate this text (this is an icon file name)!
diff --git a/src/meson.build b/src/meson.build
index dfe7787..69be9f4 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -127,13 +127,18 @@ executable(
   install_dir : 'libexec'
 )
 
-# replace @VERSION@
+# no quoting
+cdata = configuration_data()
+cdata.set('bindir', join_paths(get_option('prefix'),
+                               get_option('bindir')))
+
+# replace @bindir@
 configure_file(
   input : 'org.gnome.Software.service.in',
   output : 'org.gnome.Software.service',
   install: true,
   install_dir: join_paths(get_option('datadir'), 'dbus-1/services'),
-  configuration : conf
+  configuration : cdata
 )
 
 # replace @bindir@
@@ -142,9 +147,10 @@ configure_file(
   output : 'gnome-software-service.desktop',
   install: true,
   install_dir: join_paths(get_option('sysconfdir'), 'xdg/autostart'),
-  configuration : conf
+  configuration : cdata
 )
 
+# replace @bindir@
 i18n.merge_file(
   input: 'org.gnome.Software.desktop.in',
   output: 'org.gnome.Software.desktop',


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