#!/usr/bin/env bash # Generate icon.png (light) and icon_dark.png (dark) from logo.svg and logo_dark.svg. # Requires: rsvg-convert (librsvg2-bin). Install: sudo apt install librsvg2-bin set -e SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" REPO_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)" if ! command -v rsvg-convert &>/dev/null; then echo "rsvg-convert not found. Install: sudo apt install librsvg2-bin" exit 1 fi # Light theme: dark strokes on transparent/white SVG_LIGHT="$REPO_ROOT/assets/icons/logo.svg" OUT_LIGHT="$REPO_ROOT/assets/icons/icon.png" if [[ -f "$SVG_LIGHT" ]]; then rsvg-convert -w 1024 -h 1024 "$SVG_LIGHT" -o "$OUT_LIGHT" echo "Generated $OUT_LIGHT" fi # Dark theme: white strokes on transparent SVG_DARK="$REPO_ROOT/assets/icons/logo_dark.svg" OUT_DARK="$REPO_ROOT/assets/icons/icon_dark.png" if [[ -f "$SVG_DARK" ]]; then rsvg-convert -w 1024 -h 1024 "$SVG_DARK" -o "$OUT_DARK" echo "Generated $OUT_DARK" fi echo "Next: dart run flutter_launcher_icons (to update iOS icons)" echo "Then: dart run flutter_native_splash:create (if you added image_dark to pubspec)"