Add rule to build icons
authorNeil <neil@dip.sun.ac.za>
Sun, 11 Sep 2016 12:07:42 +0000 (14:07 +0200)
committerNeil <neil@dip.sun.ac.za>
Sun, 11 Sep 2016 12:49:44 +0000 (14:49 +0200)
data/images/Makefile
data/images/icons/tabakrolletjie_icon.ico [new file with mode: 0644]
data/images/icons/tabakrolletjie_icon_128.png [new file with mode: 0644]
data/images/icons/tabakrolletjie_icon_16.png [new file with mode: 0644]
data/images/icons/tabakrolletjie_icon_32.png [new file with mode: 0644]
data/images/icons/tabakrolletjie_icon_64.png [new file with mode: 0644]

index 599099b449e25457c6eb894f62021aac9530db6c..bffce90d496e12d26a3095a9b2c715e0cdfb8ecd 100644 (file)
@@ -8,14 +8,18 @@ LIGHT_MASK=light_mask_2_1 light_mask_2_2 light_mask_3_1 light_mask_3_2 light_mas
 CONTROLS=night default_cursor exit pause play day remove
 BLANKS=circle square
 SPLASH=splash new_game continue_retry help quit
+MOULD_ICON=tabakrolletjie_icon
 
 IMG16=$(MOULD_BODY)
 IMG32=$(MOULD_BODY) $(MOULD) $(LIGHT) seed $(LIGHT_MASK) $(CONTROLS)
 IMG48=$(LIGHT) $(TURNIP) $(LIGHT_MASK) $(BLANKS)
 IMG64=$(MOULD_BODY)
+ICONS=${MOULD_ICON}
 
 CURSORS=seed $(LIGHT) remove
 
+ICON_SIZES=16 32 64 128
+
 PNG16=$(patsubst %, 16/%.png, $(IMG16))
 PNG32=$(patsubst %, 32/%.png, $(IMG32))
 PNG48=$(patsubst %, 48/%.png, $(IMG48))
@@ -45,5 +49,12 @@ splash/%.png: %.svg
        @mkdir -p `dirname $@`
        @inkscape -z -e $@ $<
 
+icons/%.ico: %.svg
+       @mkdir -p `dirname $@`
+       for size in $(ICON_SIZES); do \
+           inkscape -z -e $(@D)/$*_"$$size".png -w "$$size" -h "$$size"  $<; \
+       done
+       icotool -c -o $@ $(@D)/$*_*.png
+
 cursors/%.png: 32/%.png
        @cp $< $@
diff --git a/data/images/icons/tabakrolletjie_icon.ico b/data/images/icons/tabakrolletjie_icon.ico
new file mode 100644 (file)
index 0000000..d3f1db6
Binary files /dev/null and b/data/images/icons/tabakrolletjie_icon.ico differ
diff --git a/data/images/icons/tabakrolletjie_icon_128.png b/data/images/icons/tabakrolletjie_icon_128.png
new file mode 100644 (file)
index 0000000..3509b32
Binary files /dev/null and b/data/images/icons/tabakrolletjie_icon_128.png differ
diff --git a/data/images/icons/tabakrolletjie_icon_16.png b/data/images/icons/tabakrolletjie_icon_16.png
new file mode 100644 (file)
index 0000000..4ceeae1
Binary files /dev/null and b/data/images/icons/tabakrolletjie_icon_16.png differ
diff --git a/data/images/icons/tabakrolletjie_icon_32.png b/data/images/icons/tabakrolletjie_icon_32.png
new file mode 100644 (file)
index 0000000..747b347
Binary files /dev/null and b/data/images/icons/tabakrolletjie_icon_32.png differ
diff --git a/data/images/icons/tabakrolletjie_icon_64.png b/data/images/icons/tabakrolletjie_icon_64.png
new file mode 100644 (file)
index 0000000..5b4c459
Binary files /dev/null and b/data/images/icons/tabakrolletjie_icon_64.png differ