[gedit/zbrown/deteplification-src: 74/633] desktop file: simplify




commit cbda15eacce0ad2259e23533e66ea92f6a9aa2e7
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]