From c1737c763f295e2a71f574d3d436ec7899adf9f1 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 26 May 2020 11:27:21 +0200 Subject: [PATCH] sm.puri.Squeekboard.desktop: make path to Exec= absolute This uses the same logic from Phosh to render absolute paths in .desktop files. --- data/meson.build | 11 +++++++++-- ...d.desktop.in => sm.puri.Squeekboard.desktop.in.in} | 2 +- meson.build | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) rename data/{sm.puri.Squeekboard.desktop.in => sm.puri.Squeekboard.desktop.in.in} (86%) diff --git a/data/meson.build b/data/meson.build index d54df3cd..d8b83599 100644 --- a/data/meson.build +++ b/data/meson.build @@ -7,13 +7,20 @@ squeekboard_resources = gnome.compile_resources( c_name: 'squeekboard', ) +desktopconf = configuration_data() +desktopconf.set('bindir', bindir) + desktop_file = 'sm.puri.Squeekboard.desktop' i18n.merge_file('desktop', - input: desktop_file + '.in', + input: configure_file( + input: desktop_file + '.in.in', + output: desktop_file + '.in', + configuration: desktopconf + ), output: desktop_file, po_dir: '../po', install: true, - install_dir: join_paths(datadir, 'applications'), + install_dir: desktopdir, type: 'desktop' ) diff --git a/data/sm.puri.Squeekboard.desktop.in b/data/sm.puri.Squeekboard.desktop.in.in similarity index 86% rename from data/sm.puri.Squeekboard.desktop.in rename to data/sm.puri.Squeekboard.desktop.in.in index 1220ed0b..9bfd1034 100644 --- a/data/sm.puri.Squeekboard.desktop.in +++ b/data/sm.puri.Squeekboard.desktop.in.in @@ -2,7 +2,7 @@ Name=Squeekboard GenericName=Squeekboard Virtual Keyboard Comment=Virtual Keyboard -Exec=squeekboard +Exec=@bindir@/squeekboard Terminal=false Type=Application NoDisplay=true diff --git a/meson.build b/meson.build index d33b76a1..a4311737 100644 --- a/meson.build +++ b/meson.build @@ -42,6 +42,7 @@ endif prefix = get_option('prefix') bindir = join_paths(prefix, get_option('bindir')) datadir = join_paths(prefix, get_option('datadir')) +desktopdir = join_paths(datadir, 'applications') pkgdatadir = join_paths(datadir, meson.project_name()) if get_option('depdatadir') == '' depdatadir = datadir