Skip to content

Commit

Permalink
fix(tool): Run inkscape sequentially to prevent segfaults
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Sep 2, 2024
1 parent 196502d commit f8fc86a
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions tool/generate-assets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@ function export_icon() {
size="$2"
name="$3"
dpi="$4"
inkscape "$source" -o "android/app/src/main/res/mipmap-${dpi}dpi/$name.png" -w "$size" -h "$size" --actions="export-background:$color" &
inkscape "$source" -o "android/app/src/main/res/drawable-${dpi}dpi/${name}.png" -w "$size" -h "$size" &
wait
inkscape "$source" -o "android/app/src/main/res/mipmap-${dpi}dpi/$name.png" -w "$size" -h "$size" --actions="export-background:$color"
inkscape "$source" -o "android/app/src/main/res/drawable-${dpi}dpi/${name}.png" -w "$size" -h "$size"
}

function generate_adaptive_icon() {
Expand All @@ -50,13 +49,12 @@ function generate_adaptive_icon() {
function export_icon_all() {
source="$1"
name="$2"
export_icon "$source" 72 "$name" h &
export_icon "$source" 48 "$name" m &
export_icon "$source" 96 "$name" xh &
export_icon "$source" 144 "$name" xxh &
export_icon "$source" 192 "$name" xxxh &
generate_adaptive_icon "$name" &
wait
export_icon "$source" 72 "$name" h
export_icon "$source" 48 "$name" m
export_icon "$source" 96 "$name" xh
export_icon "$source" 144 "$name" xxh
export_icon "$source" 192 "$name" xxxh
generate_adaptive_icon "$name"
}

function precompile_assets() {
Expand Down Expand Up @@ -112,9 +110,8 @@ copy_app_svg talk external/nextcloud-spreed

for path in ../packages/*_app; do
icon="$(basename "$path")"
export_icon_all "$path/assets/app.svg" "$icon" &
export_icon_all "$path/assets/app.svg" "$icon"
done
wait

fvm dart run flutter_native_splash:create
fvm dart run sqflite_common_ffi_web:setup --force
Expand Down

0 comments on commit f8fc86a

Please sign in to comment.