From 502f73ae2ab9efa62f40f45f1f48eba4046a0794 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 11 Aug 2025 17:27:35 -0400 Subject: [PATCH] Fix icon cache update script for local builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Make gtk4-update-icon-cache optional and gracefully handle failures - Use proper MESON_INSTALL_DESTDIR_PREFIX environment variable - Prevent build failures when icon cache can't be updated 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- meson.build | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index 94d786a..dd0a543 100644 --- a/meson.build +++ b/meson.build @@ -104,9 +104,12 @@ i18n.merge_file( install_dir: get_option('sysconfdir') / 'xdg' / 'autostart', ) -# Update icon cache manually (desktop-neutral) -meson.add_install_script('gtk4-update-icon-cache', '-q', '-t', '-f', - get_option('datadir') / 'icons' / 'hicolor') +# Update icon cache manually (desktop-neutral) - optional, ignore failures +gtk_update_icon_cache = find_program('gtk4-update-icon-cache', required: false) +if gtk_update_icon_cache.found() + meson.add_install_script('sh', '-c', + 'gtk4-update-icon-cache -q -t -f "$MESON_INSTALL_DESTDIR_PREFIX/' + get_option('datadir') / 'icons' / 'hicolor' + '" || echo "Icon cache update skipped"') +endif summary += {'Install dir': python.find_installation('python3').get_install_dir()}