From e3a5aaf327690534a134e8df51063029d8ae6412 Mon Sep 17 00:00:00 2001 From: Benibur Date: Sat, 7 Mar 2026 13:24:04 +0100 Subject: [PATCH] Fix hardcoded build paths in .desktop Exec and TryExec fields The Ghostty build produces a .desktop file with absolute paths from the build environment (e.g. /__w/ghostty-appimage/.../zig-out/bin/ghostty). When desktop integration tools like appimaged extract this .desktop file and install it on the user's system, TryExec fails because the path doesn't exist, causing the entry to be silently ignored by GNOME Shell. This replaces the absolute paths with just the binary name "ghostty", which the AppImage runtime resolves correctly. Co-Authored-By: Claude Opus 4.6 --- bin/bundle-appimage.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/bin/bundle-appimage.sh b/bin/bundle-appimage.sh index 082f0c8..f63a125 100755 --- a/bin/bundle-appimage.sh +++ b/bin/bundle-appimage.sh @@ -13,6 +13,13 @@ export OUTNAME="Ghostty-${GHOSTTY_VERSION}-${ARCH}.AppImage" export DESKTOP="./ghostty-${GHOSTTY_VERSION}/zig-out/share/applications/com.mitchellh.ghostty.desktop" export ICON="./ghostty-${GHOSTTY_VERSION}/zig-out/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png" +# Fix Exec and TryExec paths: the build produces absolute paths from the build +# environment, which breaks desktop integration tools like appimaged that extract +# the .desktop file and use it as-is. Using just the binary name lets the AppImage +# runtime resolve it correctly. +sed -i 's|^TryExec=.*|TryExec=ghostty|' "$DESKTOP" +sed -i 's|^Exec=.*ghostty\(.*\)|Exec=ghostty\1|' "$DESKTOP" + ./quick-sharun ./ghostty-${GHOSTTY_VERSION}/zig-out/bin/ghostty cp -rf ./ghostty-${GHOSTTY_VERSION}/zig-out/share/* ./AppDir/share/ ./quick-sharun --make-appimage