[gimp/meson: 19/127] Add Desktop directory.
- From: Félix Piédallu <fpiedallu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/meson: 19/127] Add Desktop directory.
- Date: Fri, 2 Feb 2018 16:01:21 +0000 (UTC)
commit 242e10857a9c20f8ce5a84b6f39a499cbdc1e602
Author: Félix Piédallu <felix piedallu me>
Date: Thu Nov 16 11:40:04 2017 +0100
Add Desktop directory.
desktop/meson.build | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
meson.build | 3 +-
po/meson.build | 4 +++
3 files changed, 66 insertions(+), 1 deletions(-)
---
diff --git a/desktop/meson.build b/desktop/meson.build
new file mode 100644
index 0000000..b6dcbe3
--- /dev/null
+++ b/desktop/meson.build
@@ -0,0 +1,60 @@
+sizes = [
+ '16',
+ '22',
+ '24',
+ '32',
+ '48',
+ '64',
+ '256',
+]
+
+foreach size : sizes
+ sizedir = size+'x'+size
+ install_data(join_paths(sizedir, 'gimp.png'),
+ install_dir: join_paths(
+ datadir, 'icons', 'hicolor', sizedir, 'apps'
+ )
+ )
+endforeach
+
+desktopfilename = 'gimp.desktop'
+
+desktop_conf = configuration_data()
+desktop_conf.set('GIMP_APP_VERSION', app_version)
+desktop_conf.set('GIMP_COMMAND', gimp_command)
+desktop_conf.set('GIMP_VERSION', user_version)
+desktop_conf.set('MIME_TYPES', ';'.join(MIMEtypes))
+
+desktopfilein = configure_file(
+ input : desktopfilename+'.in.in',
+ output: desktopfilename+'.in',
+ configuration: desktop_conf,
+)
+
+desktopfile = custom_target(desktopfilename,
+ input : [ desktopfilein, ],
+ output: [ desktopfilename, ],
+
+ command: [
+ intltool_merge,
+ '--desktop-style',
+ '--utf8',
+ '--cache='+join_paths('@OUTDIR@', 'intltool-merge-cache'),
+ po_dir,
+ '@INPUT@',
+ '@OUTPUT@',
+ ],
+ install: true,
+ install_dir: join_paths(datadir, 'applications'),
+)
+
+
+custom_target('validate-desktop',
+ input : [ desktopfile, ],
+ output: [ 'validate-desktop' ],
+ command: [
+ desktop_validate, '@INPUT@',
+ ],
+ build_always: true,
+ build_by_default: false,
+)
diff --git a/meson.build b/meson.build
index 4341deb..c08077f 100644
--- a/meson.build
+++ b/meson.build
@@ -578,6 +578,7 @@ endif
xmllint = find_program('xmllint', required: false)
xsltproc= find_program('xsltproc',required: false)
intltool_merge = find_program('intltool-merge')
+desktop_validate = find_program('desktop-file-validate')
# Check for vector icons
@@ -804,7 +805,7 @@ subdir('po-tips')
# Data / Desktop / xml files
subdir('cursors')
subdir('data')
-# subdir('desktop')
+subdir('desktop')
subdir('etc')
# subdir('icons')
subdir('m4macros')
diff --git a/po/meson.build b/po/meson.build
index d2a005f..0832e52 100644
--- a/po/meson.build
+++ b/po/meson.build
@@ -1 +1,5 @@
+po_dir = join_paths(
+ meson.source_root(),
+ meson.current_source_dir(),
+)
i18n.gettext(gettext_package)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]