Skip to content

Commit 5b2453a

Browse files
committed
Fix AppImage runtime and Docker multi-arch builds
- AppImage: Download and prepend proper AppImage runtime instead of creating raw squashfs files, fixing "Exec format error" - Docker: Build both platforms in single job to create proper multi-arch manifest instead of overwriting tags - Add wget dependency for AppImage runtime download Signed-off-by: Joachim Wiberg <[email protected]>
1 parent f8cd27e commit 5b2453a

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,14 @@ jobs:
3232
-v $PWD:/workspace -w /workspace \
3333
ubuntu:22.04 /bin/bash -c '
3434
apt-get update && \
35-
apt-get install -y xxd libsdl2-dev libsdl2-ttf-dev \
35+
apt-get install -y xxd wget libsdl2-dev libsdl2-ttf-dev \
3636
libsdl2-image-dev libsdl2-mixer-dev build-essential squashfs-tools && \
3737
make clean && make && \
3838
./utils/build-appimage.sh aarch64
3939
'
4040
else
4141
sudo apt-get update
42-
sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev \
42+
sudo apt-get install -y wget libsdl2-dev libsdl2-ttf-dev \
4343
libsdl2-image-dev libsdl2-mixer-dev squashfs-tools
4444
make clean && make
4545
./utils/build-appimage.sh x86_64
@@ -56,9 +56,6 @@ jobs:
5656
permissions:
5757
contents: read
5858
packages: write
59-
strategy:
60-
matrix:
61-
platform: [linux/amd64, linux/arm64]
6259

6360
steps:
6461
- uses: actions/checkout@v4
@@ -89,7 +86,7 @@ jobs:
8986
uses: docker/build-push-action@v5
9087
with:
9188
context: .
92-
platforms: ${{ matrix.platform }}
89+
platforms: linux/amd64,linux/arm64
9390
push: true
9491
tags: ${{ steps.meta.outputs.tags }}
9592
labels: ${{ steps.meta.outputs.labels }}

utils/build-appimage.sh

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,21 @@ EOF
4242

4343
chmod +x AppDir/AppRun
4444

45-
# Create AppImage using mksquashfs
45+
# Download AppImage runtime for the target architecture
46+
RUNTIME_URL="https://github.com/AppImage/AppImageKit/releases/download/continuous/runtime-${ARCH}"
47+
echo "Downloading AppImage runtime for ${ARCH}..."
48+
wget -q -O runtime "${RUNTIME_URL}"
49+
50+
# Create squashfs filesystem
51+
echo "Creating squashfs filesystem..."
52+
mksquashfs AppDir filesystem.squashfs -root-owned -noappend
53+
54+
# Combine runtime + squashfs to create proper AppImage
4655
echo "Creating ${APPIMAGE_NAME}..."
47-
mksquashfs AppDir "${APPIMAGE_NAME}" -root-owned -noappend
56+
cat runtime filesystem.squashfs > "${APPIMAGE_NAME}"
4857
chmod +x "${APPIMAGE_NAME}"
4958

5059
# Cleanup
51-
rm -rf AppDir
60+
rm -rf AppDir runtime filesystem.squashfs
5261

5362
echo "AppImage created: ${APPIMAGE_NAME}"

0 commit comments

Comments
 (0)