[gedit] desktop file: simplify
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit] desktop file: simplify
- Date: Wed, 4 Dec 2019 16:50:15 +0000 (UTC)
commit 05e36e1e01cdf42e17c9eee20641b9c7f0a016f4
Author: Sébastien Wilmet <swilmet gnome org>
Date: Wed Dec 4 17:40:20 2019 +0100
desktop file: simplify
- VERSION and FULL_LIBEXECDIR were not present in the *.desktop.in.in
file. So rename the file to *.desktop.in, only the i18n.merge_file() is
needed.
- po_dir: the documentation says that it needs to be a relative path.
- Avoid using the datadir global variable.
data/meson.build | 29 ++++++----------------
...it.desktop.in.in => org.gnome.gedit.desktop.in} | 0
2 files changed, 8 insertions(+), 21 deletions(-)
---
diff --git a/data/meson.build b/data/meson.build
index 00cdaa10a..f9faecbf4 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -25,28 +25,15 @@ if appstream_util.found()
)
endif
-
-desktop_in = configuration_data()
-desktop_in.set('VERSION', meson.project_version())
-desktop_in.set('FULL_LIBEXECDIR', libexecdir)
-
-desktop_file_configured = configure_file(
- input: 'org.gnome.gedit.desktop.in.in',
- output: 'org.gnome.gedit.desktop.in',
- configuration: desktop_in,
-)
-
-desktop_file = i18n.merge_file(
- 'desktop-file',
- input: desktop_file_configured,
- output: 'org.gnome.gedit.desktop',
+desktop_file = 'org.gnome.gedit.desktop'
+desktop_output_file = i18n.merge_file(
+ desktop_file,
type: 'desktop',
- po_dir: join_paths(srcdir, 'po'),
+ input: desktop_file + '.in',
+ output: desktop_file,
+ po_dir: '../po/',
install: true,
- install_dir: join_paths(
- datadir,
- 'applications',
- )
+ install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'applications')
)
desktop_file_validate = find_program('desktop-file-validate', required: false)
@@ -55,7 +42,7 @@ if desktop_file_validate.found()
'validate-desktop',
desktop_file_validate,
args: [
- desktop_file.full_path(),
+ desktop_output_file.full_path(),
]
)
endif
diff --git a/data/org.gnome.gedit.desktop.in.in b/data/org.gnome.gedit.desktop.in
similarity index 100%
rename from data/org.gnome.gedit.desktop.in.in
rename to data/org.gnome.gedit.desktop.in
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]