Commit 9f8d12ff authored by Bilal Elmoussaoui's avatar Bilal Elmoussaoui

meson: use gnome.post_install

parent a71053e4
#!/usr/bin/env python3
from os import environ, path
from subprocess import call
if not environ.get('DESTDIR', ''):
PREFIX = environ.get('MESON_INSTALL_PREFIX', '/usr/local')
DATA_DIR = path.join(PREFIX, 'share')
print('Updating icon cache...')
call(['gtk-update-icon-cache', '-qtf', path.join(DATA_DIR, 'icons/hicolor')])
print("Updating desktop database...")
call(["update-desktop-database", path.join(DATA_DIR, 'applications')])
...@@ -2,7 +2,7 @@ project('gnome-tour', ...@@ -2,7 +2,7 @@ project('gnome-tour',
'rust', 'rust',
version: '41.rc', version: '41.rc',
license: 'GPL-3.0-or-later', license: 'GPL-3.0-or-later',
meson_version : '>= 0.50') meson_version : '>= 0.59')
i18n = import('i18n') i18n = import('i18n')
gnome = import('gnome') gnome = import('gnome')
...@@ -30,7 +30,7 @@ localedir = prefix / get_option('localedir') ...@@ -30,7 +30,7 @@ localedir = prefix / get_option('localedir')
datadir = prefix / get_option('datadir') datadir = prefix / get_option('datadir')
pkgdatadir = datadir / meson.project_name() pkgdatadir = datadir / meson.project_name()
iconsdir = datadir / 'icons' iconsdir = datadir / 'icons'
podir =meson.source_root () / 'po' podir =meson.project_source_root () / 'po'
gettext_package = meson.project_name() gettext_package = meson.project_name()
...@@ -52,8 +52,8 @@ application_id = '@0@@1@'.format(base_id, profile) ...@@ -52,8 +52,8 @@ application_id = '@0@@1@'.format(base_id, profile)
meson.add_dist_script( meson.add_dist_script(
'build-aux/dist-vendor.sh', 'build-aux/dist-vendor.sh',
meson.build_root() / 'meson-dist' / meson.project_name() + '-' + version, meson.project_build_root() / 'meson-dist' / meson.project_name() + '-' + version,
meson.source_root() meson.project_source_root()
) )
if get_option('profile') == 'development' if get_option('profile') == 'development'
...@@ -66,4 +66,8 @@ subdir('data') ...@@ -66,4 +66,8 @@ subdir('data')
subdir('po') subdir('po')
subdir('src') subdir('src')
meson.add_install_script('build-aux/meson_post_install.py') gnome.post_install(
gtk_update_icon_cache: true,
update_desktop_database: true,
)
...@@ -13,8 +13,8 @@ config = configure_file( ...@@ -13,8 +13,8 @@ config = configure_file(
# Copy the config.rs output to the source directory. # Copy the config.rs output to the source directory.
run_command( run_command(
'cp', 'cp',
meson.build_root() / 'src' / 'config.rs', meson.project_build_root() / 'src' / 'config.rs',
meson.source_root() / 'src' / 'config.rs', meson.project_source_root() / 'src' / 'config.rs',
check: true check: true
) )
...@@ -47,8 +47,8 @@ custom_target( ...@@ -47,8 +47,8 @@ custom_target(
depends: resources, depends: resources,
command: [ command: [
cargo_script, cargo_script,
meson.build_root(), meson.project_build_root(),
meson.source_root(), meson.project_source_root(),
'@OUTPUT@', '@OUTPUT@',
profile, profile,
meson.project_name(), meson.project_name(),
......
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