forked from xiandanin/magnetW
-
Notifications
You must be signed in to change notification settings - Fork 0
/
icns.sh
executable file
·23 lines (20 loc) · 822 Bytes
/
icns.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/env bash
# brew install icoutils
filepath=256x256.png
iconset=.icns.iconset
cd build/icons
if [ ! -d $iconset ];then
mkdir $iconset
fi
sips -z 16 16 $filepath --out $iconset/icon_16x16.png
sips -z 32 32 $filepath --out $iconset/[email protected]
sips -z 32 32 $filepath --out $iconset/icon_32x32.png
sips -z 64 64 $filepath --out $iconset/[email protected]
sips -z 128 128 $filepath --out $iconset/icon_128x128.png
sips -z 256 256 $filepath --out $iconset/[email protected]
sips -z 256 256 $filepath --out $iconset/icon_256x256.png
sips -z 512 512 $filepath --out $iconset/[email protected]
sips -z 512 512 $filepath --out $iconset/icon_512x512.png
sips -z 1024 1024 $filepath --out $iconset/[email protected]
iconutil -c icns $iconset -o icon.icns
icotool -c $iconset/icon_256x256.png -o icon.ico