From afd8e525f9a68a58e20e1ec72df40d6c17427266 Mon Sep 17 00:00:00 2001 From: Edison Jwa Date: Mon, 25 May 2026 16:04:37 +0900 Subject: [PATCH] fix: use matching flutter linux bundle arch --- tools/build-linux-deb.sh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/tools/build-linux-deb.sh b/tools/build-linux-deb.sh index 754cd95..3418991 100755 --- a/tools/build-linux-deb.sh +++ b/tools/build-linux-deb.sh @@ -51,6 +51,17 @@ resolve_arch() { esac } +flutter_linux_arch() { + case "$1" in + amd64) echo "x64" ;; + arm64) echo "arm64" ;; + *) + echo "ERROR: unsupported Flutter Linux architecture '$1'" >&2 + exit 1 + ;; + esac +} + main() { require_cmd flutter require_cmd dpkg-deb @@ -83,6 +94,8 @@ EOF local arch arch="$(resolve_arch)" + local flutter_arch + flutter_arch="$(flutter_linux_arch "$arch")" ( cd "$APP_DIR" @@ -90,7 +103,7 @@ EOF flutter build linux --release ) - local bundle_dir="$APP_DIR/build/linux/x64/release/bundle" + local bundle_dir="$APP_DIR/build/linux/$flutter_arch/release/bundle" local app_binary="$bundle_dir/chanora_flutter" require_file "$app_binary" "Linux release bundle binary"