Skip to content
Merged
Show file tree
Hide file tree
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
32 changes: 30 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,27 @@ jobs:
actions: read
security-events: write
contents: write
name: 👻 Build Ghostty (${{ matrix.arch }})
name: 👻 Build Ghostty (${{ matrix.arch }}) ${{ matrix.glfw == true && '(glfw)' || '' }}
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
include:
- arch: aarch64
platform: linux/arm64
runs-on: ubuntu-24.04-arm
glfw: false
- arch: x86_64
platform: linux/amd64
runs-on: ubuntu-24.04
glfw: false
- arch: aarch64
platform: linux/arm64
runs-on: ubuntu-24.04-arm
glfw: true
- arch: x86_64
platform: linux/amd64
runs-on: ubuntu-24.04
glfw: true
container:
image: ghcr.io/pkgforge-dev/archlinux:latest
steps:
Expand Down Expand Up @@ -68,11 +78,13 @@ jobs:
echo "tip" > VERSION
fi
./build.sh
env:
GLFW: ${{ matrix.glfw }}

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

Expand Down Expand Up @@ -124,6 +136,14 @@ jobs:
with:
name: ghostty-appimage-x86_64

- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-aarch64-glfw

- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-x86_64-glfw

- name: Ghostty stable
uses: svenstaro/upload-release-action@v2
with:
Expand Down Expand Up @@ -152,6 +172,14 @@ jobs:
with:
name: ghostty-appimage-x86_64

- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-aarch64-glfw

- uses: actions/download-artifact@v4
with:
name: ghostty-appimage-x86_64-glfw

- name: Ghostty Tip ("Nightly")
uses: softprops/action-gh-release@v2.2.2
with:
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ This repository provides build scripts to create a Universal AppImage for [Ghost
1. Stable builds are based on upstream releases, with minor fixes and patches released as **version+1** tag(s).
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.

## 🧪 Experimental Builds (GLFW)

> [!WARNING]
>
> Please read the following carefully before using them
>
> - These builds are available for both stable and daily nightly releases
> - These builds use the experimental flag `-Dapp-runtime=glfw`
> - They do not include bundled dependencies for Gtk and libadwaita
> - Window decorations may not work on non-GNOME desktop environments (No CSD)
> - Tabs and splits are not functional
> - The terminal inspector does not work
> - The build size is drastically reduced (around 20 MB) as 80+ dependencies are not bundled
> - Please refer to the [**upstream warning notice**](https://github.com/ghostty-org/ghostty/blob/main/PACKAGING.md#build-options) for further info

## ⚙️ Installation

<details>
Expand Down
33 changes: 23 additions & 10 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"
UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY:-no-user/no-repo}" | tr '/' '|')|latest|*$ARCH.AppImage.zsync"
APPDATA_FILE="${PWD}/assets/ghostty.appdata.xml"
DESKTOP_FILE="${PWD}/assets/ghostty.desktop"
LIBS2BUNDLE="./bin/ghostty /usr/lib/libEGL*"
BUILD_ARGS="
--summary all \
--prefix ${APP_DIR} \
Expand Down Expand Up @@ -39,6 +40,12 @@ else
wget "https://release.files.ghostty.org/${GHOSTTY_VERSION}/ghostty-${GHOSTTY_VERSION}.tar.gz.minisig"
fi

if [ $GLFW == true ]; then
BUILD_ARGS="${BUILD_ARGS} -Dapp-runtime=glfw"
else
LIBS2BUNDLE="${LIBS2BUNDLE} /usr/lib/gdk-pixbuf-*/*/*/*"
fi

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

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

# bundle all libs
xvfb-run -a -- sharun l -p -v -e -s -k \
./bin/ghostty \
/usr/lib/libEGL* \
/usr/lib/gdk-pixbuf-*/*/*/*
xvfb-run -a -- sharun l -p -v -e -s -k ${LIBS2BUNDLE}

# preload libpixbufloader /w ld-preload-open as svg icons breaks
# either on ghostty tab bar or gnome-text-editor while config edit or both :(
mv ./shared/lib/gdk-pixbuf-2.0 ./
cp -rv /opt/path-mapping.so ./shared/lib/
cp -rv gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so ./shared/lib/
if [ $GLFW == false ]; then
mv ./shared/lib/gdk-pixbuf-2.0 ./
cp -rv /opt/path-mapping.so ./shared/lib/
cp -rv gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader_svg.so ./shared/lib/

echo 'path-mapping.so' >./.preload
echo 'PATH_MAPPING=/usr/lib/gdk-pixbuf-2.0:${SHARUN_DIR}/gdk-pixbuf-2.0' >>./.env
fi

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

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

GHOSTTY_APPIMAGE="Ghostty-${VERSION}-${ARCH}.AppImage"

if [ $GLFW == true ]; then
GHOSTTY_APPIMAGE="Ghostty-Glfw-${VERSION}-${ARCH}.AppImage"
fi

cd "${TMP_DIR}"

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

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