icon generation from pre-rendered boxy exports
|
After Width: | Height: | Size: 523 B |
|
After Width: | Height: | Size: 27 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 64 KiB |
|
After Width: | Height: | Size: 4.0 KiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 11 KiB |
24
build.sh
|
|
@ -26,20 +26,22 @@ fi
|
|||
|
||||
RUST_FLAGS="-import-objc-header $ROOT/core/include/swiftly.h -L $RUST_LIB -lswiftly_core"
|
||||
|
||||
# --- App icon from SVG ---
|
||||
SVG="$ROOT/static/vectors/icon.svg"
|
||||
if [ -f "$SVG" ]; then
|
||||
# --- App icon from pre-rendered PNGs ---
|
||||
ICONS="$ROOT/assets/icon_sources"
|
||||
if [ -d "$ICONS" ]; then
|
||||
echo "Generating app icon..."
|
||||
ICONSET="$BUILD/AppIcon.iconset"
|
||||
mkdir -p "$ICONSET"
|
||||
for SIZE in 16 32 64 128 256 512; do
|
||||
rsvg-convert -w $SIZE -h $SIZE "$SVG" -o "$ICONSET/icon_${SIZE}x${SIZE}.png"
|
||||
done
|
||||
for SIZE in 16 32 128 256; do
|
||||
DOUBLE=$((SIZE * 2))
|
||||
rsvg-convert -w $DOUBLE -h $DOUBLE "$SVG" -o "$ICONSET/icon_${SIZE}x${SIZE}@2x.png"
|
||||
done
|
||||
rsvg-convert -w 1024 -h 1024 "$SVG" -o "$ICONSET/icon_512x512@2x.png"
|
||||
cp "$ICONS/Swiftly_icons.png" "$ICONSET/icon_16x16.png"
|
||||
cp "$ICONS/Swiftly_icons@2x.png" "$ICONSET/icon_16x16@2x.png"
|
||||
cp "$ICONS/Swiftly_icons@2x.png" "$ICONSET/icon_32x32.png"
|
||||
cp "$ICONS/Swiftly_icons@4x.png" "$ICONSET/icon_32x32@2x.png"
|
||||
cp "$ICONS/Swiftly_icons@8x.png" "$ICONSET/icon_128x128.png"
|
||||
cp "$ICONS/Swiftly_icons@16x.png" "$ICONSET/icon_128x128@2x.png"
|
||||
cp "$ICONS/Swiftly_icons@16x.png" "$ICONSET/icon_256x256.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"
|
||||
rm -rf "$ICONSET"
|
||||
fi
|
||||
|
|
|
|||