-
Notifications
You must be signed in to change notification settings - Fork 3
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
Showing
4 changed files
with
71 additions
and
2 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleGetInfoString</key> | ||
<string>Farbart</string> | ||
<key>CFBundleExecutable</key> | ||
<string>Farbart</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>www.symmetri.net</string> | ||
<key>CFBundleName</key> | ||
<string>Farbart</string> | ||
<key>CFBundleIconFile</key> | ||
<string>farbart.icns</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>0.01</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>APPL</string> | ||
<key>IFMajorVersion</key> | ||
<integer>0</integer> | ||
<key>IFMinorVersion</key> | ||
<integer>1</integer> | ||
</dict> | ||
</plist> |
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,11 @@ | ||
#/bin/bash | ||
|
||
./symmetri/gui/generate_icon $(echo $((1 + $RANDOM % 9))) icon.svg | ||
source ../.github/workflows/macos/create_icons.sh | ||
svg_to_icns icon.svg | ||
rm -r Farbart.app | ||
mkdir -p Farbart.app/Contents Farbart.app/Contents/MacOS Farbart.app/Contents/Resources | ||
cp icons/icon.icns Farbart.app/Contents/Resources/farbart.icns | ||
cp ../.github/workflows/macos/Info.plist Farbart.app/Contents/Info.plist | ||
cp symmetri/gui/Farbart Farbart.app/Contents/MacOS | ||
tar -czf Farbart.tar.gz Farbart.app |
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,31 @@ | ||
# taken from | ||
# https://gist.github.com/adriansr/1da9b18a8076b0f8a977a5eea0ae41ef | ||
|
||
function svg_to_icns(){ | ||
local RESOLUTIONS=( | ||
16,16x16 | ||
32,16x16@2x | ||
32,32x32 | ||
64,32x32@2x | ||
128,128x128 | ||
256,128x128@2x | ||
256,256x256 | ||
512,256x256@2x | ||
512,512x512 | ||
1024,512x512@2x | ||
) | ||
|
||
for SVG in $@; do | ||
BASE=$(basename "$SVG" | sed 's/\.[^\.]*$//') | ||
ICONSET="$BASE.iconset" | ||
ICONSET_DIR="./icons/$ICONSET" | ||
mkdir -p "$ICONSET_DIR" | ||
for RES in ${RESOLUTIONS[@]}; do | ||
SIZE=$(echo $RES | cut -d, -f1) | ||
LABEL=$(echo $RES | cut -d, -f2) | ||
svg2png -w $SIZE -h $SIZE "$SVG" "$ICONSET_DIR"/icon_$LABEL.png | ||
done | ||
|
||
iconutil -c icns "$ICONSET_DIR" | ||
done | ||
} |