Aegisub/scripts/unix-gen-xpm.awk
Amar Takhar bd78a5c60e Instead of generating wxicon_xpm.xpm from icon.ico (which is very low-res)
supply a 48x48 xpm to be included as the application icon.  There's probably a
better way to do this, like figuring out what the typical application icon size
is and supplying different sizes.

Originally committed to SVN as r2702.
2009-01-24 15:58:38 +00:00

22 lines
403 B
Awk

/BITMAP/ {
gsub(/\"bitmaps\//, "", $3)
gsub(/\"/, "", $3)
image[$1] = $3
}
END {
printf(" \
all: bmp2xpm \n \
.PHONY: all bmp2xpm \n \
CONVERT ?= %s \n \
", BIN_CONVERT)
for (v in image) {
printf("%s_xpm.xpm: %s\n", v, image[v])
printf(" $(CONVERT) -transparent \"#c0c0c0\" %s %s_xpm.xpm\n\n", image[v], v)
}
printf("bmp2xpm:")
for (v in image)
printf(" %s_xpm.xpm", v)
}