3 # Update generated stuff in graphics/ from the source files.
5 # It would be nice to do this with waf but:
6 # a) getting the wscript right is a complete pain in the arse
7 # b) running Inkscape from the command line on OS X is a complete pain in the arse
10 if [ `basename $pwd` != "graphics" ]; then
11 echo "$0: run within graphics/"
15 if [ `uname -s` == "Darwin" ]; then
16 # Convert OS X icons using OS X-only iconutil
17 for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do
18 iconutil --convert icns --output $p.icns $p.iconset
21 INKSCAPE="inkscape -z -C -e"
23 # OS X application icons
24 for r in 16 32 128 256 512; do
25 for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do
27 $INKSCAPE $p.iconset/icon_$rx$r.png -w $r -h $r $p.svg
28 $INKSCAPE $p.iconset/icon_$rx$r@2x.png -w $r -h $r $p.svg
32 # Linux application icons
33 for r in 16 22 32 48 64 128 256 512; do
35 for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do
36 $INKSCAPE $r/$p.png $p.svg -w $r -h $r
40 # Windows application icons
41 for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do
42 icotool -c -o $p.ico 48/$p.png
44 icotool -c -o dcpomatic2_server_small.ico dcpomatic2_server_small.png
45 $INKSCAPE dcpomatic.png dcpomatic2.svg -w 400 -h 400
46 convert dcpomatic.png dcpomatic.bmp
48 # OS X preferences icons
49 # servers.png does not have an SVG version
50 for i in colour_conversions defaults kdm_email keys tms; do
51 $INKSCAPE $i.png $i.svg -w 32 -h 32
54 # Splash screen (all platforms)
55 $INKSCAPE splash.png splash.svg -w 400 -h 300