From dcec480417c601fcf9c684b2af4552e889eed8dd Mon Sep 17 00:00:00 2001 From: Vitaly Zaitsev Date: Mon, 15 Aug 2022 09:13:33 +0200 Subject: [PATCH] Switched to gnome.post_install() to run post-installation actions. (#759) Signed-off-by: Vitaly Zaitsev --- .github/workflows/main.yml | 2 +- meson.build | 9 ++++++++- meson_install.sh | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ea586e..2ac97c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,7 +6,7 @@ env: UBUNTU_DEPS: | pkg-config gettext appstream python3 python-gi-dev python3-lxml python3-evdev - gir1.2-rsvg-2.0 python3-gi-cairo flake8 gtk-update-icon-cache + gir1.2-rsvg-2.0 python3-gi-cairo flake8 gtk-update-icon-cache desktop-file-utils PIP_PACKAGES: meson ninja jobs: diff --git a/meson.build b/meson.build index 21963d8..645be63 100644 --- a/meson.build +++ b/meson.build @@ -109,7 +109,14 @@ configure_file(input: 'piper.in', output: 'piper.devel', configuration: config_piper_devel) -meson.add_install_script('meson_install.sh') +if meson.version().version_compare('>=0.59.0') + gnome.post_install( + gtk_update_icon_cache: true, + update_desktop_database: true + ) +else + meson.add_install_script('meson_install.sh') +endif if enable_tests flake8 = find_program('flake8') diff --git a/meson_install.sh b/meson_install.sh index e5aa42a..b8841bb 100644 --- a/meson_install.sh +++ b/meson_install.sh @@ -5,6 +5,9 @@ if [ -z $DESTDIR ]; then # Update icon cache gtk-update-icon-cache -f -t $PREFIX/share/icons/hicolor + + # Update desktop database cache + update-desktop-database # Install new schemas #glib-compile-schemas $PREFIX/share/glib-2.0/schemas/