diff --git a/.gitea/workflows/electron-linux-amd64.yml b/.gitea/workflows/electron-linux-amd64.yml index 7dfbf9c..b81530f 100644 --- a/.gitea/workflows/electron-linux-amd64.yml +++ b/.gitea/workflows/electron-linux-amd64.yml @@ -36,7 +36,7 @@ jobs: set -eu npm run build:linux:amd64 - - name: Collect run-specific artifact (+ no-fuse launcher) + - name: Collect single consumer artifact (no-FUSE compatible) run: | set -eu rm -rf artifacts @@ -44,15 +44,25 @@ jobs: appimage=$(find dist -maxdepth 1 -type f -name '*.AppImage' | head -n 1 || true) [ -n "$appimage" ] || { echo 'AppImage missing'; exit 1; } out="artifacts/electron_tray_demo-linux-amd64-run${{ github.run_number }}.AppImage" - cp "$appimage" "$out" - chmod +x "$out" - cat > "artifacts/run-electron_tray_demo-linux-amd64-run${{ github.run_number }}-no-fuse.sh" <<'SH' + cat > "$out" <<'SH' #!/usr/bin/env sh set -eu - cd "$(dirname "$0")" - APPIMAGE_EXTRACT_AND_RUN=1 ./electron_tray_demo-linux-amd64-run${{ github.run_number }}.AppImage + self="$0" + workdir="$(mktemp -d)" + cleanup() { rm -rf "$workdir"; } + trap cleanup EXIT INT TERM + payload="$workdir/app.AppImage" + awk 'found { print } /^__APPIMAGE_PAYLOAD_BELOW__$/ { found=1; next }' "$self" | base64 -d > "$payload" + chmod +x "$payload" + APPIMAGE_EXTRACT_AND_RUN=1 "$payload" "$@" + exit $? + __APPIMAGE_PAYLOAD_BELOW__ SH - chmod +x "artifacts/run-electron_tray_demo-linux-amd64-run${{ github.run_number }}-no-fuse.sh" + # remove YAML indentation from embedded launcher script + sed -i 's/^ //' "$out" + base64 -w 0 "$appimage" >> "$out" + echo >> "$out" + chmod +x "$out" - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/.gitea/workflows/electron-linux-arm64.yml b/.gitea/workflows/electron-linux-arm64.yml index d119f7d..56822d7 100644 --- a/.gitea/workflows/electron-linux-arm64.yml +++ b/.gitea/workflows/electron-linux-arm64.yml @@ -36,7 +36,7 @@ jobs: set -eu npm run build:linux:arm64 - - name: Collect run-specific artifact (+ no-fuse launcher) + - name: Collect single consumer artifact (no-FUSE compatible) run: | set -eu rm -rf artifacts @@ -44,15 +44,25 @@ jobs: appimage=$(find dist -maxdepth 1 -type f -name '*.AppImage' | head -n 1 || true) [ -n "$appimage" ] || { echo 'AppImage missing'; exit 1; } out="artifacts/electron_tray_demo-linux-arm64-run${{ github.run_number }}.AppImage" - cp "$appimage" "$out" - chmod +x "$out" - cat > "artifacts/run-electron_tray_demo-linux-arm64-run${{ github.run_number }}-no-fuse.sh" <<'SH' + cat > "$out" <<'SH' #!/usr/bin/env sh set -eu - cd "$(dirname "$0")" - APPIMAGE_EXTRACT_AND_RUN=1 ./electron_tray_demo-linux-arm64-run${{ github.run_number }}.AppImage + self="$0" + workdir="$(mktemp -d)" + cleanup() { rm -rf "$workdir"; } + trap cleanup EXIT INT TERM + payload="$workdir/app.AppImage" + awk 'found { print } /^__APPIMAGE_PAYLOAD_BELOW__$/ { found=1; next }' "$self" | base64 -d > "$payload" + chmod +x "$payload" + APPIMAGE_EXTRACT_AND_RUN=1 "$payload" "$@" + exit $? + __APPIMAGE_PAYLOAD_BELOW__ SH - chmod +x "artifacts/run-electron_tray_demo-linux-arm64-run${{ github.run_number }}-no-fuse.sh" + # remove YAML indentation from embedded launcher script + sed -i 's/^ //' "$out" + base64 -w 0 "$appimage" >> "$out" + echo >> "$out" + chmod +x "$out" - name: Upload artifacts uses: actions/upload-artifact@v3 diff --git a/README.md b/README.md index e18160a..23e61dc 100644 --- a/README.md +++ b/README.md @@ -27,26 +27,12 @@ Artifacts are produced via CI workflows: - `electron-linux-amd64` - `electron-linux-arm64` -## Running on Ubuntu 24.04+ without FUSE2 +## Ubuntu consumer behavior -Some fresh Ubuntu installs do not include `libfuse.so.2`, so direct AppImage execution may fail. +CI now publishes exactly one executable artifact per architecture: -Use one of these options: +- `electron_tray_demo-linux--run.AppImage` -```bash -# preferred package on Ubuntu 24.04+ -sudo apt-get update && sudo apt-get install -y libfuse2t64 - -# then run AppImage normally -./electron_tray_demo-linux--run.AppImage -``` - -Or run without installing FUSE: - -```bash -APPIMAGE_EXTRACT_AND_RUN=1 ./electron_tray_demo-linux--run.AppImage -``` - -CI artifacts also include a convenience launcher: - -- `run-electron_tray_demo-linux--run-no-fuse.sh` +This file is a self-launching wrapper that runs the packaged AppImage with +`APPIMAGE_EXTRACT_AND_RUN=1`, so it works on fresh Ubuntu systems even when +`libfuse.so.2` is not installed.