build: Use gnome.post_install

Also requires meson 0.57.0.
Otherwise the post install script will fail if GTK 3 is not installed.
This commit is contained in:
Bobby Rong
2022-02-17 22:44:13 +08:00
parent d979e8e930
commit b7e84c4326
4 changed files with 11 additions and 19 deletions
-1
View File
@@ -1 +0,0 @@
subdir('meson')
-1
View File
@@ -1 +0,0 @@
meson.add_install_script('meson_post_install.py')
-15
View File
@@ -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])