summaryrefslogtreecommitdiff
path: root/graphics/update
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-10-08 09:52:39 +0100
committerCarl Hetherington <cth@carlh.net>2015-10-09 13:45:04 +0100
commitc314f25178bd32120dfc64ec72a7a94a32b1b7b0 (patch)
tree63c327e78fea9dcc2b03272c86f30f31647c5ede /graphics/update
parenta6c709878735820af75ad887084f615fd3b8249d (diff)
Graphics rearrangement and probably breakage.
Diffstat (limited to 'graphics/update')
-rwxr-xr-xgraphics/update52
1 files changed, 52 insertions, 0 deletions
diff --git a/graphics/update b/graphics/update
new file mode 100755
index 000000000..9a2c9190e
--- /dev/null
+++ b/graphics/update
@@ -0,0 +1,52 @@
+#!/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
+ iconutil --convert icns --output dcpomatic.icns dcpomatic.iconset
+else
+ INKSCAPE="inkscape -z -C -e"
+
+ # OS X application icons
+ mkdir -p dcpomatic.iconset
+ for r in 16 32 128 256 512; do
+ $INKSCAPE dcpomatic.iconset/icon_$rx$r.png dcpomatic2.svg -w $r -h $r dcpomatic2.svg
+ $INKSCAPE dcpomatic.iconset/icon_$rx$r@2x.png -w $r -h $r dcpomatic2.svg
+ 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 286
+ 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