-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a7503e2
commit 97a9ac6
Showing
2 changed files
with
8 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,21 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Temp folder | ||
mkdir icons | ||
|
||
# Generate PNG icons from SVG | ||
for size in 16 32 64 128 256 512; do | ||
rsvg-convert -w $size -h $size assets/logo.svg -o icons/logo_${size}.png | ||
done | ||
|
||
# Generate ICO for Windows | ||
magick icons/logo_*.png icons/psst.ico | ||
|
||
# Generate ICNS for macOS | ||
mkdir -p icons/psst.iconset | ||
for size in 16 32 64 128 256 512; do | ||
cp icons/logo_${size}.png icons/psst.iconset/icon_${size}x${size}.png | ||
cp icons/logo_${size}.png icons/psst.iconset/icon_$((size/2))x$((size/2))@2x.png | ||
done | ||
iconutil -c icns icons/psst.iconset -o icons/psst.icns | ||
rm -r icons/psst.iconset | ||
iconutil -c icns icons/psst.iconset -o assets/logo.icns | ||
|
||
# Cleanup | ||
rm -r icons |