From 61919f31b04ba1eb2c88685206f270016cb8014a Mon Sep 17 00:00:00 2001 From: jld3103 Date: Thu, 20 Apr 2023 16:51:51 +0200 Subject: [PATCH] tool: Fix generating android icons --- tool/generate-app.sh | 19 +++++++++++++++++++ tool/generate-neon.sh | 19 ------------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tool/generate-app.sh b/tool/generate-app.sh index 27f1e3ce..e835a1e8 100755 --- a/tool/generate-app.sh +++ b/tool/generate-app.sh @@ -4,6 +4,25 @@ cd "$(dirname "$0")/.." color="#f37736" +function export_mipmap_icon() { + source="$1" + name="$2" + size="$3" + dpi="$4" + inkscape "$source" -o "android/app/src/main/res/mipmap-${dpi}dpi/$name.png" -w "$size" -h "$size" +} + +function export_mipmap_icon_all() { + source="$1" + name="$2" + export_mipmap_icon "$source" "$name" 72 h & + export_mipmap_icon "$source" "$name" 48 m & + export_mipmap_icon "$source" "$name" 96 xh & + export_mipmap_icon "$source" "$name" 144 xxh & + export_mipmap_icon "$source" "$name" 192 xxxh & + wait +} + ( cd packages/app diff --git a/tool/generate-neon.sh b/tool/generate-neon.sh index dd7e56a9..b80d688d 100755 --- a/tool/generate-neon.sh +++ b/tool/generate-neon.sh @@ -4,25 +4,6 @@ cd "$(dirname "$0")/.." color="#f37736" -function export_mipmap_icon() { - source="$1" - name="$2" - size="$3" - dpi="$4" - inkscape "$source" -o "android/app/src/main/res/mipmap-${dpi}dpi/$name.png" -w "$size" -h "$size" -} - -function export_mipmap_icon_all() { - source="$1" - name="$2" - export_mipmap_icon "$source" "$name" 72 h & - export_mipmap_icon "$source" "$name" 48 m & - export_mipmap_icon "$source" "$name" 96 xh & - export_mipmap_icon "$source" "$name" 144 xxh & - export_mipmap_icon "$source" "$name" 192 xxxh & - wait -} - function copy_nextcloud_app_svg() { id="$1" path="$2"