[sysprof] build: use app-id to determine installed icon
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sysprof] build: use app-id to determine installed icon
- Date: Fri, 22 Jul 2022 20:14:07 +0000 (UTC)
commit 3002640c503c8e9f162f4f0c33f46f64d9183514
Author: Christian Hergert <chergert redhat com>
Date: Fri Jul 22 13:13:59 2022 -0700
build: use app-id to determine installed icon
This means we don't install org.gnome.Sysprof.svg anymore when building
with -Ddevelopment=true (and vice versa). We do use org.gnome.Sysprof.svg
from libsysprof-ui, but that embeds the appropriate resources.
data/icons/meson.build | 7 +++++++
data/icons/{scalable/apps => }/org.gnome.Sysprof.Devel.svg | 0
data/icons/{scalable/apps => }/org.gnome.Sysprof.svg | 0
data/meson.build | 8 +-------
src/libsysprof-ui/libsysprof-ui.gresource.xml | 2 +-
5 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 00000000..86782e5a
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,7 @@
+icondir = join_paths(datadir, 'icons/hicolor')
+
+foreach kind: ['scalable', 'symbolic']
+ install_subdir(kind, install_dir: icondir)
+endforeach
+
+install_data('@0@.svg'.format(app_id), install_dir: join_paths(icondir, 'scalable/apps'))
diff --git a/data/icons/scalable/apps/org.gnome.Sysprof.Devel.svg b/data/icons/org.gnome.Sysprof.Devel.svg
similarity index 100%
rename from data/icons/scalable/apps/org.gnome.Sysprof.Devel.svg
rename to data/icons/org.gnome.Sysprof.Devel.svg
diff --git a/data/icons/scalable/apps/org.gnome.Sysprof.svg b/data/icons/org.gnome.Sysprof.svg
similarity index 100%
rename from data/icons/scalable/apps/org.gnome.Sysprof.svg
rename to data/icons/org.gnome.Sysprof.svg
diff --git a/data/meson.build b/data/meson.build
index c0e4b721..eaeb4567 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -30,11 +30,5 @@ if get_option('gtk') and get_option('libsysprof')
install_dir: join_paths(datadir, 'applications')
)
- icon_sizes = ['scalable', 'symbolic']
- foreach size: icon_sizes
- install_subdir('icons/' + size,
- install_dir: join_paths(datadir, 'icons/hicolor')
- )
- endforeach
-
+ subdir('icons')
endif
diff --git a/src/libsysprof-ui/libsysprof-ui.gresource.xml b/src/libsysprof-ui/libsysprof-ui.gresource.xml
index d4233983..c9a7cb64 100644
--- a/src/libsysprof-ui/libsysprof-ui.gresource.xml
+++ b/src/libsysprof-ui/libsysprof-ui.gresource.xml
@@ -5,7 +5,7 @@
<file compressed="true">css/SysprofDisplay-shared.css</file>
<!-- Application icons -->
- <file
alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/scalable/apps/org.gnome.Sysprof.svg</file>
+ <file alias="icons/scalable/apps/org.gnome.Sysprof.svg">../../data/icons/org.gnome.Sysprof.svg</file>
<file
alias="icons/scalable/apps/org.gnome.Sysprof-symbolic.svg">../../data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg</file>
<file
alias="icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg">../../data/icons/symbolic/apps/org.gnome.Sysprof-symbolic.svg</file>
</gresource>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]