aboutsummaryrefslogtreecommitdiff
path: root/icons
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2006-12-27 11:05:20 +0000
committerSimon Tatham <anakin@pobox.com>2006-12-27 11:05:20 +0000
commitbe8076a6e66cb4a2ac911eb65712b669f6df509a (patch)
tree7b580e291828516f761f2a5d348525bd9aaef27f /icons
parentd07eb2ea3a85913edb826a3e9c3ffc8abda71771 (diff)
downloadpuzzles-be8076a6e66cb4a2ac911eb65712b669f6df509a.zip
puzzles-be8076a6e66cb4a2ac911eb65712b669f6df509a.tar.gz
puzzles-be8076a6e66cb4a2ac911eb65712b669f6df509a.tar.bz2
puzzles-be8076a6e66cb4a2ac911eb65712b669f6df509a.tar.xz
Actually introduce the ability to build the Windows icons into the
Windows puzzle binaries. This checkin involves several distinct changes: - mkfiles.pl now has an extra feature: if an object file is listed in Recipe with a trailing question mark, it will be considered optional, and silently dropped from the makefile if its primary source file isn't present at the time mkfiles.pl runs. This means people who check out the puzzles from Subversion and just run mkfiles.pl shouldn't get build failures; they just won't get the icons. - all the .R files now use this feature to include an optional Windows resource file. - the .rc resource source files are built by icons/Makefile. - windows.c finds the icon if present and uses it in place of the standard Windows application icon. [originally from svn r7020]
Diffstat (limited to 'icons')
-rw-r--r--icons/Makefile13
1 files changed, 9 insertions, 4 deletions
diff --git a/icons/Makefile b/icons/Makefile
index 934b792..233f767 100644
--- a/icons/Makefile
+++ b/icons/Makefile
@@ -19,6 +19,7 @@ P16D24 = $(patsubst %,%-16d24.png,$(PUZZLES))
P16D8 = $(patsubst %,%-16d8.png,$(PUZZLES))
P16D4 = $(patsubst %,%-16d4.png,$(PUZZLES))
ICONS = $(patsubst %,%.ico,$(PUZZLES))
+RC = $(patsubst %,%.rc,$(PUZZLES))
BIN = ../
PIC = ./
@@ -26,7 +27,7 @@ PIC = ./
base: $(BASE)
web: $(WEB)
pngicons: $(P48D24) $(P32D24) $(P16D24)
-icons: $(ICONS)
+winicons: $(ICONS) $(RC)
# Build the base puzzle screenshots from which all the other images
# are derived. Some of them involve showing a move animation
@@ -108,12 +109,16 @@ $(P16D4): %-16d4.png: %-ibase.png
convert -colors 16 -map $(PIC)win16pal.xpm tmp2.png $@
rm -f tmp.png tmp2.png
-# And build the actual icons themselves, by feeding all those PNGs
-# to my icon builder script.
+# Build the actual Windows icons themselves, by feeding all those
+# PNGs to my icon builder script.
$(ICONS): %.ico: %-48d24.png %-48d8.png %-48d4.png \
%-32d24.png %-32d8.png %-32d4.png \
%-16d24.png %-16d8.png %-16d4.png
$(PIC)icon.pl $? > $@
+# Build the .RC files which bind the icons into the applications.
+$(RC): %.rc:
+ echo '200 ICON "$*.ico"' > $@
+
clean:
- rm -f *.png *.ico
+ rm -f *.png *.ico *.rc