Skip to content
Merged
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
14 changes: 12 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,24 @@ zig build \

cd "${APP_DIR}"

# bundle all libs
mkdir -p ./usr/lib
ldd ./usr/bin/ghostty | awk -F"[> ]" '{print $4}' | xargs -I {} cp -vn {} ./usr/lib
if ! mv ./usr/lib/ld-linux-x86-64.so.2 ./; then
cp -v /lib64/ld-linux-x86-64.so.2 ./
fi

# prep appimage
printf '#!/bin/sh\n\nexec "$(dirname "$(readlink -f "$0")")/usr/bin/ghostty"\n' | tee AppRun >/dev/null
echo '#!/usr/bin/env sh
HERE="$(dirname "$(readlink -f "$0")")"
export TERM=xterm-256color
exec "$HERE"/ld-linux-x86-64.so.2 --library-path "$HERE"/usr/lib "$HERE"/usr/bin/ghostty "$@"' > ./AppRun
chmod +x AppRun
ln -s usr/share/applications/com.mitchellh.ghostty.desktop
ln -s usr/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png

cd "${TMP_DIR}"
# create app image
ARCH=x8_64 appimagetool "${APP_DIR}"
ARCH="$(uname -m)" appimagetool "${APP_DIR}"

appimagelint "${TMP_DIR}/Ghostty-x86_64.AppImage" || true