-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds proper MacOS bundle and icons for Windows builds (#381)
* macos bundle * windows icons * MacOS bundle works when placed inside a carmageddon directory
- Loading branch information
1 parent
fdc37ef
commit 6836035
Showing
13 changed files
with
122 additions
and
11 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,40 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
SOURCE_IMAGE=$1 | ||
TEMP_ICON_IMAGE=icon.png | ||
|
||
# resize to 412x with black canvas | ||
convert ${SOURCE_IMAGE} -resize 412x412 -background Black -gravity center -extent 412x412 ${TEMP_ICON_IMAGE} | ||
|
||
# add rounded corners | ||
convert ${TEMP_ICON_IMAGE} \ | ||
\( +clone -alpha extract \ | ||
-draw 'fill black polygon 0,0 0,50 50,0 fill white circle 50,50 50,0' \ | ||
\( +clone -flip \) -compose Multiply -composite \ | ||
\( +clone -flop \) -compose Multiply -composite \ | ||
\) -alpha off -compose CopyOpacity -composite ${TEMP_ICON_IMAGE} | ||
|
||
# add margin | ||
convert ${TEMP_ICON_IMAGE} -bordercolor transparent -border 40x40 ${TEMP_ICON_IMAGE} | ||
|
||
# add drop shadow | ||
convert ${TEMP_ICON_IMAGE} \ | ||
\( +clone -background black -shadow 100x5+0+0 \) +swap \ | ||
-background none -layers merge +repage ${TEMP_ICON_IMAGE} | ||
|
||
|
||
rm -r dethrace.iconset || true | ||
mkdir -p dethrace.iconset | ||
sips -z 16 16 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_16x16.png | ||
sips -z 32 32 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_16x16@2x.png | ||
sips -z 32 32 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_32x32.png | ||
sips -z 64 64 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_32x32@2x.png | ||
sips -z 128 128 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_128x128.png | ||
sips -z 256 256 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_128x128@2x.png | ||
sips -z 256 256 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_256x256.png | ||
sips -z 512 512 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_256x256@2x.png | ||
sips -z 512 512 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_512x512.png | ||
sips -z 1024 1024 ${TEMP_ICON_IMAGE} --out dethrace.iconset/icon_512x512@2x.png | ||
iconutil -c icns dethrace.iconset | ||
rm -r dethrace.iconset ${TEMP_ICON_IMAGE} |
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 @@ | ||
IDI_ICON1 ICON DISCARDABLE "dethrace.ico" |
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,12 @@ | ||
#!/bin/sh | ||
set -e | ||
|
||
SOURCE_IMAGE=$1 | ||
TEMP_ICON_IMAGE=icon.png | ||
|
||
# resize to 412x with black canvas | ||
convert ${SOURCE_IMAGE} -resize 412x412 -background Black -gravity center -extent 412x412 ${TEMP_ICON_IMAGE} | ||
# convert to ico format | ||
convert -background transparent ${TEMP_ICON_IMAGE} -define icon:auto-resize=16,24,32,48,64,72,96,128,256 "dethrace.ico" | ||
|
||
rm ${TEMP_ICON_IMAGE} |
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
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
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