diff options
| author | 2026-01-14 20:40:02 +0800 | |
|---|---|---|
| committer | 2026-01-14 20:40:02 +0800 | |
| commit | 44a5f42d901abbb282210419529d0e01302b1bed (patch) | |
| tree | 9d70f086ddb6877c6e7ea0c37b5e7d4a82239c9b /.github | |
| parent | cf634adbcb72afc067c09020f097433c9c8109b3 (diff) | |
| download | DropOut-44a5f42d901abbb282210419529d0e01302b1bed.tar.gz DropOut-44a5f42d901abbb282210419529d0e01302b1bed.zip | |
feat: add Wayland compatibility fixes for AppImage and setup appimagetool for Ubuntu
Diffstat (limited to '.github')
| -rw-r--r-- | .github/workflows/release.yml | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2c73602..f043155 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -124,6 +124,14 @@ jobs: workspaces: "./src-tauri -> target" shared-key: ${{ matrix.target }} + - name: Setup appimagetool (Linux) + if: startsWith(matrix.platform, 'ubuntu') + run: | + ARCH=$(uname -m) + wget -q "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-${ARCH}.AppImage" + chmod +x "appimagetool-${ARCH}.AppImage" + sudo mv "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool + - name: Build Tauri App uses: tauri-apps/tauri-action@v0 env: @@ -131,3 +139,29 @@ jobs: with: releaseId: ${{ needs.promote-release.outputs.release_id }} args: ${{ matrix.args }} + + - name: Fix AppImage for Wayland (Linux) + if: startsWith(matrix.platform, 'ubuntu') + run: | + # Locate the generated AppImage + APPIMAGE=$(find bundle -name "*.AppImage" -type f | head -1) + echo "Found AppImage: $APPIMAGE" + + if [ -n "$APPIMAGE" ]; then + # backup original AppImage + cp "$APPIMAGE" "${APPIMAGE}.backup" + + # extract AppImage + "$APPIMAGE" --appimage-extract + + # Fix GTK hook, remove forced X11 + if [ -f squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh ]; then + sed -i 's/^export GDK_BACKEND=x11.*$/# export GDK_BACKEND=x11 # Disabled for Wayland compatibility/' squashfs-root/apprun-hooks/linuxdeploy-plugin-gtk.sh + echo "Successfully patched GTK hook for Wayland compatibility" + fi + + # Repack AppImage + appimagetool squashfs-root "$APPIMAGE" + rm -rf squashfs-root + fi + working-directory: src-tauri/target/release |