This repository has been archived on 2026-05-31. You can view files and clone it, but cannot push or open issues or pull requests.
powersync-app/packaging/osx/exportappicons.sh
Michael Zanetti b76a5f24d8 fix iconset
2020-01-17 00:39:32 +01:00

40 lines
754 B
Bash
Executable File

#!/bin/bash
function exportImage() {
mkdir AppIcon.iconset
size=$1
scaleFactor=$2
echo Exporting AppIcon with size $size and scale factor $scaleFactor
if [ ${scaleFactor} -ne 1 ]; then
finalSize=$((size * scaleFactor))
echo final size is ${finalSize}
inkscape AppIcon.svg -e AppIcon.iconset/icon_${size}x${size}@${scaleFactor}x.png -C -w $finalSize -h $finalSize
else
inkscape AppIcon.svg -e AppIcon.iconset/icon_${size}x${size}.png -C -w ${size} -h ${size}
fi
}
SIZES=(
"20:1"
"20:2"
"20:3"
"29:1"
"29:2"
"29:3"
"40:1"
"40:2"
"40:3"
"60:2"
"60:3"
"76:1"
"76:2"
"167:1"
"1024:1"
)
for size in "${SIZES[@]}" ; do
pixels="${size%%:*}"
scale="${size##*:}"
exportImage $pixels $scale
done