script to make <26 sdk icon
All checks were successful
eden-license / license-header (pull_request) Successful in 22s

Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
crueter 2025-10-03 00:19:05 -04:00 committed by lizzie
parent 1cdafdd7a8
commit 61d1614abd
Signed by: Lizzie
GPG key ID: 00287378CADCAB13
3 changed files with 112 additions and 0 deletions

26
tools/generate-legacy-icons.sh Executable file
View file

@ -0,0 +1,26 @@
#!/bin/sh -e
# Generate SDK <26 icons for android
# requires imagemagick, inkscape
ROOTDIR=$PWD
cd src/android/app/src/main
pushd res/drawable
# convert vector to svg--needed to generate launcher png
cp ic_yuzu_icon.xml tmp
python3 $ROOTDIR/tools/VectorDrawable2Svg.py tmp
inkscape -w 768 -h 768 tmp.svg -o ic_tmp.png
magick ic_icon_bg_orig.png -resize 512x512 bg_tmp.png
magick bg_tmp.png -strip -type TrueColor -depth 8 -colorspace sRGB -color-matrix "1 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0" bg_tmp_rgb.png
magick -verbose bg_tmp_rgb.png ic_tmp.png -gravity center -composite -colorspace sRGB ic_launcher.png
echo
rm *tmp*
popd
# Add legacy here when legacy gets merged