aboutsummaryrefslogtreecommitdiff
path: root/games/ufoai/mkicons.sh
blob: a0c886f91a643f7d333dbf8b3a8267a41e256c4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/sh

# create PNG icons for ufoai.
# requires icoutils and perl-rename from SBo.
# this is a support script, not to be run from within the SlackBuild.
# please do not remove this from git!

SRC=${TMP:-/tmp}/SBo/ufoai-${VERSION:-2.5}

mkdir -p icons
cd icons
for i in $SRC/build/projects/*.ico; do
  name="$( basename $i .ico )"
  mkdir -p $name
  ( cd $name
    icotool -x $i
    rename.pl 's,.*_(\d+)x.*,$1.png,' *
  )
done

# upstream doesn't ship 64x64 icons, let's make them.
convert -resize 64x64 ufo/256.png ufo/64.png
convert -resize 64x64 ufoded/256.png ufoded/64.png

# the radiant icon is tiny, make a better one.
mkdir -p uforadiant
composite radiant/32.png ufo/64.png -geometry +16+28 uforadiant/64.png
convert -resize 48x48 uforadiant/64.png uforadiant/48.png
convert -resize 32x32 uforadiant/64.png uforadiant/32.png
convert -resize 16x16 uforadiant/64.png uforadiant/16.png
rm -rf radiant