Fix icon cache update script for local builds

- 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 <noreply@anthropic.com>
This commit is contained in:
Storm Dragon
2025-08-11 17:27:35 -04:00
parent d4255f792c
commit 502f73ae2a

View File

@@ -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()}