STATUS=@STATUS@
THEME=@THEME@
NAME=@NAME@
VERSION=@VERSION@

all:
# generate derivative graphics
# make default wallpaper
	cp -al images/background4x3.png images/wallpaper.png
	cp -al images/background16x9.png graphics/backgrounds/default-wide.png
	cp -al images/product-logo.png graphics/backgrounds/product-logo.png
	cp -al images/wallpaper.png graphics/backgrounds/default.png
	cp -al images/wallpaper.png graphics/backgrounds/xdm.png
# make wallpapers for gfxboot and grub2
	convert images/background4x3.png -resize 800x600 images/small.png

# display status
	if [ -n "$(STATUS)" ] ; then \
		convert images/wallpaper.png -fill '#c62530' -font /usr/share/fonts/ttf/dejavu/DejaVuSansCondensed-Bold.ttf -style Normal -weight Normal -pointsize 20 -gravity northeast -draw 'text 25,25 "@STATUS@"' wlogo.png; \
		convert wlogo.png images/product-logo.png -geometry +30+30 -composite images/boot.jpg; \
	else \
		convert images/wallpaper.png images/product-logo.png -geometry +30+30 -composite images/boot.jpg; \
	fi
	convert images/small.png images/product-logo.png -geometry +30+30 -composite images/grub.png
	cp -al images/grub.png images/boot.png
# product logo for ahttpd
	cp -al images/product-logo.png components/ahttpd/images/product-logo.png
# product logo for indexhtml
	cp -al images/product-logo.png components/indexhtml/images/product-logo.png

include components.mk
install: browser-qt ahttpd boot-images boot-splash @X86@ indexhtml