@@ -30,56 +30,21 @@ jobs:
3030 if [ "${{ matrix.arch }}" = "aarch64" ]; then
3131 docker run --rm --platform linux/arm64 \
3232 -v $PWD:/workspace -w /workspace \
33- --entrypoint /bin/bash \
34- ubuntu:22.04 -c '
33+ ubuntu:22.04 /bin/bash -c '
3534 apt-get update && \
36- apt-get install -y wget file libfuse2 xxd libsdl2-dev libsdl2-ttf-dev \
37- libsdl2-image-dev libsdl2-mixer-dev build-essential && \
35+ apt-get install -y xxd libsdl2-dev libsdl2-ttf-dev \
36+ libsdl2-image-dev libsdl2-mixer-dev build-essential squashfs-tools && \
3837 make clean && make && \
39- (ARCH=aarch64 make appimage || (
40- echo \"AppImage build failed, trying fallback...\" && \
41- apt-get install -y squashfs-tools && \
42- wget -q -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-aarch64.AppImage -O appimagetool.AppImage && \
43- echo \"Extracting AppImage with unsquashfs...\" && \
44- chmod +x appimagetool.AppImage && \
45- ./appimagetool.AppImage --appimage-extract 2>/dev/null || unsquashfs -d squashfs-root appimagetool.AppImage && \
46- mkdir -p AppDir/usr/bin AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/256x256/apps && \
47- cp demo AppDir/usr/bin/ && \
48- printf "[Desktop Entry]\nType=Application\nName=Infix Demo\nExec=usr/bin/demo\nIcon=demo\nCategories=Game;\n" > AppDir/usr/share/applications/demo.desktop
49- cp jack.png AppDir/usr/share/icons/hicolor/256x256/apps/demo.png && \
50- ln -sf usr/share/applications/demo.desktop AppDir/demo.desktop && \
51- ln -sf usr/share/icons/hicolor/256x256/apps/demo.png AppDir/demo.png && \
52- ln -sf usr/bin/demo AppDir/AppRun && \
53- ARCH=aarch64 squashfs-root/AppRun AppDir InfixDemo-aarch64.AppImage && \
54- rm -rf AppDir squashfs-root appimagetool.AppImage
55- ))
38+ ./utils/build-appimage.sh aarch64
5639 '
5740 else
5841 sudo apt-get update
59- sudo apt-get install -y libfuse2 libsdl2-dev libsdl2-ttf-dev \
60- libsdl2-image-dev libsdl2-mixer-dev
42+ sudo apt-get install -y libsdl2-dev libsdl2-ttf-dev \
43+ libsdl2-image-dev libsdl2-mixer-dev squashfs-tools
6144 make clean && make
62- # Extract and run appimagetool without FUSE
63- make appimage || (
64- wget -q -c https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage -O appimagetool &&
65- chmod +x appimagetool &&
66- ./appimagetool --appimage-extract &&
67- mkdir -p AppDir/usr/bin AppDir/usr/share/applications AppDir/usr/share/icons/hicolor/256x256/apps &&
68- cp demo AppDir/usr/bin/ &&
69- printf "[Desktop Entry]\nType=Application\nName=Infix Demo\nExec=usr/bin/demo\nIcon=demo\nCategories=Game;\n" > AppDir/usr/share/applications/demo.desktop &&
70- cp jack.png AppDir/usr/share/icons/hicolor/256x256/apps/demo.png &&
71- ln -sf usr/share/applications/demo.desktop AppDir/demo.desktop &&
72- ln -sf usr/share/icons/hicolor/256x256/apps/demo.png AppDir/demo.png &&
73- ln -sf usr/bin/demo AppDir/AppRun &&
74- ARCH=x86_64 squashfs-root/AppRun AppDir InfixDemo-x86_64.AppImage &&
75- rm -rf AppDir squashfs-root appimagetool
76- )
45+ ./utils/build-appimage.sh x86_64
7746 fi
7847
79- - name : Rename AppImage
80- run : |
81- mv InfixDemo-x86_64.AppImage InfixDemo-${{ matrix.arch }}.AppImage || true
82-
8348 - name : Upload AppImage artifact
8449 uses : actions/upload-artifact@v4
8550 with :
0 commit comments