forked from TASEmulators/fceux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Successful addition of fceux icon to mac osx dmg package.
- Loading branch information
Showing
3 changed files
with
36 additions
and
2 deletions.
There are no files selected for viewing
Binary file not shown.
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
SRC_PNG=../fceux1.png | ||
OUTDIR=/tmp/fceux.iconset; | ||
mkdir -p $OUTDIR; | ||
|
||
function convert() { | ||
#echo "Convert $1 $2" | ||
WIDTH=$1; | ||
SCALE=$2; | ||
WIDTH2=`expr $WIDTH / 2`; | ||
|
||
if [ $SCALE == "2" ]; then | ||
OUT=icon_$WIDTH\x$WIDTH.png | ||
else | ||
OUT=icon_$WIDTH2\x$WIDTH2\@2x.png | ||
fi | ||
CMD="sips -z $WIDTH $WIDTH $SRC_PNG --out $OUTDIR/$OUT"; | ||
echo $CMD; | ||
$CMD; | ||
} | ||
|
||
convert 32 1 ; | ||
convert 32 2 ; | ||
convert 64 1 ; | ||
convert 64 2 ; | ||
convert 256 1 ; | ||
convert 256 2 ; | ||
convert 512 1 ; | ||
convert 512 2 ; | ||
convert 1024 1 ; | ||
convert 1024 2 ; | ||
|
||
iconutil -c icns $OUTDIR/ |
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