diff options
| author | 2026-01-14 20:40:02 +0800 | |
|---|---|---|
| committer | 2026-01-14 20:40:02 +0800 | |
| commit | 44a5f42d901abbb282210419529d0e01302b1bed (patch) | |
| tree | 9d70f086ddb6877c6e7ea0c37b5e7d4a82239c9b /src-tauri/scripts | |
| 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 'src-tauri/scripts')
| -rwxr-xr-x | src-tauri/scripts/fix-appimage.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src-tauri/scripts/fix-appimage.sh b/src-tauri/scripts/fix-appimage.sh new file mode 100755 index 0000000..6bb375b --- /dev/null +++ b/src-tauri/scripts/fix-appimage.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# fix AppImage for Wayland compatibility +# This script modifies the AppImage bundle created by Tauri to ensure compatibility with Wayland +# It specifically targets the GTK backend settings to avoid forcing X11 + +set -e + +echo "Fixing AppImage for Wayland compatibility..." + +# Tauri sets the APPIMAGE_BUNDLE_PATH environment variable during the build process +APPDIR_PATH="${APPIMAGE_BUNDLE_PATH:-}" + +if [ -z "$APPDIR_PATH" ]; then + echo "No AppImage bundle path found, skipping fix" + exit 0 +fi + +# Check for the presence of the GTK hook file +if [ -d "$APPDIR_PATH/apprun-hooks" ]; then + HOOK_FILE="$APPDIR_PATH/apprun-hooks/linuxdeploy-plugin-gtk.sh" + + if [ -f "$HOOK_FILE" ]; then + echo "Found GTK hook file, patching..." + + # Comment out the line that forces GDK_BACKEND to x11 + sed -i 's/^export GDK_BACKEND=x11.*$/# export GDK_BACKEND=x11 # Disabled for Wayland compatibility/' "$HOOK_FILE" + + echo "Successfully patched $HOOK_FILE" + fi +fi + +echo "AppImage Wayland fix completed!" |