mirror of
https://github.com/AgentSeal/codeburn.git
synced 2026-07-10 01:29:41 +00:00
feat(menubar): add macOS app icon (#455)
Adds assets/menubar-logo.png and generates AppIcon.icns (all standard sizes via sips + iconutil) in package-app.sh, so the menubar app ships with a real icon instead of the generic one. Info.plist already referenced AppIcon. Icon and bundler change from @tvcsantos's #439; the unrelated tsconfig.json change in that PR was left out.
This commit is contained in:
parent
fda117face
commit
4a384cd31d
2 changed files with 18 additions and 0 deletions
BIN
assets/menubar-logo.png
Normal file
BIN
assets/menubar-logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 KiB |
|
|
@ -23,6 +23,7 @@ repo_root() {
|
|||
ROOT=$(repo_root)
|
||||
MAC_DIR="${ROOT}/mac"
|
||||
DIST_DIR="${MAC_DIR}/.build/dist"
|
||||
ICON_SOURCE="${ROOT}/assets/menubar-logo.png"
|
||||
|
||||
cd "${MAC_DIR}"
|
||||
|
||||
|
|
@ -45,6 +46,23 @@ BUNDLE="${DIST_DIR}/${BUNDLE_NAME}"
|
|||
mkdir -p "${BUNDLE}/Contents/MacOS"
|
||||
mkdir -p "${BUNDLE}/Contents/Resources"
|
||||
cp "${BUILT_BINARY}" "${BUNDLE}/Contents/MacOS/${EXECUTABLE_NAME}"
|
||||
cp "${ICON_SOURCE}" "${BUNDLE}/Contents/Resources/menubar-logo.png"
|
||||
|
||||
ICONSET="${DIST_DIR}/AppIcon.iconset"
|
||||
rm -rf "${ICONSET}"
|
||||
mkdir -p "${ICONSET}"
|
||||
sips -z 16 16 "${ICON_SOURCE}" --out "${ICONSET}/icon_16x16.png" >/dev/null
|
||||
sips -z 32 32 "${ICON_SOURCE}" --out "${ICONSET}/icon_16x16@2x.png" >/dev/null
|
||||
sips -z 32 32 "${ICON_SOURCE}" --out "${ICONSET}/icon_32x32.png" >/dev/null
|
||||
sips -z 64 64 "${ICON_SOURCE}" --out "${ICONSET}/icon_32x32@2x.png" >/dev/null
|
||||
sips -z 128 128 "${ICON_SOURCE}" --out "${ICONSET}/icon_128x128.png" >/dev/null
|
||||
sips -z 256 256 "${ICON_SOURCE}" --out "${ICONSET}/icon_128x128@2x.png" >/dev/null
|
||||
sips -z 256 256 "${ICON_SOURCE}" --out "${ICONSET}/icon_256x256.png" >/dev/null
|
||||
sips -z 512 512 "${ICON_SOURCE}" --out "${ICONSET}/icon_256x256@2x.png" >/dev/null
|
||||
sips -z 512 512 "${ICON_SOURCE}" --out "${ICONSET}/icon_512x512.png" >/dev/null
|
||||
cp "${ICON_SOURCE}" "${ICONSET}/icon_512x512@2x.png"
|
||||
iconutil -c icns "${ICONSET}" -o "${BUNDLE}/Contents/Resources/AppIcon.icns"
|
||||
rm -rf "${ICONSET}"
|
||||
|
||||
cat > "${BUNDLE}/Contents/Info.plist" <<PLIST
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue