icon generation from pre-rendered boxy exports

This commit is contained in:
jess 2026-04-05 01:36:10 -07:00
parent d31af7f816
commit 5a715fa480
9 changed files with 13 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 150 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

View File

@ -26,20 +26,22 @@ fi
RUST_FLAGS="-import-objc-header $ROOT/core/include/swiftly.h -L $RUST_LIB -lswiftly_core" RUST_FLAGS="-import-objc-header $ROOT/core/include/swiftly.h -L $RUST_LIB -lswiftly_core"
# --- App icon from SVG --- # --- App icon from pre-rendered PNGs ---
SVG="$ROOT/static/vectors/icon.svg" ICONS="$ROOT/assets/icon_sources"
if [ -f "$SVG" ]; then if [ -d "$ICONS" ]; then
echo "Generating app icon..." echo "Generating app icon..."
ICONSET="$BUILD/AppIcon.iconset" ICONSET="$BUILD/AppIcon.iconset"
mkdir -p "$ICONSET" mkdir -p "$ICONSET"
for SIZE in 16 32 64 128 256 512; do cp "$ICONS/Swiftly_icons.png" "$ICONSET/icon_16x16.png"
rsvg-convert -w $SIZE -h $SIZE "$SVG" -o "$ICONSET/icon_${SIZE}x${SIZE}.png" cp "$ICONS/Swiftly_icons@2x.png" "$ICONSET/icon_16x16@2x.png"
done cp "$ICONS/Swiftly_icons@2x.png" "$ICONSET/icon_32x32.png"
for SIZE in 16 32 128 256; do cp "$ICONS/Swiftly_icons@4x.png" "$ICONSET/icon_32x32@2x.png"
DOUBLE=$((SIZE * 2)) cp "$ICONS/Swiftly_icons@8x.png" "$ICONSET/icon_128x128.png"
rsvg-convert -w $DOUBLE -h $DOUBLE "$SVG" -o "$ICONSET/icon_${SIZE}x${SIZE}@2x.png" cp "$ICONS/Swiftly_icons@16x.png" "$ICONSET/icon_128x128@2x.png"
done cp "$ICONS/Swiftly_icons@16x.png" "$ICONSET/icon_256x256.png"
rsvg-convert -w 1024 -h 1024 "$SVG" -o "$ICONSET/icon_512x512@2x.png" cp "$ICONS/Swiftly_icons@32.png" "$ICONSET/icon_256x256@2x.png"
cp "$ICONS/Swiftly_icons@32.png" "$ICONSET/icon_512x512.png"
cp "$ICONS/Swiftly_icons@64.png" "$ICONSET/icon_512x512@2x.png"
iconutil -c icns "$ICONSET" -o "$BUILD/AppIcon.icns" iconutil -c icns "$ICONSET" -o "$BUILD/AppIcon.icns"
rm -rf "$ICONSET" rm -rf "$ICONSET"
fi fi