mirror of
https://gitea.nishi.boats/pyrite-dev/milsko
synced 2025-12-30 22:20:50 +00:00
oops
This commit is contained in:
@@ -14,16 +14,13 @@ echo '#endif' >> include/Mw/Resource/Icon.h
|
||||
echo '' >> include/Mw/Resource/Icon.h
|
||||
for i in resource/icon/*.png; do
|
||||
LOWER=`echo $i | rev | cut -d"/" -f1 | rev | cut -d"." -f1`
|
||||
if [ "$LOWER" = "unsure" ]; then
|
||||
LOWER=question
|
||||
fi
|
||||
OUT=src/icon/$LOWER.c
|
||||
NAME=`echo -n $LOWER | perl -e 'my $l = <>;$l =~ s/^(.)/uc($1)/e;print($l);'`
|
||||
NAME=MwIcon$NAME
|
||||
GEO=`convert $i json:- 2>/dev/null | jq -r '(.[0].image.geometry.width | tostring) + "x" + (.[0].image.geometry.height | tostring)'`
|
||||
WIDTH=`echo $GEO | cut -dx -f1`
|
||||
HEIGHT=`echo $GEO | cut -dx -f2`
|
||||
echo '#include <Mw/Milsko.h>' >> $OUT
|
||||
echo '#include <Mw/Milsko.h>' > $OUT
|
||||
echo >> $OUT
|
||||
echo "MwU32 $NAME[] = {" >> $OUT
|
||||
echo " ($WIDTH << 16) | $HEIGHT," >> $OUT
|
||||
|
||||
Reference in New Issue
Block a user