Skip to content

Commit 0e6b267

Browse files
committed
feat: add missing mac app icon
1 parent e8009c4 commit 0e6b267

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

assets/menubar-logo.png

231 KB
Loading

mac/Scripts/package-app.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ repo_root() {
2323
ROOT=$(repo_root)
2424
MAC_DIR="${ROOT}/mac"
2525
DIST_DIR="${MAC_DIR}/.build/dist"
26+
ICON_SOURCE="${ROOT}/assets/menubar-logo.png"
2627

2728
cd "${MAC_DIR}"
2829

@@ -45,6 +46,23 @@ BUNDLE="${DIST_DIR}/${BUNDLE_NAME}"
4546
mkdir -p "${BUNDLE}/Contents/MacOS"
4647
mkdir -p "${BUNDLE}/Contents/Resources"
4748
cp "${BUILT_BINARY}" "${BUNDLE}/Contents/MacOS/${EXECUTABLE_NAME}"
49+
cp "${ICON_SOURCE}" "${BUNDLE}/Contents/Resources/menubar-logo.png"
50+
51+
ICONSET="${DIST_DIR}/AppIcon.iconset"
52+
rm -rf "${ICONSET}"
53+
mkdir -p "${ICONSET}"
54+
sips -z 16 16 "${ICON_SOURCE}" --out "${ICONSET}/icon_16x16.png" >/dev/null
55+
sips -z 32 32 "${ICON_SOURCE}" --out "${ICONSET}/icon_16x16@2x.png" >/dev/null
56+
sips -z 32 32 "${ICON_SOURCE}" --out "${ICONSET}/icon_32x32.png" >/dev/null
57+
sips -z 64 64 "${ICON_SOURCE}" --out "${ICONSET}/icon_32x32@2x.png" >/dev/null
58+
sips -z 128 128 "${ICON_SOURCE}" --out "${ICONSET}/icon_128x128.png" >/dev/null
59+
sips -z 256 256 "${ICON_SOURCE}" --out "${ICONSET}/icon_128x128@2x.png" >/dev/null
60+
sips -z 256 256 "${ICON_SOURCE}" --out "${ICONSET}/icon_256x256.png" >/dev/null
61+
sips -z 512 512 "${ICON_SOURCE}" --out "${ICONSET}/icon_256x256@2x.png" >/dev/null
62+
sips -z 512 512 "${ICON_SOURCE}" --out "${ICONSET}/icon_512x512.png" >/dev/null
63+
cp "${ICON_SOURCE}" "${ICONSET}/icon_512x512@2x.png"
64+
iconutil -c icns "${ICONSET}" -o "${BUNDLE}/Contents/Resources/AppIcon.icns"
65+
rm -rf "${ICONSET}"
4866

4967
cat > "${BUNDLE}/Contents/Info.plist" <<PLIST
5068
<?xml version="1.0" encoding="UTF-8"?>

tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"rootDir": "src",
1212
"declaration": true,
1313
"sourceMap": true,
14-
"resolveJsonModule": true
14+
"resolveJsonModule": true,
15+
"types": ["node"]
1516
},
1617
"include": ["src/**/*"],
1718
"exclude": ["node_modules", "dist", "tests"]

0 commit comments

Comments
 (0)