mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-05 08:17:19 +00:00
feat(bar): bundle a macOS app icon
Generate AppIcon.icns from the CCS mark at package time (sips + iconutil) and reference it via CFBundleIconFile so Finder, Spotlight, and the Dock show the brand icon instead of a blank bundle. Refs #1525
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 609 KiB |
@@ -20,6 +20,8 @@
|
|||||||
<string>13.0</string>
|
<string>13.0</string>
|
||||||
<key>LSUIElement</key>
|
<key>LSUIElement</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>CFBundleIconFile</key>
|
||||||
|
<string>AppIcon</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
<string>CCS Bar</string>
|
<string>CCS Bar</string>
|
||||||
</dict>
|
</dict>
|
||||||
|
|||||||
@@ -42,6 +42,29 @@ if [[ -d "$ROOT/Resources/Assets" ]]; then
|
|||||||
cp "$ROOT/Resources/Assets/"*.png "$APP/Contents/Resources/" 2>/dev/null || true
|
cp "$ROOT/Resources/Assets/"*.png "$APP/Contents/Resources/" 2>/dev/null || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Build AppIcon.icns from AppIcon-source.png (1024x1024 RGBA PNG).
|
||||||
|
ICON_SRC="$ROOT/Resources/AppIcon-source.png"
|
||||||
|
if [[ -f "$ICON_SRC" ]]; then
|
||||||
|
echo "[i] Building AppIcon.icns..."
|
||||||
|
ICONSET_DIR="$(mktemp -d)/AppIcon.iconset"
|
||||||
|
mkdir -p "$ICONSET_DIR"
|
||||||
|
sips -z 16 16 "$ICON_SRC" --out "$ICONSET_DIR/icon_16x16.png" > /dev/null
|
||||||
|
sips -z 32 32 "$ICON_SRC" --out "$ICONSET_DIR/icon_16x16@2x.png" > /dev/null
|
||||||
|
sips -z 32 32 "$ICON_SRC" --out "$ICONSET_DIR/icon_32x32.png" > /dev/null
|
||||||
|
sips -z 64 64 "$ICON_SRC" --out "$ICONSET_DIR/icon_32x32@2x.png" > /dev/null
|
||||||
|
sips -z 128 128 "$ICON_SRC" --out "$ICONSET_DIR/icon_128x128.png" > /dev/null
|
||||||
|
sips -z 256 256 "$ICON_SRC" --out "$ICONSET_DIR/icon_128x128@2x.png" > /dev/null
|
||||||
|
sips -z 256 256 "$ICON_SRC" --out "$ICONSET_DIR/icon_256x256.png" > /dev/null
|
||||||
|
sips -z 512 512 "$ICON_SRC" --out "$ICONSET_DIR/icon_256x256@2x.png" > /dev/null
|
||||||
|
sips -z 512 512 "$ICON_SRC" --out "$ICONSET_DIR/icon_512x512.png" > /dev/null
|
||||||
|
sips -z 1024 1024 "$ICON_SRC" --out "$ICONSET_DIR/icon_512x512@2x.png" > /dev/null
|
||||||
|
iconutil -c icns "$ICONSET_DIR" -o "$APP/Contents/Resources/AppIcon.icns"
|
||||||
|
rm -rf "$(dirname "$ICONSET_DIR")"
|
||||||
|
echo "[OK] AppIcon.icns built."
|
||||||
|
else
|
||||||
|
echo "[!] AppIcon-source.png not found at $ICON_SRC — skipping icon." >&2
|
||||||
|
fi
|
||||||
|
|
||||||
echo "[i] Signing ($SIGNING)..."
|
echo "[i] Signing ($SIGNING)..."
|
||||||
case "$SIGNING" in
|
case "$SIGNING" in
|
||||||
adhoc)
|
adhoc)
|
||||||
|
|||||||
Reference in New Issue
Block a user