summaryrefslogtreecommitdiff
path: root/baobab/pixmaps/Makefile.am
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-03-16 18:22:58 +0100
committerraveit65 <[email protected]>2019-03-25 13:15:05 +0100
commit14cd43685163f3ad3e9a79a5b2cb05e7fb420f91 (patch)
tree55e39e057bd1b686eb020bdf9ff6cb693aac525b /baobab/pixmaps/Makefile.am
parente46d962c7d048121bf845bbc2eaaac5849d2aefc (diff)
downloadmate-utils-14cd43685163f3ad3e9a79a5b2cb05e7fb420f91.tar.bz2
mate-utils-14cd43685163f3ad3e9a79a5b2cb05e7fb420f91.tar.xz
GEN png icons from svg files
PNG icons are created if they are not present in icon folder. To remove png icons: make -C baobab/pixmaps clean-png-icons make -C logview/data/icons clean-png-icons To build png icons: make -C baobab/pixmaps build-png-icons make -C logview/data/icons build-png-icons This removes baobab/pixmaps/shot.png file, use applets-screenshooter named icon (used in mate-screenshot).
Diffstat (limited to 'baobab/pixmaps/Makefile.am')
-rw-r--r--baobab/pixmaps/Makefile.am65
1 files changed, 60 insertions, 5 deletions
diff --git a/baobab/pixmaps/Makefile.am b/baobab/pixmaps/Makefile.am
index 6bfb6135..5edbe806 100644
--- a/baobab/pixmaps/Makefile.am
+++ b/baobab/pixmaps/Makefile.am
@@ -1,8 +1,63 @@
-SUBDIRS = 24x24 scalable
+png_icons = \
+ hicolor_apps_16x16_mate-disk-usage-analyzer.png \
+ hicolor_apps_22x22_mate-disk-usage-analyzer.png \
+ hicolor_apps_32x32_mate-disk-usage-analyzer.png \
+ hicolor_apps_48x48_mate-disk-usage-analyzer.png \
+ hicolor_apps_128x128_mate-disk-usage-analyzer.png \
+ $(NULL)
-imagesdir = $(datadir)/mate-disk-usage-analyzer/pixmaps
-images_DATA = \
- shot.png
+public_icons = \
+ $(png_icons) \
+ hicolor_apps_scalable_mate-disk-usage-analyzer.svg \
+ $(NULL)
+
+hicolor_apps_%.png: hicolor_apps_scalable_mate-disk-usage-analyzer.svg
+ rsvg-convert -w $(word 1, $(subst x, ,$(word 1,$(subst _, ,$*)))) -h $(word 2, $(subst x, ,$(word 1,$(subst _, ,$*)))) $^ -o [email protected]
EXTRA_DIST = \
- $(images_DATA)
+ $(public_icons) \
+ $(NULL)
+
+###############################################################################
+
+install-icons: $(public_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
+
+uninstall-local: uninstall-icons
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache: $(public_icons)
+ @-if test -z "$(DESTDIR)"; then \
+ echo "Updating Gtk icon cache."; \
+ $(gtk_update_icon_cache); \
+ else \
+ echo "*** Icon cache not updated. After (un)install, run this:"; \
+ echo "*** $(gtk_update_icon_cache)"; \
+ fi
+
+.PHONY: build-png-icons clean-png-icons
+build-png-icons: $(png_icons)
+
+clean-png-icons:
+ rm -f $(png_icons)