chore(scripts): add WearOS build and launcher icon scripts

This commit is contained in:
2026-08-08 12:52:21 +02:00
parent 065a564e1c
commit de90d9b937
2 changed files with 70 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/bash
set -e
SOURCE="${1:?Usage: ./scripts/generate-wearos-icon.sh <source-image>}"
RES_DIR="targets/wearos/app/src/main/res"
if [ ! -f "$SOURCE" ]; then
echo "Error: Source image not found: $SOURCE"
exit 1
fi
SIZES=("48:mdpi" "72:hdpi" "96:xhdpi" "144:xxhdpi" "192:xxxhdpi")
for entry in "${SIZES[@]}"; do
SIZE="${entry%%:*}"
DENSITY="${entry##*:}"
DIR="$RES_DIR/mipmap-$DENSITY"
mkdir -p "$DIR"
sips -z "$SIZE" "$SIZE" --out "$DIR/ic_launcher.png" "$SOURCE" > /dev/null
echo "Created mipmap-$DENSITY/ic_launcher.png (${SIZE}x${SIZE})"
done
echo "Done"