Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions bin/bundle-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,22 @@ export ICON="./ghostty-${GHOSTTY_VERSION}/zig-out/share/icons/hicolor/256x256/ap

quick-sharun ./ghostty-${GHOSTTY_VERSION}/zig-out/bin/ghostty
cp -rf ./ghostty-${GHOSTTY_VERSION}/zig-out/share/* ./AppDir/share/

# zig build substitutes @GHOSTTY@ in dist/linux/app.desktop.in with the absolute build
# prefix, and the copy above drops the generated tree into AppDir verbatim, so the
# embedded entries carry a build path such as
# /__w/ghostty-appimage/ghostty-appimage/ghostty-<ver>/zig-out/bin/ghostty.
# Integration tools (AM, GearLever, Soar, AppImageLauncher) rewrite Exec/TryExec when they
# install the entry, so this is not user-visible breakage for them; normalize it anyway so
# the entry shipped inside the image is portable on its own.
for desktop_file in ./AppDir/*.desktop ./AppDir/share/applications/*.desktop; do
[ -f "${desktop_file}" ] || continue
sed -i -E \
-e 's|^Exec=[^ ]*/|Exec=|' \
-e 's|^TryExec=.*|TryExec=ghostty|' \
"${desktop_file}"
done

quick-sharun --make-appimage

mkdir -p ./dist
Expand Down