Skip to content

Commit 3fbeaf4

Browse files
author
psadi
committed
test
1 parent 115e8a3 commit 3fbeaf4

1 file changed

Lines changed: 22 additions & 21 deletions

File tree

build.sh

Lines changed: 22 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ BUILD_ARGS="
2020
-Dpie=true \
2121
-Demit-docs \
2222
-Dgtk-wayland=true \
23-
-Dgtk-x11=true"
23+
-Dgtk-x11=true \
24+
-Dapp-runtime=glfw"
2425

2526
rm -rf "${TMP_DIR}"
2627

@@ -29,22 +30,22 @@ mkdir -p -- "${TMP_DIR}" "${APP_DIR}/share/metainfo" "${APP_DIR}/shared/lib"
2930
cd "${TMP_DIR}"
3031

3132
if [ $GHOSTTY_VERSION == "tip" ]; then
32-
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz" -O ghostty-${GHOSTTY_VERSION}.tar.gz
33-
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig" -O ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
34-
GHOSTTY_VERSION="$(tar -tf ghostty-${GHOSTTY_VERSION}.tar.gz --wildcards "*zig.zon.txt" | awk -F'[-/]' '{print $2"-"$3}')"
35-
mv ghostty-tip.tar.gz ghostty-${GHOSTTY_VERSION}.tar.gz
36-
mv ghostty-tip.tar.gz.minisig ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
33+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz" -O ghostty-${GHOSTTY_VERSION}.tar.gz
34+
wget "https://github.com/ghostty-org/ghostty/releases/download/tip/ghostty-source.tar.gz.minisig" -O ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
35+
GHOSTTY_VERSION="$(tar -tf ghostty-${GHOSTTY_VERSION}.tar.gz --wildcards "*zig.zon.txt" | awk -F'[-/]' '{print $2"-"$3}')"
36+
mv ghostty-tip.tar.gz ghostty-${GHOSTTY_VERSION}.tar.gz
37+
mv ghostty-tip.tar.gz.minisig ghostty-${GHOSTTY_VERSION}.tar.gz.minisig
3738
else
38-
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz"
39-
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
39+
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz"
40+
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4041
fi
4142

4243
minisign -V -m "ghostty-${GHOSTTY_VERSION}.tar.gz" -P "${PUB_KEY}" -s "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4344

4445
tar -xzmf "ghostty-${GHOSTTY_VERSION}.tar.gz"
4546

4647
rm "ghostty-${GHOSTTY_VERSION}.tar.gz" \
47-
"ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
48+
"ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4849

4950
BUILD_DIR="ghostty-${GHOSTTY_VERSION}"
5051
BUILD_ARGS="${BUILD_ARGS} -Dversion-string=${GHOSTTY_VERSION}"
@@ -53,8 +54,8 @@ cd "${TMP_DIR}/${BUILD_DIR}"
5354

5455
#Fetch Zig Cache
5556
if [ -f './nix/build-support/fetch-zig-cache.sh' ]; then
56-
ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh
57-
BUILD_ARGS="${BUILD_ARGS} --system /tmp/offline-cache/p"
57+
ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh
58+
BUILD_ARGS="${BUILD_ARGS} --system /tmp/offline-cache/p"
5859
fi
5960

6061
# Build Ghostty with zig
@@ -73,9 +74,9 @@ ln -s "share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png" .DirIcon
7374

7475
# bundle all libs
7576
xvfb-run -a -- sharun l -p -v -e -s -k \
76-
./bin/ghostty \
77-
/usr/lib/libEGL* \
78-
/usr/lib/gdk-pixbuf-*/*/*/*
77+
./bin/ghostty \
78+
/usr/lib/libEGL* \
79+
/usr/lib/gdk-pixbuf-*/*/*/*
7980

8081
# preload libpixbufloader /w ld-preload-open as svg icons breaks
8182
# either on ghostty tab bar or gnome-text-editor while config edit or both :(
@@ -93,8 +94,8 @@ ln -s ./bin/ghostty ./AppRun
9394

9495
export VERSION="$(./AppRun --version | awk 'FNR==1 {print $2}')"
9596
if [ -z "$VERSION" ]; then
96-
echo "ERROR: Could not get version from ghostty binary"
97-
exit 1
97+
echo "ERROR: Could not get version from ghostty binary"
98+
exit 1
9899
fi
99100

100101
cd "${TMP_DIR}"
@@ -111,11 +112,11 @@ sed -i 's|URUNTIME_MOUNT=[0-9]|URUNTIME_MOUNT=0|' ./uruntime-lite
111112

112113
echo "Generating AppImage"
113114
./uruntime --appimage-mkdwarfs -f \
114-
--set-owner 0 --set-group 0 \
115-
--no-history --no-create-timestamp \
116-
--compression zstd:level=22 -S26 -B8 \
117-
--header uruntime-lite -i "${APP_DIR}" \
118-
-o Ghostty-"${VERSION}"-"${ARCH}".AppImage
115+
--set-owner 0 --set-group 0 \
116+
--no-history --no-create-timestamp \
117+
--compression zstd:level=22 -S26 -B8 \
118+
--header uruntime-lite -i "${APP_DIR}" \
119+
-o Ghostty-"${VERSION}"-"${ARCH}".AppImage
119120

120121
echo "Generating Zsync file"
121122
zsyncmake *.AppImage -u *.AppImage

0 commit comments

Comments
 (0)