diff options
| author | 2018-04-25 18:07:30 -0400 | |
|---|---|---|
| committer | 2018-04-25 18:07:30 -0400 | |
| commit | 9b1b081cfdb1c0fb6457278775e0823f8bc10f62 (patch) | |
| tree | ce8840148d8445055ba9e4f12263b2208f234c16 /res/makeicon.sh | |
Import Upstream version 2.0.0+dfsgupstream/2.0.0+dfsg
Diffstat (limited to 'res/makeicon.sh')
| -rwxr-xr-x | res/makeicon.sh | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/res/makeicon.sh b/res/makeicon.sh new file mode 100755 index 0000000..2883755 --- /dev/null +++ b/res/makeicon.sh @@ -0,0 +1,22 @@ +#!/bin/sh +ICNS_BASE=../dist/macos/bundle/Barrier.app/Contents/Resources +if ! which magick >/dev/null 2>&1; then + echo "Need ImageMagic for this" + exit 10 +fi +cd $(dirname $0) || exit $? +if [ ! -r barrier.png ]; then + echo "Use inkscape (or another vector graphics editor) to create barrier.png from barrier.svg first" + exit 10 +fi +rm -rf work || exit $? +mkdir -p work || exit $? +for s in 16 24 32 48 64 128 256 512 1024; do + magick convert barrier.png -resize ${s}x${s} -depth 8 work/${s}.png || exit $? +done +# windows icon +magick convert work/{16,24,32,48,64,128}.png barrier.png barrier.ico || exit $? +# macos icon +png2icns $ICNS_BASE/Barrier.icns work/{16,32,256,512,1024}.png || exit $? +rm -rf work +echo Done |
