From 3463dca2f339795b18a2dbf08f6fec5015246f2b Mon Sep 17 00:00:00 2001 From: Orazio <22700499+orazioedoardo@users.noreply.github.com> Date: Sat, 7 Sep 2024 17:52:16 +0200 Subject: [PATCH] Use most recent appimagetool and runtime to avoid dependency on libfuse2 --- .github/workflows/ReleaseBuilds.yml | 10 ++++------ makeapp_linux.sh | 31 +++++++++++++++++++++-------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ReleaseBuilds.yml b/.github/workflows/ReleaseBuilds.yml index 1203243..838fec2 100644 --- a/.github/workflows/ReleaseBuilds.yml +++ b/.github/workflows/ReleaseBuilds.yml @@ -28,7 +28,7 @@ jobs: - run: | sudo apt update - sudo apt install -y libsfml-dev + sudo apt install -y desktop-file-utils libsfml-dev - run: ./makeapp_linux.sh @@ -62,6 +62,9 @@ jobs: run: ./makeapp_linux.sh --prepare-github-actions - run: | + sudo apt update + sudo apt install -y desktop-file-utils + cd artifacts archive_file="$(echo BOOM-Remake-*-linux-aarch64.tar)" @@ -69,11 +72,6 @@ jobs: tar xf "$archive_file" - curl -sSf -L -O https://github.com/AppImage/AppImageKit/releases/download/13/appimagetool-x86_64.AppImage - curl -sSf -L -O https://github.com/AppImage/AppImageKit/releases/download/13/runtime-aarch64 - chmod +x appimagetool-x86_64.AppImage - chmod +x runtime-aarch64 - ./appimagetool-x86_64.AppImage --runtime-file runtime-aarch64 --no-appstream lifish.AppDir "$appimage_file" - uses: actions/upload-artifact@v4 diff --git a/makeapp_linux.sh b/makeapp_linux.sh index 7aa652d..b7ace26 100755 --- a/makeapp_linux.sh +++ b/makeapp_linux.sh @@ -6,13 +6,14 @@ system_arch="$(uname -m)" sw_version="1.8.0" -appimagetool_version="13" +# These are rolling versions, it shouldn't be assumed that a subsequent build will use the same tool and runtime code +appimagetool_version="continuous" appimagetool_filename="appimagetool-$system_arch.AppImage" -appimagetool_url="https://github.com/AppImage/AppImageKit/releases/download/$appimagetool_version/$appimagetool_filename" +appimagetool_baseurl="https://github.com/AppImage/appimagetool/releases/download/$appimagetool_version" -declare -A appimagetool_hashes -appimagetool_hashes["aarch64"]="334e77beb67fc1e71856c29d5f3f324ca77b0fde7a840fdd14bd3b88c25c341f" -appimagetool_hashes["x86_64"]="df3baf5ca5facbecfc2f3fa6713c29ab9cefa8fd8c1eac5d283b79cab33e4acb" +runtime_version="continuous" +runtime_filename="runtime-$system_arch" +runtime_baseurl="https://github.com/AppImage/type2-runtime/releases/download/$runtime_version" # Shared libraries as of Ubuntu 20.04 required_libs=( @@ -46,15 +47,29 @@ done if [ "$1" = "--prepare-github-actions" ]; then tar cf "artifacts/BOOM-Remake-$sw_version-linux-$system_arch.tar" lifish.AppDir + + cd artifacts + + appimagetool_filename="appimagetool-x86_64.AppImage" + curl -sSf -L -O "$appimagetool_baseurl/$appimagetool_filename" + chmod +x "$appimagetool_filename" + + curl -sSf -L -O "$runtime_baseurl/$runtime_filename" + chmod +x "$runtime_filename" + exit 0 fi if [ ! -f "$appimagetool_filename" ]; then - curl -sSf -L -O "$appimagetool_url" - echo "${appimagetool_hashes[$system_arch]} $appimagetool_filename" | shasum -a 256 -c + curl -sSf -L -O "$appimagetool_baseurl/$appimagetool_filename" chmod +x "$appimagetool_filename" fi -./"$appimagetool_filename" lifish.AppDir "BOOM-Remake-$sw_version-linux-$system_arch.AppImage" +if [ ! -f "$runtime_filename" ]; then + curl -sSf -L -O "$runtime_baseurl/$runtime_filename" + chmod +x "$runtime_filename" +fi + +./"$appimagetool_filename" --no-appstream --runtime-file "runtime-$system_arch" lifish.AppDir "BOOM-Remake-$sw_version-linux-$system_arch.AppImage" rm -r lifish.AppDir