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
3 changes: 3 additions & 0 deletions .github/actionlint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
self-hosted-runner:
labels:
- ubuntu-24.04-arm
28 changes: 19 additions & 9 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
---
name: Build

on:
workflow_dispatch: {}
pull_request:
Expand All @@ -14,10 +12,19 @@ jobs:
actions: read
security-events: write
contents: write
name: Build Ghostty
runs-on: ubuntu-24.04
name: Build Ghostty (${{ matrix.arch }})
runs-on: ${{ matrix.runs-on }}
strategy:
matrix:
include:
- arch: aarch64
platform: linux/arm64
runs-on: ubuntu-24.04-arm
- arch: x86_64
platform: linux/amd64
runs-on: ubuntu-24.04
container:
image: ubuntu:24.04
image: ${{ matrix.arch == 'aarch64' && 'arm64v8/ubuntu:24.04' || 'ubuntu:24.04' }}
options: "--privileged --cap-add SYS_ADMIN --device /dev/fuse"
steps:
- name: Checkout ghostty-appimage
Expand All @@ -34,9 +41,12 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ghostty-appimage
name: ghostty-appimage-${{ matrix.arch }}
retention-days: 7
path: /tmp/ghostty-build/Ghostty-*-x86_64.AppImage*
path: /tmp/ghostty-build/Ghostty-*.AppImage*

outputs:
arch: ${{ matrix.arch }}

release_appimage:
permissions:
Expand All @@ -50,13 +60,13 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: ghostty-appimage
name: ghostty-appimage-${{ needs.build_appimage.outputs.arch }}

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./Ghostty-*-x86_64.AppImage*
file: ./Ghostty-*.AppImage*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
60 changes: 42 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<img src="https://img.shields.io/github/contributors/psadi/ghostty-appimage" alt="Contributors">
</p></h1>

This repository provides build scripts to create a Universal AppImage for [Ghostty](https://ghostty.org/). This unofficial build offers an executable AppImage compatible with any Linux distribution following the **x86_64 architecture**.
This repository provides build scripts to create a Universal AppImage for [Ghostty](https://ghostty.org/). This unofficial build offers an executable AppImage compatible with any Linux distribution.

**Ghostty Source Code:** [Click Here](https://github.com/ghostty-org/ghostty)

Expand All @@ -32,14 +32,29 @@ This repository provides build scripts to create a Universal AppImage for [Ghost
Run the following commands in your terminal:

```bash
# Download the latest AppImage package
wget https://github.com/psadi/ghostty-appimage/releases/download/[TAG]/Ghostty-x86_64.AppImage
# Provide executable permissions
# Download the latest AppImage package from releases
wget https://github.com/psadi/ghostty-appimage/releases/download/${TAG}/Ghostty-x86_64.AppImage

# Make the AppImage executable
chmod +x Ghostty-x86_64.AppImage
# Execute the AppImage

# Run the AppImage
./Ghostty-x86_64.AppImage

# Optionally, add the AppImage to your PATH for easier access

# With sudo for system wide availability
sudo install ./Ghostty-x86_64.AppImage /usr/local/bin/ghostty

# Without sudo, XDG base spec mandate
install ./Ghostty-x86_64.AppImage $HOME/.local/bin/ghostty

# Now you can run Ghostty from anywhere using the command:
# ghostty
```

_**Note:** By using [**AM**](https://github.com/ivan-hc/AM)/[**AppMan**](https://github.com/ivan-hc/AppMan), **PATH** config done automatically when you install appimages with it._

### Graphical

1. Download the latest AppImage package from the [releases](https://github.com/psadi/ghostty-appimage/releases) section.
Expand All @@ -57,26 +72,35 @@ chmod +x Ghostty-x86_64.AppImage

Since AppImages are self-contained executables, there is no formal installation process beyond setting executable permissions.

**To update manually:**
**Update manually:**

1. Download the latest AppImage package from the [releases](https://github.com/psadi/ghostty-appimage/releases) section.
2. Follow the same steps as in the [Installation](#installation) section to make it executable and run it.
1. Download the latest AppImage package from the [releases](https://github.com/psadi/ghostty-appimage/releases) section.
2. Follow the same steps as in the [Installation](#installation) section to make it executable and run it.

**Update automatically:**

1. Use [AppImageUpdate](https://github.com/AppImageCommunity/AppImageUpdate) which reads the update information in the AppImage. This is a low level tool.
2. Use a higher level tool that uses AppImageUpdate, like [AM](https://github.com/ivan-hc/AM) or [appimaged](https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md) daemon, these tools also automatically handle desktop integration.
1. Use [AppImageUpdate](https://github.com/AppImageCommunity/AppImageUpdate) which reads the update information in the AppImage. This is a low level tool.
2. Use a higher level tool that uses AppImageUpdate, like [AM](https://github.com/ivan-hc/AM) or [appimaged](https://github.com/probonopd/go-appimage/blob/master/src/appimaged/README.md) daemon, these tools also automatically handle desktop integration.

## ❓ What's Next?
## 🖥️ Supported System Architectures

This AppImage supports the following architectures:

| **#** | **Architecture** | **Status** | **Availability** |
| :---: | ---------------- | :--------: | ---------------- |
| 1 | x86_64 | 🟢 | Available |
| 2 | aarch64 | 🟢 | Available |

1. Submit AppImage(s) to [AppImageHub](https://appimage.github.io/).
2. Provide AppImages for other supported architectures.
**Notes:**

- **x86_64**: Widely used in modern desktops and servers, supporting 64-bit processing.
- **aarch64**: 64-bit ARM architecture, planned for future support in cloud computing environments.

## ❓ What's Next?

| # | **Architecture** | **Status** |
| :-: | ---------------- | :--------: |
| 1 | x86_64 | ✅ |
| 2 | i386 | 🟠 |
| 3 | ARM | 🟠 |
- [x] Provide AppImages for other supported architectures
- [ ] Submit AppImage(s) to [AppImageHub](https://appimage.github.io/)
- [ ] Dependency caching in ci for a faster release cycle

### 🛠️ Troubleshooting

Expand Down
26 changes: 21 additions & 5 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,25 @@ cd "${APP_DIR}"

# bundle all libs
ldd ./usr/bin/ghostty | awk -F"[> ]" '{print $4}' | xargs -I {} cp --update=none -v {} ./usr/lib
cp -v /usr/lib/x86_64-linux-gnu/libpthread.so.0 ./usr/lib
if ! mv ./usr/lib/ld-linux-x86-64.so.2 ./; then
cp -v /lib64/ld-linux-x86-64.so.2 ./

# ld-linux contains x86-64 instead of x86_64
case "${ARCH}" in
"x86_64")
ld_linux="ld-linux-x86-64.so.2"
;;
"aarch64")
ld_linux="ld-linux-aarch64.so.1"
;;
*)
echo "Unsupported ARCH: '${ARCH}'"
exit 1
;;
esac

cp -v /usr/lib/${ARCH}-linux-gnu/libpthread.so.0 ./usr/lib

if ! mv ./usr/lib/${ld_linux} ./ld-linux.so; then
cp -v /usr/lib/${ARCH}-linux-gnu/${ld_linux} ./ld-linux.so
fi

# Prepare AppImage -- Configure launcher script, metainfo and desktop file with icon.
Expand All @@ -76,11 +92,11 @@ HERE="$(dirname "$(readlink -f "$0")")"
export TERM=xterm-256color
export GHOSTTY_RESOURCES_DIR="${HERE}/usr/share/ghostty"

exec "${HERE}"/ld-linux-x86-64.so.2 --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
exec "${HERE}"/ld-linux.so --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"

if [ "$?" -gt 0 ] && [ -n "$WAYLAND_DISPLAY" ]; then
export GDK_BACKEND=x11
exec "${HERE}"/ld-linux-x86-64.so.2 --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
exec "${HERE}"/ld-linux.so --library-path "${HERE}"/usr/lib "${HERE}"/usr/bin/ghostty "$@"
fi
EOF

Expand Down
17 changes: 9 additions & 8 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
set -e

export DEBIAN_FRONTEND="noninteractive"
export ARCH="$(uname -m)"

ZIG_VERSION="0.13.0"
MINISIGN_URL="https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz"
Expand All @@ -29,22 +30,22 @@ apt-get -qq update && apt-get -qq -y upgrade && apt-get -qq -y install ${buildPk

# download & install other dependencies
# appimagetool: https://github.com/AppImage/appimagetool
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
install appimagetool-x86_64.AppImage /usr/local/bin/appimagetool
wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-${ARCH}.AppImage"
install "appimagetool-${ARCH}.AppImage" /usr/local/bin/appimagetool

# minisign: https://github.com/jedisct1/minisign
wget -q "${MINISIGN_URL}" -O "minisign-linux.tar.gz"
tar -xzf "minisign-linux.tar.gz"
mv minisign-linux/x86_64/minisign /usr/local/bin
mv minisign-linux/"${ARCH}"/minisign /usr/local/bin

# zig: https://ziglang.org
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-x86_64-${ZIG_VERSION}.tar.xz"
tar -xf "zig-linux-x86_64-${ZIG_VERSION}.tar.xz" -C /opt
ln -s "/opt/zig-linux-x86_64-${ZIG_VERSION}/zig" /usr/local/bin/zig
wget -q "https://ziglang.org/download/${ZIG_VERSION}/zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz"
tar -xf "zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz" -C /opt
ln -s "/opt/zig-linux-${ARCH}-${ZIG_VERSION}/zig" /usr/local/bin/zig

# cleanup
rm -r \
"appimagetool-x86_64.AppImage" \
"appimagetool-${ARCH}.AppImage" \
"minisign-linux.tar.gz" \
"minisign-linux" \
"zig-linux-x86_64-${ZIG_VERSION}.tar.xz"
"zig-linux-${ARCH}-${ZIG_VERSION}.tar.xz"