sm.puri.Squeekboard.desktop: make path to Exec= absolute

This uses the same logic from Phosh to render absolute paths in .desktop
files.
This commit is contained in:
Florian Klink
2020-05-26 11:27:21 +02:00
parent fe22fc2271
commit c1737c763f
3 changed files with 11 additions and 3 deletions

View File

@ -7,13 +7,20 @@ squeekboard_resources = gnome.compile_resources(
c_name: 'squeekboard', c_name: 'squeekboard',
) )
desktopconf = configuration_data()
desktopconf.set('bindir', bindir)
desktop_file = 'sm.puri.Squeekboard.desktop' desktop_file = 'sm.puri.Squeekboard.desktop'
i18n.merge_file('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, output: desktop_file,
po_dir: '../po', po_dir: '../po',
install: true, install: true,
install_dir: join_paths(datadir, 'applications'), install_dir: desktopdir,
type: 'desktop' type: 'desktop'
) )

View File

@ -2,7 +2,7 @@
Name=Squeekboard Name=Squeekboard
GenericName=Squeekboard Virtual Keyboard GenericName=Squeekboard Virtual Keyboard
Comment=Virtual Keyboard Comment=Virtual Keyboard
Exec=squeekboard Exec=@bindir@/squeekboard
Terminal=false Terminal=false
Type=Application Type=Application
NoDisplay=true NoDisplay=true

View File

@ -42,6 +42,7 @@ endif
prefix = get_option('prefix') prefix = get_option('prefix')
bindir = join_paths(prefix, get_option('bindir')) bindir = join_paths(prefix, get_option('bindir'))
datadir = join_paths(prefix, get_option('datadir')) datadir = join_paths(prefix, get_option('datadir'))
desktopdir = join_paths(datadir, 'applications')
pkgdatadir = join_paths(datadir, meson.project_name()) pkgdatadir = join_paths(datadir, meson.project_name())
if get_option('depdatadir') == '' if get_option('depdatadir') == ''
depdatadir = datadir depdatadir = datadir