#!/bin/bash # # make-icon.sh # OS Vault # # Author: Simon-Pierre Boucher # Mail: contact@spboucher.ai # # SVG → AppIcon.icns. Full-detail SVG for ≥64 px, simplified variant for 16/32 px. set -euo pipefail cd "$(dirname "$0")/../assets/icon" RSVG=rsvg-convert command -v $RSVG >/dev/null || { echo "rsvg-convert not found (brew install librsvg)"; exit 1; } ICONSET=AppIcon.iconset rm -rf "$ICONSET" && mkdir "$ICONSET" # 16/32 from the simplified variant (16@2x = 32 px also simplified) $RSVG -w 16 -h 16 os-vault-simple.svg -o "$ICONSET/icon_16x16.png" $RSVG -w 32 -h 32 os-vault-simple.svg -o "$ICONSET/icon_16x16@2x.png" $RSVG -w 32 -h 32 os-vault-simple.svg -o "$ICONSET/icon_32x32.png" # ≥64 from the full-detail icon $RSVG -w 64 -h 64 os-vault.svg -o "$ICONSET/icon_32x32@2x.png" $RSVG -w 128 -h 128 os-vault.svg -o "$ICONSET/icon_128x128.png" $RSVG -w 256 -h 256 os-vault.svg -o "$ICONSET/icon_128x128@2x.png" $RSVG -w 256 -h 256 os-vault.svg -o "$ICONSET/icon_256x256.png" $RSVG -w 512 -h 512 os-vault.svg -o "$ICONSET/icon_256x256@2x.png" $RSVG -w 512 -h 512 os-vault.svg -o "$ICONSET/icon_512x512.png" $RSVG -w 1024 -h 1024 os-vault.svg -o "$ICONSET/icon_512x512@2x.png" iconutil -c icns "$ICONSET" -o AppIcon.icns rm -rf "$ICONSET" echo "AppIcon.icns generated."