From 146a76c0ddd2787b5a3131e6ab6394ec851445bb Mon Sep 17 00:00:00 2001 From: Maximiliano Sandoval R Date: Fri, 18 Mar 2022 12:18:59 +0100 Subject: [PATCH] meson: Use gnome.post_install Requires meson 0.59. The command to update the desktop database was not executed which could lead to the app not appearing on the apps menu after install. --- build-aux/post_install.py | 15 --------------- meson.build | 8 ++++++-- 2 files changed, 6 insertions(+), 17 deletions(-) delete mode 100644 build-aux/post_install.py diff --git a/build-aux/post_install.py b/build-aux/post_install.py deleted file mode 100644 index bf320a9d..00000000 --- a/build-aux/post_install.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python3 - -import os -import subprocess - -install_prefix = os.environ['MESON_INSTALL_PREFIX'] -icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor') -schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas') - -if not os.environ.get('DESTDIR'): - print('Update icon cache...') - subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir]) - - print('Compiling gsettings schemas...') - subprocess.call(['glib-compile-schemas', schemadir]) diff --git a/meson.build b/meson.build index 94e0eda3..a2cde71b 100644 --- a/meson.build +++ b/meson.build @@ -221,8 +221,12 @@ endif files(iso_639_xml, iso_3166_xml) # Check to make sure these exist -# Post-install scripts -meson.add_install_script('build-aux' / 'post_install.py') +# Post-install script +gnome.post_install( + gtk_update_icon_cache: true, + glib_compile_schemas: true, + update_desktop_database: true, +) # Subfolders subdir('desktop')