Skip to content

Commit 16093eb

Browse files
author
psadi
committed
set ld_path
1 parent d2b9e1b commit 16093eb

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

AppRun

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#/bin/sh
2+
3+
HERE="$(dirname "$(readlink -f "$0")")"
4+
5+
export TERM=xterm-256color
6+
export GHOSTTY_RESOURCES_DIR="${HERE}/usr/share/ghostty"
7+
8+
exec "${HERE}"/ --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
9+
10+
if [ "$?" -gt 0 ] && [ -n "$WAYLAND_DISPLAY" ]; then
11+
export GDK_BACKEND=x11
12+
exec "${HERE}"/ --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
13+
fi

build.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,21 +92,21 @@ HERE="$(dirname "$(readlink -f "$0")")"
9292
export TERM=xterm-256color
9393
export GHOSTTY_RESOURCES_DIR="${HERE}/usr/share/ghostty"
9494
95-
exec "${HERE}"/${ld_linux} --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
95+
exec "${HERE}"/ld-linux.so --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
9696
9797
if [ "$?" -gt 0 ] && [ -n "$WAYLAND_DISPLAY" ]; then
9898
export GDK_BACKEND=x11
99-
exec "${HERE}"/${ld_linux} --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
99+
exec "${HERE}"/ld-linux.so --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
100100
fi
101101
EOF
102102

103103
chmod +x AppRun
104104

105-
# export VERSION="$(./AppRun --version 2>/dev/null | awk 'FNR==1 {print $2}')"
106-
# if [ -z "$VERSION" ]; then
107-
# echo "ERROR: Could not get version from ghostty binary"
108-
# exit 1
109-
# fi
105+
export VERSION="$(./AppRun --version 2>/dev/null | awk 'FNR==1 {print $2}')"
106+
if [ -z "$VERSION" ]; then
107+
echo "ERROR: Could not get version from ghostty binary"
108+
exit 1
109+
fi
110110

111111
cp "${APPDATA_FILE}" "usr/share/metainfo/com.mitchellh.ghostty.appdata.xml"
112112

0 commit comments

Comments
 (0)