Skip to content

Commit 5cd6539

Browse files
authored
Merge pull request #76 from pkgforge-dev/feature/exp
feat: add experimental builds
2 parents cbb4404 + 00f5c55 commit 5cd6539

File tree

3 files changed

+68
-12
lines changed

3 files changed

+68
-12
lines changed

.github/workflows/ci.yaml

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,17 +21,27 @@ jobs:
2121
actions: read
2222
security-events: write
2323
contents: write
24-
name: 👻 Build Ghostty (${{ matrix.arch }})
24+
name: 👻 Build Ghostty (${{ matrix.arch }}) ${{ matrix.glfw == true && '(glfw)' || '' }}
2525
runs-on: ${{ matrix.runs-on }}
2626
strategy:
2727
matrix:
2828
include:
2929
- arch: aarch64
3030
platform: linux/arm64
3131
runs-on: ubuntu-24.04-arm
32+
glfw: false
3233
- arch: x86_64
3334
platform: linux/amd64
3435
runs-on: ubuntu-24.04
36+
glfw: false
37+
- arch: aarch64
38+
platform: linux/arm64
39+
runs-on: ubuntu-24.04-arm
40+
glfw: true
41+
- arch: x86_64
42+
platform: linux/amd64
43+
runs-on: ubuntu-24.04
44+
glfw: true
3545
container:
3646
image: ghcr.io/pkgforge-dev/archlinux:latest
3747
steps:
@@ -68,11 +78,13 @@ jobs:
6878
echo "tip" > VERSION
6979
fi
7080
./build.sh
81+
env:
82+
GLFW: ${{ matrix.glfw }}
7183

7284
- name: Upload AppImage Artifacts
7385
uses: actions/upload-artifact@v4
7486
with:
75-
name: ghostty-appimage-${{ matrix.arch }}
87+
name: ghostty-appimage-${{ matrix.arch }}${{ matrix.glfw == true && '-glfw' || '' }}
7688
retention-days: 7
7789
path: /tmp/ghostty-build/Ghostty-*-${{ matrix.arch }}.AppImage*
7890

@@ -124,6 +136,14 @@ jobs:
124136
with:
125137
name: ghostty-appimage-x86_64
126138

139+
- uses: actions/download-artifact@v4
140+
with:
141+
name: ghostty-appimage-aarch64-glfw
142+
143+
- uses: actions/download-artifact@v4
144+
with:
145+
name: ghostty-appimage-x86_64-glfw
146+
127147
- name: Ghostty stable
128148
uses: svenstaro/upload-release-action@v2
129149
with:
@@ -152,6 +172,14 @@ jobs:
152172
with:
153173
name: ghostty-appimage-x86_64
154174

175+
- uses: actions/download-artifact@v4
176+
with:
177+
name: ghostty-appimage-aarch64-glfw
178+
179+
- uses: actions/download-artifact@v4
180+
with:
181+
name: ghostty-appimage-x86_64-glfw
182+
155183
- name: Ghostty Tip ("Nightly")
156184
uses: softprops/[email protected]
157185
with:

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ This repository provides build scripts to create a Universal AppImage for [Ghost
2525
1. Stable builds are based on upstream releases, with minor fixes and patches released as **version+1** tag(s).
2626
1. Daily nightly builds, based on the upstream [tip releases](https://github.com/ghostty-org/ghostty/releases/tag/tip), are built and released at **00:00 UTC every day** and are available as pre-releases in the [releases](https://github.com/pkgforge-dev/ghostty-appimage/releases/tag/tip) section.
2727

28+
## 🧪 Experimental Builds (GLFW)
29+
30+
> [!WARNING]
31+
>
32+
> Please read the following carefully before using them
33+
>
34+
> - These builds are available for both stable and daily nightly releases
35+
> - These builds use the experimental flag `-Dapp-runtime=glfw`
36+
> - They do not include bundled dependencies for Gtk and libadwaita
37+
> - Window decorations may not work on non-GNOME desktop environments (No CSD)
38+
> - Tabs and splits are not functional
39+
> - The terminal inspector does not work
40+
> - The build size is drastically reduced (around 20 MB) as 80+ dependencies are not bundled
41+
> - Please refer to the [**upstream warning notice**](https://github.com/ghostty-org/ghostty/blob/main/PACKAGING.md#build-options) for further info
42+
2843
## ⚙️ Installation
2944

3045
<details>

build.sh

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"
1212
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY:-no-user/no-repo}" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
1313
APPDATA_FILE="${PWD}/assets/ghostty.appdata.xml"
1414
DESKTOP_FILE="${PWD}/assets/ghostty.desktop"
15+
LIBS2BUNDLE="./bin/ghostty /usr/lib/libEGL*"
1516
BUILD_ARGS="
1617
--summary all \
1718
--prefix ${APP_DIR} \
@@ -39,6 +40,12 @@ else
3940
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4041
fi
4142

43+
if [ $GLFW == true ]; then
44+
BUILD_ARGS="${BUILD_ARGS} -Dapp-runtime=glfw"
45+
else
46+
LIBS2BUNDLE="${LIBS2BUNDLE} /usr/lib/gdk-pixbuf-*/*/*/*"
47+
fi
48+
4249
minisign -V -m "ghostty-${GHOSTTY_VERSION}.tar.gz" -P "${PUB_KEY}" -s "ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
4350

4451
tar -xzmf "ghostty-${GHOSTTY_VERSION}.tar.gz"
@@ -72,19 +79,19 @@ ln -s "share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png" .
7279
ln -s "share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png" .DirIcon
7380

7481
# bundle all libs
75-
xvfb-run -a -- sharun l -p -v -e -s -k \
76-
./bin/ghostty \
77-
/usr/lib/libEGL* \
78-
/usr/lib/gdk-pixbuf-*/*/*/*
82+
xvfb-run -a -- sharun l -p -v -e -s -k ${LIBS2BUNDLE}
7983

8084
# preload libpixbufloader /w ld-preload-open as svg icons breaks
8185
# either on ghostty tab bar or gnome-text-editor while config edit or both :(
82-
mv ./shared/lib/gdk-pixbuf-2.0 ./
83-
cp -rv /opt/path-mapping.so ./shared/lib/
84-
cp -rv gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so ./shared/lib/
86+
if [ $GLFW == false ]; then
87+
mv ./shared/lib/gdk-pixbuf-2.0 ./
88+
cp -rv /opt/path-mapping.so ./shared/lib/
89+
cp -rv gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so ./shared/lib/
90+
91+
echo 'path-mapping.so' >./.preload
92+
echo 'PATH_MAPPING=/usr/lib/gdk-pixbuf-2.0:${SHARUN_DIR}/gdk-pixbuf-2.0' >>./.env
93+
fi
8594

86-
echo 'path-mapping.so' >./.preload
87-
echo 'PATH_MAPPING=/usr/lib/gdk-pixbuf-2.0:${SHARUN_DIR}/gdk-pixbuf-2.0' >>./.env
8895
echo 'GHOSTTY_RESOURCES_DIR=${SHARUN_DIR}/share/ghostty' >>./.env
8996
echo 'unset ARGV0' >>./.env
9097

@@ -97,6 +104,12 @@ if [ -z "$VERSION" ]; then
97104
exit 1
98105
fi
99106

107+
GHOSTTY_APPIMAGE="Ghostty-${VERSION}-${ARCH}.AppImage"
108+
109+
if [ $GLFW == true ]; then
110+
GHOSTTY_APPIMAGE="Ghostty-Glfw-${VERSION}-${ARCH}.AppImage"
111+
fi
112+
100113
cd "${TMP_DIR}"
101114

102115
# create app image
@@ -115,7 +128,7 @@ echo "Generating AppImage"
115128
--no-history --no-create-timestamp \
116129
--compression zstd:level=22 -S26 -B8 \
117130
--header uruntime-lite -i "${APP_DIR}" \
118-
-o Ghostty-"${VERSION}"-"${ARCH}".AppImage
131+
-o "${GHOSTTY_APPIMAGE}"
119132

120133
echo "Generating Zsync file"
121134
zsyncmake *.AppImage -u *.AppImage

0 commit comments

Comments
 (0)