Skip to content
Closed
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
18 changes: 18 additions & 0 deletions bin/bundle-appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,24 @@ 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/

# Ghostty's build substitutes @GHOSTTY@ in app.desktop.in / dbus.service.in with the
# absolute path of the build prefix, and quick-sharun copies the entry into $APPDIR
# verbatim. Integration tools that extract the entry (e.g. appimaged) then get a
# TryExec that cannot exist, so the desktop environment hides it or fails to launch.
# Reset those paths to the binary name the README documents and drop DBus activation,
# which cannot work from an AppImage (quick-sharun removes DBusActivatable from the
# top level entry; the copy below would bring it back).
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|' \
-e '/^DBusActivatable=/d' \
"${desktop_file}"
done
rm -rf ./AppDir/share/dbus-1

quick-sharun --make-appimage

mkdir -p ./dist
Expand Down