From 7c107cd14a7cd30ac0363fabf3ca60c544ab0d2e Mon Sep 17 00:00:00 2001 From: Alecaddd Date: Thu, 19 Sep 2024 18:59:22 -0700 Subject: [PATCH 1/2] Install application icons via meson --- .../128x128/com.github.akiraux.akira.png | Bin .../128x128/com.github.akiraux.akira.svg | 0 .../128x128/com.github.akiraux.akiraDevel.svg | 0 .../16x16/com.github.akiraux.akira.svg | 0 .../16x16/com.github.akiraux.akiraDevel.svg | 0 .../24x24/com.github.akiraux.akira.svg | 0 .../24x24/com.github.akiraux.akiraDevel.svg | 0 .../32x32/com.github.akiraux.akira.svg | 0 .../32x32/com.github.akiraux.akiraDevel.svg | 0 .../48x48/com.github.akiraux.akira.svg | 0 .../48x48/com.github.akiraux.akiraDevel.svg | 0 .../64x64/com.github.akiraux.akira.svg | 0 .../64x64/com.github.akiraux.akiraDevel.svg | 0 data/icons/meson.build | 29 ++++++++++++++++++ data/meson.build | 2 ++ 15 files changed, 31 insertions(+) rename data/icons/{ => hicolor}/128x128/com.github.akiraux.akira.png (100%) rename data/icons/{ => hicolor}/128x128/com.github.akiraux.akira.svg (100%) rename data/icons/{ => hicolor}/128x128/com.github.akiraux.akiraDevel.svg (100%) rename data/icons/{ => hicolor}/16x16/com.github.akiraux.akira.svg (100%) rename data/icons/{ => hicolor}/16x16/com.github.akiraux.akiraDevel.svg (100%) rename data/icons/{ => hicolor}/24x24/com.github.akiraux.akira.svg (100%) rename data/icons/{ => hicolor}/24x24/com.github.akiraux.akiraDevel.svg (100%) rename data/icons/{ => hicolor}/32x32/com.github.akiraux.akira.svg (100%) rename data/icons/{ => hicolor}/32x32/com.github.akiraux.akiraDevel.svg (100%) rename data/icons/{ => hicolor}/48x48/com.github.akiraux.akira.svg (100%) rename data/icons/{ => hicolor}/48x48/com.github.akiraux.akiraDevel.svg (100%) rename data/icons/{ => hicolor}/64x64/com.github.akiraux.akira.svg (100%) rename data/icons/{ => hicolor}/64x64/com.github.akiraux.akiraDevel.svg (100%) create mode 100644 data/icons/meson.build diff --git a/data/icons/128x128/com.github.akiraux.akira.png b/data/icons/hicolor/128x128/com.github.akiraux.akira.png similarity index 100% rename from data/icons/128x128/com.github.akiraux.akira.png rename to data/icons/hicolor/128x128/com.github.akiraux.akira.png diff --git a/data/icons/128x128/com.github.akiraux.akira.svg b/data/icons/hicolor/128x128/com.github.akiraux.akira.svg similarity index 100% rename from data/icons/128x128/com.github.akiraux.akira.svg rename to data/icons/hicolor/128x128/com.github.akiraux.akira.svg diff --git a/data/icons/128x128/com.github.akiraux.akiraDevel.svg b/data/icons/hicolor/128x128/com.github.akiraux.akiraDevel.svg similarity index 100% rename from data/icons/128x128/com.github.akiraux.akiraDevel.svg rename to data/icons/hicolor/128x128/com.github.akiraux.akiraDevel.svg diff --git a/data/icons/16x16/com.github.akiraux.akira.svg b/data/icons/hicolor/16x16/com.github.akiraux.akira.svg similarity index 100% rename from data/icons/16x16/com.github.akiraux.akira.svg rename to data/icons/hicolor/16x16/com.github.akiraux.akira.svg diff --git a/data/icons/16x16/com.github.akiraux.akiraDevel.svg b/data/icons/hicolor/16x16/com.github.akiraux.akiraDevel.svg similarity index 100% rename from data/icons/16x16/com.github.akiraux.akiraDevel.svg rename to data/icons/hicolor/16x16/com.github.akiraux.akiraDevel.svg diff --git a/data/icons/24x24/com.github.akiraux.akira.svg b/data/icons/hicolor/24x24/com.github.akiraux.akira.svg similarity index 100% rename from data/icons/24x24/com.github.akiraux.akira.svg rename to data/icons/hicolor/24x24/com.github.akiraux.akira.svg diff --git a/data/icons/24x24/com.github.akiraux.akiraDevel.svg b/data/icons/hicolor/24x24/com.github.akiraux.akiraDevel.svg similarity index 100% rename from data/icons/24x24/com.github.akiraux.akiraDevel.svg rename to data/icons/hicolor/24x24/com.github.akiraux.akiraDevel.svg diff --git a/data/icons/32x32/com.github.akiraux.akira.svg b/data/icons/hicolor/32x32/com.github.akiraux.akira.svg similarity index 100% rename from data/icons/32x32/com.github.akiraux.akira.svg rename to data/icons/hicolor/32x32/com.github.akiraux.akira.svg diff --git a/data/icons/32x32/com.github.akiraux.akiraDevel.svg b/data/icons/hicolor/32x32/com.github.akiraux.akiraDevel.svg similarity index 100% rename from data/icons/32x32/com.github.akiraux.akiraDevel.svg rename to data/icons/hicolor/32x32/com.github.akiraux.akiraDevel.svg diff --git a/data/icons/48x48/com.github.akiraux.akira.svg b/data/icons/hicolor/48x48/com.github.akiraux.akira.svg similarity index 100% rename from data/icons/48x48/com.github.akiraux.akira.svg rename to data/icons/hicolor/48x48/com.github.akiraux.akira.svg diff --git a/data/icons/48x48/com.github.akiraux.akiraDevel.svg b/data/icons/hicolor/48x48/com.github.akiraux.akiraDevel.svg similarity index 100% rename from data/icons/48x48/com.github.akiraux.akiraDevel.svg rename to data/icons/hicolor/48x48/com.github.akiraux.akiraDevel.svg diff --git a/data/icons/64x64/com.github.akiraux.akira.svg b/data/icons/hicolor/64x64/com.github.akiraux.akira.svg similarity index 100% rename from data/icons/64x64/com.github.akiraux.akira.svg rename to data/icons/hicolor/64x64/com.github.akiraux.akira.svg diff --git a/data/icons/64x64/com.github.akiraux.akiraDevel.svg b/data/icons/hicolor/64x64/com.github.akiraux.akiraDevel.svg similarity index 100% rename from data/icons/64x64/com.github.akiraux.akiraDevel.svg rename to data/icons/hicolor/64x64/com.github.akiraux.akiraDevel.svg diff --git a/data/icons/meson.build b/data/icons/meson.build new file mode 100644 index 000000000..41ba761fd --- /dev/null +++ b/data/icons/meson.build @@ -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' +) diff --git a/data/meson.build b/data/meson.build index fcef85b95..3398833eb 100644 --- a/data/meson.build +++ b/data/meson.build @@ -49,3 +49,5 @@ if compile_schemas.found() compile_schemas, args: ['--strict', '--dry-run', meson.current_source_dir()]) endif + +subdir('icons') From c80406cf30e7cef5c954a91e1f8fad33b080d2f4 Mon Sep 17 00:00:00 2001 From: Alecaddd Date: Thu, 19 Sep 2024 20:25:10 -0700 Subject: [PATCH 2/2] Re-enable update icon cache on meson install --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 39aad355e..eae20de30 100644 --- a/meson.build +++ b/meson.build @@ -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, )