diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2018-07-23 20:42:30 +0200 |
---|---|---|
committer | Ray Strode <halfline@gmail.com> | 2018-08-28 20:41:32 +0000 |
commit | ebe5a2ef3e67a15a45a54dbe4c23c8990a93f898 (patch) | |
tree | e7771b2bf1c588fea70e62ae7552c436846cf0d0 | |
parent | d335d646aea4af658ada344df68ec3c2c06dc6e4 (diff) | |
download | gnome-session-ebe5a2ef3e67a15a45a54dbe4c23c8990a93f898.tar.gz |
data: use absolute paths in desktop files
-rw-r--r-- | data/gnome-custom-session.desktop.in | 5 | ||||
-rw-r--r-- | data/gnome-custom-session.desktop.in.in | 5 | ||||
-rw-r--r-- | data/gnome-xorg.desktop.in.in (renamed from data/gnome-xorg.desktop.in) | 4 | ||||
-rw-r--r-- | data/gnome.desktop.in.in (renamed from data/gnome.desktop.in) | 4 | ||||
-rw-r--r-- | data/meson.build | 82 |
5 files changed, 51 insertions, 49 deletions
diff --git a/data/gnome-custom-session.desktop.in b/data/gnome-custom-session.desktop.in deleted file mode 100644 index bd9a077b..00000000 --- a/data/gnome-custom-session.desktop.in +++ /dev/null @@ -1,5 +0,0 @@ -[Desktop Entry] -Name=Custom -Comment=This entry lets you select a saved session -Exec=gnome-session-custom-session -TryExec=gnome-session-custom-session diff --git a/data/gnome-custom-session.desktop.in.in b/data/gnome-custom-session.desktop.in.in new file mode 100644 index 00000000..5fadaa09 --- /dev/null +++ b/data/gnome-custom-session.desktop.in.in @@ -0,0 +1,5 @@ +[Desktop Entry] +Name=Custom +Comment=This entry lets you select a saved session +Exec=@bindir@/gnome-session-custom-session +TryExec=@bindir@/gnome-session-custom-session diff --git a/data/gnome-xorg.desktop.in b/data/gnome-xorg.desktop.in.in index 8ddeb851..ff4d35c9 100644 --- a/data/gnome-xorg.desktop.in +++ b/data/gnome-xorg.desktop.in.in @@ -1,7 +1,7 @@ [Desktop Entry] Name=GNOME on Xorg Comment=This session logs you into GNOME -Exec=gnome-session -TryExec=gnome-session +Exec=@bindir@/gnome-session +TryExec=@bindir@/gnome-session Type=Application DesktopNames=GNOME diff --git a/data/gnome.desktop.in b/data/gnome.desktop.in.in index 7b78e940..516c211e 100644 --- a/data/gnome.desktop.in +++ b/data/gnome.desktop.in.in @@ -1,7 +1,7 @@ [Desktop Entry] Name=GNOME Comment=This session logs you into GNOME -Exec=gnome-session -TryExec=gnome-session +Exec=@bindir@/gnome-session +TryExec=@bindir@/gnome-session Type=Application DesktopNames=GNOME diff --git a/data/meson.build b/data/meson.build index 89af98f8..b976e739 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,33 +1,47 @@ -desktop = 'gnome.desktop' - -# FIXME: The same target can not be copied into two directories. -# There is a workaround in meson_post_install.py until proper solution arises: -# https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 -i18n.merge_file( - desktop, - type: 'desktop', - input: desktop + '.in', - output: desktop, - po_dir: po_dir, - install: true, - #install_dir: [ - # join_paths(session_datadir, 'xsessions'), - # join_paths(session_datadir, 'wayland-sessions') - #] - install_dir: join_paths(session_datadir, 'xsessions') -) +desktop_plain = 'gnome' -desktop = 'gnome-xorg.desktop' +desktops = [ + desktop_plain, + 'gnome-xorg' +] -i18n.merge_file( - desktop, - type: 'desktop', - input: desktop + '.in', - output: desktop, - po_dir: po_dir, - install: true, - install_dir: join_paths(session_datadir, 'xsessions') -) +if enable_session_selector + desktops += 'gnome-custom-session' +endif + +foreach name: desktops + desktop_conf = configuration_data() + desktop_conf.set('bindir', session_bindir) + + desktop = name + '.desktop' + + desktop_in = configure_file( + input: desktop + '.in.in', + output: desktop + '.in', + configuration: desktop_conf + ) + + install_dir = join_paths(session_datadir, 'xsessions') + # FIXME: The same target can not be copied into two directories. + # There is a workaround in meson_post_install.py until proper solution arises: + # https://groups.google.com/forum/#!topic/mesonbuild/3iIoYPrN4P0 + if name == desktop_plain + #install_dir: [ + # join_paths(session_datadir, 'xsessions'), + # join_paths(session_datadir, 'wayland-sessions') + #] + endif + + desktop_target = i18n.merge_file( + desktop, + type: 'desktop', + input: desktop_in, + output: desktop, + po_dir: po_dir, + install: true, + install_dir: install_dir + ) +endforeach sessions = [ 'gnome.session', @@ -78,18 +92,6 @@ data = files('hardware-compatibility') if enable_session_selector data += files('session-selector.ui') - - desktop = 'gnome-custom-session.desktop' - - i18n.merge_file( - desktop, - type: 'desktop', - input: desktop + '.in', - output: desktop, - po_dir: po_dir, - install: true, - install_dir: join_paths(session_datadir, 'xsessions') - ) endif install_data( |