3 # given a list of differently sized png files with the size in the filename like this:
4 # myiconfile-16.png myiconfile-32.png myiconfile-48.png myiconfile-64.png myiconfile-128.png myiconfile-256.png myiconfile-512.png
6 # create_iconfiles.sh myiconfile-*.png
7 # to create an ICO file (for Windows) myiconfile.ico and an ICNS file (for macOS) myiconfile.icns
10 if [ x$BASENAME = x ]; then
11 echo "Could not calculate basename from '${1}'"
15 ICOFILE=${BASENAME}.ico
16 echo "Creating ${ICOFILE}"
19 ICNSFILE=${BASENAME}.icns
20 echo "Creating ${ICNSFILE}"
21 # dont' include 64x64 icon (for some reason they're not allowed in icns file)
28 if [ x$NUM != x64 -a x$NUM != x38 ]; then
29 ICNSARGS="${ICNSARGS} $ARG"
32 png2icns ${ICNSFILE} ${ICNSARGS}