File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree File renamed without changes.
Original file line number Diff line number Diff line change 1+ {
2+ "fill" : " automatic" ,
3+ "groups" : [
4+ {
5+ "layers" : [
6+ {
7+ "blend-mode" : " normal" ,
8+ "fill" : " none" ,
9+ "glass" : true ,
10+ "hidden" : false ,
11+ "image-name" : " dither.png" ,
12+ "name" : " dither"
13+ }
14+ ],
15+ "shadow" : {
16+ "kind" : " neutral" ,
17+ "opacity" : 0.5
18+ },
19+ "translucency" : {
20+ "enabled" : true ,
21+ "value" : 0.5
22+ }
23+ }
24+ ],
25+ "supported-platforms" : {
26+ "circles" : [
27+ " watchOS"
28+ ],
29+ "squares" : " shared"
30+ }
31+ }
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -euo pipefail
4+
5+ if [[ $# -ne 1 ]]; then
6+ echo " usage: $0 <output-icns-path>" >&2
7+ exit 1
8+ fi
9+
10+ ROOT_DIR=" $( cd " $( dirname " $0 " ) /.." && pwd) "
11+ SOURCE_IMAGE=" ${ROOT_DIR} /packaging/Openbird.icon/Assets/dither.png"
12+ OUTPUT_PATH=" $1 "
13+ TMP_DIR=" $( mktemp -d) "
14+ ICONSET_DIR=" ${TMP_DIR} /Openbird.iconset"
15+
16+ trap ' rm -rf "${TMP_DIR}"' EXIT
17+
18+ mkdir -p " ${ICONSET_DIR} " " $( dirname " ${OUTPUT_PATH} " ) "
19+
20+ for size in 16 32 128 256 512; do
21+ sips -z " ${size} " " ${size} " " ${SOURCE_IMAGE} " --out " ${ICONSET_DIR} /icon_${size} x${size} .png" > /dev/null
22+ scale2=$(( size * 2 ))
23+ sips -z " ${scale2} " " ${scale2} " " ${SOURCE_IMAGE} " --out " ${ICONSET_DIR} /icon_${size} x${size} @2x.png" > /dev/null
24+ done
25+
26+ iconutil -c icns " ${ICONSET_DIR} " -o " ${OUTPUT_PATH} "
Original file line number Diff line number Diff line change @@ -17,15 +17,14 @@ CONTENTS_DIR="${APP_DIR}/Contents"
1717MACOS_DIR=" ${CONTENTS_DIR} /MacOS"
1818RESOURCES_DIR=" ${CONTENTS_DIR} /Resources"
1919PLIST_TEMPLATE=" packaging/Openbird-Info.plist.template"
20- ICON_PATH=" packaging/Openbird.icns"
2120
2221mkdir -p " $OUTPUT_DIR "
2322rm -rf " $APP_DIR "
2423mkdir -p " $MACOS_DIR " " $RESOURCES_DIR "
2524
2625cp " $BUILD_DIR /OpenbirdApp" " ${MACOS_DIR} /OpenbirdApp"
2726chmod +x " ${MACOS_DIR} /OpenbirdApp"
28- install -m 644 " $ICON_PATH " " ${RESOURCES_DIR} /Openbird.icns"
27+ " $( dirname " $0 " ) /build-app-icon.sh " " ${RESOURCES_DIR} /Openbird.icns"
2928
3029sed \
3130 -e " s/__BUNDLE_IDENTIFIER__/${BUNDLE_ID} /g" \
Original file line number Diff line number Diff line change @@ -19,7 +19,6 @@ RESOURCES_DIR="${CONTENTS_DIR}/Resources"
1919)
2020BUILD_DIR=" $( cd " ${ROOT_DIR} " && swift build --show-bin-path) "
2121PLIST_TEMPLATE=" ${ROOT_DIR} /packaging/Openbird-Info.plist.template"
22- ICON_PATH=" ${ROOT_DIR} /packaging/Openbird.icns"
2322ENTITLEMENTS=" ${ROOT_DIR} /packaging/Openbird.entitlements"
2423SIGNING_IDENTITY=" ${OPENBIRD_SIGNING_IDENTITY:- -} "
2524PLIST_PATH=" ${CONTENTS_DIR} /Info.plist"
@@ -30,7 +29,7 @@ trap 'rm -f "${TMP_PLIST}"' EXIT
3029mkdir -p " ${MACOS_DIR} " " ${RESOURCES_DIR} "
3130
3231install -m 755 " ${BUILD_DIR} /OpenbirdApp" " ${MACOS_DIR} /OpenbirdApp"
33- install -m 644 " ${ICON_PATH} " " ${RESOURCES_DIR} /Openbird.icns"
32+ " ${ROOT_DIR} /scripts/build-app-icon.sh " " ${RESOURCES_DIR} /Openbird.icns"
3433
3534sed \
3635 -e " s/__BUNDLE_IDENTIFIER__/com.computelesscomputer.openbird.dev/g" \
You can’t perform that action at this time.
0 commit comments