Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install application icons via meson #758

Merged
merged 2 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions data/icons/meson.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
application_id = meson.project_name()

# Install our icons in all the required sizes
icon_sizes = ['16', '24', '32', '48', '64', '128']

foreach i : icon_sizes
install_data(
'hicolor' / i + 'x' + i / application_id + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'apps',
rename: application_id + '.svg'
)
install_data(
'hicolor' / i + 'x' + i / application_id + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i + '@2' / 'apps',
rename: application_id + '.svg'
)
install_data(
'hicolor' / i + 'x' + i / application_id + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / i + 'x' + i / 'mimetypes',
rename: application_id + '.svg'
)
endforeach


install_data(
'hicolor/128x128/' + meson.project_name() + '.svg',
install_dir: get_option('datadir') / 'icons' / 'hicolor' / 'scalable' / 'apps',
rename: application_id + '.svg'
)
2 changes: 2 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,5 @@ if compile_schemas.found()
compile_schemas,
args: ['--strict', '--dry-run', meson.current_source_dir()])
endif

subdir('icons')
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ subdir('src')

gnome.post_install(
glib_compile_schemas: true,
# gtk_update_icon_cache: true,
gtk_update_icon_cache: true,
update_desktop_database: true,
)
Loading