[gnome-nibbles/wip/vala: 13/16] Install icons
- From: Michael Catanzaro <mcatanzaro src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles/wip/vala: 13/16] Install icons
- Date: Sat, 27 Jun 2015 17:03:44 +0000 (UTC)
commit 8db22c57531dc37d78fc5be92b05c546b0f5b0be
Author: Michael Catanzaro <mcatanzaro gnome org>
Date: Sat Jun 27 11:14:43 2015 -0500
Install icons
configure.ac | 1 +
data/icons/Makefile.am | 54 +++++++++++++++++++-
data/icons/hicolor/22x22/gnome-nibbles.png | Bin 1138 -> 0 bytes
data/icons/hicolor/Makefile.am | 19 -------
...es.png => hicolor_apps_16x16_gnome-nibbles.png} | Bin 749 -> 749 bytes
...es.png => hicolor_apps_24x24_gnome-nibbles.png} | Bin 1181 -> 1181 bytes
...es.png => hicolor_apps_32x32_gnome-nibbles.png} | Bin 2101 -> 2101 bytes
...es.png => hicolor_apps_48x48_gnome-nibbles.png} | Bin 3452 -> 3452 bytes
...svg => hicolor_apps_scalable_gnome-nibbles.svg} | 0
...color_apps_symbolic-gnome-nibbles-symbolic.svg} | 0
10 files changed, 54 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 78fc91b..8e6e099 100644
--- a/configure.ac
+++ b/configure.ac
@@ -49,6 +49,7 @@ dnl ###########################################################################
AC_CONFIG_FILES([
Makefile
data/Makefile
+data/icons/Makefile
data/levels/Makefile
data/pix/Makefile
src/Makefile
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index e9b9c06..0e62fc5 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -1,3 +1,55 @@
-SUBDIRS = hicolor
+public_icons_themes = \
+ hicolor
+
+public_icons = \
+ hicolor_apps_scalable_gnome-nibbles.svg \
+ hicolor_apps_symbolic_gnome-nibbles-symbolic.svg \
+ hicolor_apps_16x16_gnome-nibbles.png \
+ hicolor_apps_24x24_gnome-nibbles.png \
+ hicolor_apps_32x32_gnome-nibbles.png \
+ hicolor_apps_48x48_gnome-nibbles.png \
+ $(NULL)
+
+EXTRA_DIST = $(public_icons)
+
+###############################################################################
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t
+
+update-icon-cache:
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ for theme in $(public_icons_themes); do \
+ $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \
+ done; \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ for theme in $(public_icons_themes); do \
+ echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \
+ done; \
+ fi
+
+install-icons:
+ for icon in $(public_icons); do \
+ THEME=`echo $$icon | cut -d_ -f1`; \
+ CONTEXT=`echo $$icon | cut -d_ -f2`; \
+ SIZE=`echo $$icon | cut -d_ -f3`; \
+ ICONFILE=`echo $$icon | cut -d_ -f4`; \
+ mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \
+ $(INSTALL_DATA) $(srcdir)/$$icon
$(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+ done
+
+uninstall-icons:
+ -for icon in $(public_icons); do \
+ THEME=`echo $$icon | cut -d_ -f1`; \
+ CONTEXT=`echo $$icon | cut -d_ -f2`; \
+ SIZE=`echo $$icon | cut -d_ -f3`; \
+ ICONFILE=`echo $$icon | cut -d_ -f4`; \
+ rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \
+ done
+
+install-data-local: install-icons update-icon-cache
+
+uninstall-local: uninstall-icons update-icon-cache
-include $(top_srcdir)/git.mk
diff --git a/data/icons/hicolor/scalable/gnome-nibbles.svg
b/data/icons/hicolor_apps_scalable_gnome-nibbles.svg
similarity index 100%
rename from data/icons/hicolor/scalable/gnome-nibbles.svg
rename to data/icons/hicolor_apps_scalable_gnome-nibbles.svg
diff --git a/data/icons/hicolor/scalable/gnome-nibbles-symbolic.svg
b/data/icons/hicolor_apps_symbolic-gnome-nibbles-symbolic.svg
similarity index 100%
rename from data/icons/hicolor/scalable/gnome-nibbles-symbolic.svg
rename to data/icons/hicolor_apps_symbolic-gnome-nibbles-symbolic.svg
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]