-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add an OSX build script for creating an
.app
bundle
- Loading branch information
Showing
6 changed files
with
55 additions
and
87 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,3 +7,4 @@ dist/* | |
build/* | ||
**/.DS_Store | ||
app.spec | ||
tank4eta.spec |
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,6 @@ | ||
#!/usr/bin/env bash | ||
|
||
pyinstaller --add-data data:data -n tank4eta --noconsole --osx-bundle-identifier com.doycho.tank4eta -i etc/icon.icns app.py | ||
cp etc/osx-builder/launcher dist/tank4eta.app/Contents/MacOS/ | ||
sed -i 's/MacOS\/tank4eta/MacOS\/launcher/' dist/tank4eta.app/Contents/Info.plist | ||
|
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,47 @@ | ||
#!/usr/bin/env bash | ||
|
||
function die { | ||
echo "ERROR: $1" > /dev/null 1>&2 | ||
exit 1 | ||
} | ||
|
||
if [ "$#" -ne 1 ]; then | ||
die "Usage: `basename $0` icon-file.svg" | ||
fi | ||
|
||
ICONNAME=$1 | ||
|
||
if [ ! -f $ICONNAME ]; then | ||
die "Image file for icon not found" | ||
fi | ||
|
||
fileName=$ICONNAME | ||
postfix=${fileName##*.} | ||
|
||
if [[ $postfix == 'svg' ]]; then | ||
qlmanage -z -t -s 1024 -o ./ "$fileName" | ||
fileName=${fileName}.png | ||
fi | ||
|
||
echo $fileName | ||
|
||
mkdir icon.iconset | ||
|
||
sips -z 16 16 "$fileName" --out icon.iconset/icon_16x16.png | ||
sips -z 32 32 "$fileName" --out icon.iconset/[email protected] | ||
cp icon.iconset/[email protected] icon.iconset/icon_32x32.png | ||
sips -z 64 64 "$fileName" --out icon.iconset/[email protected] | ||
sips -z 128 128 "$fileName" --out icon.iconset/icon_128x128.png | ||
sips -z 256 256 "$fileName" --out icon.iconset/[email protected] | ||
cp icon.iconset/[email protected] icon.iconset/icon_256x256.png | ||
sips -z 512 512 "$fileName" --out icon.iconset/[email protected] | ||
cp icon.iconset/[email protected] icon.iconset/icon_512x512.png | ||
sips -z 1024 1024 "$fileName" --out icon.iconset/[email protected] | ||
|
||
# Create .icns file | ||
iconutil -c icns icon.iconset | ||
|
||
# Cleanup | ||
rm -R icon.iconset | ||
rm $fileName | ||
|
This file was deleted.
Oops, something went wrong.
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,4 +1,4 @@ | ||
#!/usr/bin/env bash | ||
cd "${0%/*}" | ||
./app | ||
./tank4eta | ||
|