#!/bin/bash # # make-icon.sh # Zyquo MLX # # Author: Simon-Pierre Boucher # Mail: contact@spboucher.ai # # Icon pipeline (charter Phase 5): SVG → PNGs → AppIcon.iconset → # AppIcon.icns. The SVG is the source of truth; 16/32 px sizes use the # simplified variant (Z only) for sharpness. # set -euo pipefail cd "$(dirname "$0")/.." SRC=assets/icon/zyquo-mlx.svg SRC_SMALL=assets/icon/zyquo-mlx-small.svg ICONSET=assets/icon/AppIcon.iconset OUT=assets/icon/AppIcon.icns command -v rsvg-convert >/dev/null || { echo "error: rsvg-convert missing (brew install librsvg)"; exit 1; } rm -rf "$ICONSET" mkdir -p "$ICONSET" render() { # $1 svg, $2 px, $3 name rsvg-convert -w "$2" -h "$2" "$1" -o "$ICONSET/$3" } # Small sizes: simplified variant render "$SRC_SMALL" 16 icon_16x16.png render "$SRC_SMALL" 32 icon_16x16@2x.png render "$SRC_SMALL" 32 icon_32x32.png # 64 px and up: full anvil artwork render "$SRC" 64 icon_32x32@2x.png render "$SRC" 128 icon_128x128.png render "$SRC" 256 icon_128x128@2x.png render "$SRC" 256 icon_256x256.png render "$SRC" 512 icon_256x256@2x.png render "$SRC" 512 icon_512x512.png render "$SRC" 1024 icon_512x512@2x.png iconutil -c icns "$ICONSET" -o "$OUT" echo "→ $OUT"