[dconf-editor] Improve meson_post_install.py.
- From: Arnaud Bonatti <arnaudb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf-editor] Improve meson_post_install.py.
- Date: Mon, 26 Feb 2018 15:19:59 +0000 (UTC)
commit 7d4f1c7e246044bd0674cb0882a58aa47a466a11
Author: Arnaud Bonatti <arnaud bonatti gmail com>
Date: Mon Feb 26 16:19:30 2018 +0100
Improve meson_post_install.py.
meson_post_install.py | 22 +++++++++++++++-------
1 files changed, 15 insertions(+), 7 deletions(-)
---
diff --git a/meson_post_install.py b/meson_post_install.py
index 0df4692..a814cdf 100644
--- a/meson_post_install.py
+++ b/meson_post_install.py
@@ -2,13 +2,21 @@
import os
import subprocess
-import sys
if not os.environ.get('DESTDIR'):
- icondir = os.path.join(sys.argv[1], 'icons', 'hicolor')
- print('Update icon cache...')
- subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
+ prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
+ datadir = os.path.join(prefix, 'share')
- schemadir = os.path.join(sys.argv[1], 'glib-2.0', 'schemas')
- print('Compiling gsettings schemas...')
- subprocess.call(['glib-compile-schemas', schemadir])
+ print('Updating icon cache...')
+ icon_cache_dir = os.path.join(datadir, 'icons', 'hicolor')
+ if not os.path.exists(icon_cache_dir):
+ os.makedirs(icon_cache_dir)
+ subprocess.call(['gtk-update-icon-cache',
+ '--quiet', '--force', '--ignore-theme-index',
+ icon_cache_dir])
+
+ print('Compiling GSettings schemas...')
+ schemas_dir = os.path.join(datadir, 'glib-2.0', 'schemas')
+ if not os.path.exists(schemas_dir):
+ os.makedirs(schemas_dir)
+ subprocess.call(['glib-compile-schemas', schemas_dir])
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]