Commit b36c366f authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

meson: add new tasks on post install

Update the destkop database & icon cache.
parent d1c7897b
#!/usr/bin/env python3
import os
import subprocess
prefix = os.environ.get('MESON_INSTALL_PREFIX', '/usr/local')
datadir = os.path.join(prefix, 'share')
# Packaging tools define DESTDIR and this isn't needed for them
if 'DESTDIR' not in os.environ:
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas',
os.path.join(datadir, 'glib-2.0', 'schemas')])
print('Updating icon cache...')
subprocess.call(['gtk-update-icon-cache', '-qtf',
os.path.join(datadir, 'icons', 'hicolor')])
print('Updating desktop database...')
subprocess.call(['update-desktop-database', '-q',
os.path.join(datadir, 'applications')])
......@@ -9,7 +9,7 @@ install_data (join_paths ('icons', 'hicolor', 'scalable', project_id + '-symboli
install_data (project_id + '.gschema.xml',
install_dir: join_paths (datadir, 'glib-2.0', 'schemas'))
meson.add_install_script ('meson_compile_gschema.py')
i18n.merge_file ('desktop-file',
input: project_id + '.desktop.in',
......
#!/usr/bin/env python3
import os
import subprocess
schemadir = os.path.join(os.environ['MESON_INSTALL_PREFIX'], 'share', 'glib-2.0', 'schemas')
if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
......@@ -25,3 +25,5 @@ subdir ('po')
subdir ('data')
subdir ('help')
subdir ('src')
meson.add_install_script('build-aux/meson_post_install.py')
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment