add arm64 appimage
This commit is contained in:
1 parent
c19cd28de8
commit
c7847f0d9e
9 files changed
+248
-40
No files matched your search
@@ -22,6 +22,6 @@ ENV PATH="/opt/flutter/bin:${PATH}"
|
||||
FROM ${BASE_IMAGE} AS runtime-test
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
xvfb xauth x11-utils x11-apps xdotool imagemagick dbus-x11 libgl1 libegl1 libgles2 \
|
||||
libgl1-mesa-dri fonts-dejavu-core \
|
||||
xvfb xauth x11-utils x11-apps xdotool imagemagick dbus-x11 binutils libgl1 libegl1 libgles2 \
|
||||
libgl1-mesa-dri fonts-dejavu-core \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
@@ -16,6 +16,10 @@ assert_fails() {
|
||||
assert_fails packaging_enabled Debug
|
||||
assert_fails packaging_enabled Profile
|
||||
packaging_enabled Release
|
||||
[[ "$(canonical_arch x64)" == x86_64 ]]
|
||||
[[ "$(canonical_arch aarch64)" == aarch64 ]]
|
||||
[[ "$(canonical_arch arm64)" == aarch64 ]]
|
||||
assert_fails canonical_arch riscv64
|
||||
MESHCORE_BUILD_APPIMAGE=0 assert_fails packaging_enabled Release
|
||||
assert_fails check_bundle "$temporary/missing"
|
||||
|
||||
@@ -32,7 +36,13 @@ MESHCORE_BUILD_APPIMAGE=0 bash "$project/scripts/build_appimage.sh" \
|
||||
bash "$project/scripts/build_appimage.sh" "$project" /missing "$temporary/output" Debug x64
|
||||
[[ ! -d "$temporary/output" ]]
|
||||
assert_fails bash "$project/scripts/build_appimage.sh" \
|
||||
"$project" /missing "$temporary/output" Release arm64
|
||||
"$project" /missing "$temporary/output" Release riscv64
|
||||
jq -e '.flutter.source_revision == "9584c6713b324636289d067944a46fd6b49df14b" and
|
||||
(.tools.x86_64.linuxdeploy.sha256 | length == 64) and
|
||||
(.tools.aarch64.linuxdeploy.sha256 | length == 64) and
|
||||
(.tools.aarch64.appimagetool.sha256 | length == 64) and
|
||||
(.tools.aarch64.runtime.sha256 | length == 64)' \
|
||||
"$project/scripts/appimage-tools.json" >/dev/null
|
||||
|
||||
stage_bundle "$project" "$temporary/bundle" "$temporary/AppDir with spaces"
|
||||
check_bundle "$temporary/AppDir with spaces/usr/bin"
|
||||
@@ -50,10 +60,36 @@ assert_fails download_verified "file://$temporary/input" \
|
||||
printf 'corruption\n' >> "$temporary/cache/tool"
|
||||
assert_fails download_verified "file://$temporary/input" "$checksum" "$temporary/cache/tool"
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
download_verified() {
|
||||
printf '%s %s\n' "$1" "$3" >> "$temporary/tool-selection"
|
||||
mkdir -p "$(dirname "$3")"
|
||||
: > "$3"
|
||||
}
|
||||
|
||||
prepare_tools "$project/scripts/appimage-tools.json" "$temporary/tools-x64" x86_64
|
||||
prepare_tools "$project/scripts/appimage-tools.json" "$temporary/tools-arm64" aarch64
|
||||
grep -Fq 'linuxdeploy-x86_64.AppImage' "$temporary/tool-selection"
|
||||
grep -Fq 'appimagetool-x86_64.AppImage' "$temporary/tool-selection"
|
||||
grep -Fq 'runtime-x86_64' "$temporary/tool-selection"
|
||||
grep -Fq 'linuxdeploy-aarch64.AppImage' "$temporary/tool-selection"
|
||||
grep -Fq 'appimagetool-aarch64.AppImage' "$temporary/tool-selection"
|
||||
grep -Fq 'runtime-aarch64' "$temporary/tool-selection"
|
||||
unset -f download_verified
|
||||
|
||||
mkdir -p "$temporary/project/scripts/appimage"
|
||||
touch "$temporary/project/pubspec.lock"
|
||||
cp "$project/scripts/appimage/Dockerfile" "$temporary/project/scripts/appimage/"
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
jq() {
|
||||
case "$*" in
|
||||
*'.flutter.version'*) printf '3.47.4\n' ;;
|
||||
*'.ubuntu'*) printf 'ubuntu:24.04\n' ;;
|
||||
*) return 1 ;;
|
||||
esac
|
||||
}
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
podman() {
|
||||
case "$1" in
|
||||
@@ -84,7 +120,7 @@ package_container "$temporary/project" "$temporary/output" \
|
||||
"$project/scripts/appimage-tools.json" "$temporary/container-cache"
|
||||
assert_fails grep -Fxq -- '--userns=keep-id' "$temporary/container-arguments"
|
||||
grep -Fxq -- "$(id -u):$(id -g)" "$temporary/container-arguments"
|
||||
unset -f podman docker
|
||||
unset -f jq podman docker
|
||||
|
||||
# shellcheck disable=SC2329
|
||||
readelf() {
|
||||
|
||||
@@ -4,6 +4,15 @@ set -euo pipefail
|
||||
image="$(realpath "$1")"
|
||||
mkdir -p "$2"
|
||||
output="$(realpath "$2")"
|
||||
case "$(uname -m)" in
|
||||
x86_64) expected_machine='Advanced Micro Devices X86-64' ;;
|
||||
aarch64) expected_machine='AArch64' ;;
|
||||
*) printf 'Unsupported runtime-test architecture: %s\n' "$(uname -m)" >&2; exit 1 ;;
|
||||
esac
|
||||
if ! readelf -h "$image" | grep -Fq "$expected_machine"; then
|
||||
printf 'AppImage runtime is not built for %s\n' "$(uname -m)" >&2
|
||||
exit 1
|
||||
fi
|
||||
workspace="$(mktemp -d)"
|
||||
app_pid=''
|
||||
bus_pid=''
|
||||
@@ -23,6 +32,13 @@ appdir="$workspace/squashfs-root"
|
||||
-f "$appdir/usr/bin/data/icudtl.dat" && -d "$appdir/usr/bin/data/flutter_assets" ]]
|
||||
[[ -f "$appdir/usr/bin/lib/libonnxruntime.so.1" && \
|
||||
-f "$appdir/usr/share/glib-2.0/schemas/gschemas.compiled" ]]
|
||||
while IFS= read -r -d '' library; do
|
||||
if readelf -h "$library" >/dev/null 2>&1 && \
|
||||
! readelf -h "$library" | grep -Fq "$expected_machine"; then
|
||||
printf 'Wrong ELF architecture in AppImage: %s\n' "${library#"$appdir/"}" >&2
|
||||
exit 1
|
||||
fi
|
||||
done < <(find "$appdir/usr/bin" "$appdir/usr/lib" -type f -print0)
|
||||
ldd "$appdir/usr/bin/meshcore_open" > "$output/dependencies.log" 2>&1
|
||||
while IFS= read -r -d '' library; do
|
||||
printf '\n%s\n' "${library#"$appdir/"}" >> "$output/dependencies.log"
|
||||
|
||||
Reference in new issue
Block a user