#!/bin/bash # # Update generated stuff in graphics/ from the source files. # # It would be nice to do this with waf but: # a) getting the wscript right is a complete pain in the arse # b) running Inkscape from the command line on OS X is a complete pain in the arse pwd=`pwd` if [ `basename $pwd` != "graphics" ]; then echo "$0: run within graphics/" exit 1 fi if [ `uname -s` == "Darwin" ]; then # Convert OS X icons using OS X-only iconutil for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do iconutil --convert icns --output $p.icns $p.iconset done else INKSCAPE="inkscape -z -C -e" # OS X application icons for r in 16 32 128 256 512; do for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do mkdir -p $p.iconset $INKSCAPE $p.iconset/icon_$rx$r.png -w $r -h $r $p.svg $INKSCAPE $p.iconset/icon_$rx$r@2x.png -w $r -h $r $p.svg done done # Linux application icons for r in 16 22 32 48 64 128 256 512; do mkdir -p $r for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do $INKSCAPE $r/$p.png $p.svg -w $r -h $r done done # Windows application icons for p in dcpomatic2 dcpomatic2_kdm dcpomatic2_server dcpomatic2_batch; do icotool -c -o $p.ico 48/$p.png done icotool -c -o dcpomatic2_server_small.ico dcpomatic2_server_small.png $INKSCAPE dcpomatic.png dcpomatic2.svg -w 400 -h 400 convert dcpomatic.png dcpomatic.bmp # Preferences icons (all platforms) # servers.png does not have an SVG version for i in colour_conversions defaults kdm_email keys tms; do $INKSCAPE $i.png $i.svg -w 32 -h 32 done # Splash screen (all platforms) $INKSCAPE splash.png splash.svg -w 400 -h 300 fi