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
14 changes: 9 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,20 @@ jobs:
- name: Setup build environment
run: |
if [ "${{ github.event_name }}" == "schedule" ]; then
export ZIG_VERSION=0.15.1
ZIG_VERSION=0.15.1
echo "tip" > VERSION
else
export ZIG_VERSION=0.14.0
ZIG_VERSION=0.14.0
fi
ZIG_VERSION=$ZIG_VERSION ./setup.sh
ZIG_VERSION=$ZIG_VERSION ./bin/setup-env.sh

- name: Build Ghostty AppImage
- name: Build Ghostty
run: |
./build.sh
./bin/build-ghostty.sh

- name: Bundle AppImage
run: |
./bin/bundle-appimage.sh

- name: Upload AppImage Artifacts
uses: actions/upload-artifact@v4
Expand Down
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,10 +151,6 @@ Since AppImages are self-contained executables, there is no formal installation

</details>

## 🛠️ Troubleshooting

Refer [TROUBLESHOOTING.md](./TROUBLESHOOTING.md) file

## 🤝 Contributing

Contributions & Bugfixes are welcome. If you like to contribute, please feel free to fork the repository and submit a pull request.
Expand Down
20 changes: 0 additions & 20 deletions TROUBLESHOOTING.md

This file was deleted.

39 changes: 7 additions & 32 deletions build.sh → bin/build-ghostty.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,17 @@ ARCH="$(uname -m)"
GHOSTTY_VERSION="$(cat VERSION)"
PUB_KEY="RWQlAjJC23149WL2sEpT/l0QKy7hMIFhYdQOFy0Z7z7PbneUgvlsnYcV"

export UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY}" | tr '/' '|')|latest|Ghostty-*$ARCH.AppImage.zsync"
export URUNTIME_PRELOAD=1
export DEPLOY_OPENGL=1
export EXEC_WRAPPER=1

rm -rf AppDir dist ghostty-*

BUILD_ARGS="
--summary all \
-Doptimize=ReleaseFast \
-Dcpu=baseline \
-Doptimize=ReleaseFast \
-Dpie=true \
-Demit-docs \
-Dgtk-wayland=true \
-Dgtk-x11=true"
--system /tmp/offline-cache/p \
-Dgtk-wayland=true \
-Dgtk-x11=true \
-Demit-docs=false \
-Dstrip=true"

if [ "${GHOSTTY_VERSION}" = "tip" ]; then
export UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY}" | tr '/' '|')|tip|Ghostty-*$ARCH.AppImage.zsync"
Expand All @@ -43,29 +39,8 @@ rm "ghostty-${GHOSTTY_VERSION}.tar.gz" \

BUILD_ARGS="${BUILD_ARGS} -Dversion-string=${GHOSTTY_VERSION}"

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

# Build Ghostty with zig
(
cd "ghostty-${GHOSTTY_VERSION}"
ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh
zig build ${BUILD_ARGS}
)

export OUTNAME="Ghostty-${GHOSTTY_VERSION}-${ARCH}.AppImage"
export DESKTOP="./ghostty-${GHOSTTY_VERSION}/zig-out/share/applications/com.mitchellh.ghostty.desktop"
export ICON="./ghostty-${GHOSTTY_VERSION}/zig-out/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png"

./quick-sharun ./ghostty-${GHOSTTY_VERSION}/zig-out/bin/ghostty
cp -rf ./ghostty-${GHOSTTY_VERSION}/zig-out/share/* ./AppDir/share/
echo 'unset ARGV0' >>./AppDir/.env
# temp fix for https://github.com/pkgforge-dev/ghostty-appimage/issues/93
ln -s /usr/share/glvnd/egl_vendor.d/10_nvidia.json ./AppDir/share/glvnd/egl_vendor.d/10_nvidia.json

./uruntime2appimage

mkdir -p ./dist
mv -v ./*.AppImage* ./dist
25 changes: 25 additions & 0 deletions bin/bundle-appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

set -eux

ARCH="$(uname -m)"
GHOSTTY_VERSION="$(cat VERSION)"

export UPINFO="gh-releases-zsync|$(echo "${GITHUB_REPOSITORY}" | tr '/' '|')|latest|Ghostty-*$ARCH.AppImage.zsync"
export URUNTIME_PRELOAD=1
export DEPLOY_OPENGL=1
export EXEC_WRAPPER=1
export OUTNAME="Ghostty-${GHOSTTY_VERSION}-${ARCH}.AppImage"
export DESKTOP="./ghostty-${GHOSTTY_VERSION}/zig-out/share/applications/com.mitchellh.ghostty.desktop"
export ICON="./ghostty-${GHOSTTY_VERSION}/zig-out/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png"

./quick-sharun ./ghostty-${GHOSTTY_VERSION}/zig-out/bin/ghostty
cp -rf ./ghostty-${GHOSTTY_VERSION}/zig-out/share/* ./AppDir/share/
echo 'unset ARGV0' >>./AppDir/.env
# temp fix for https://github.com/pkgforge-dev/ghostty-appimage/issues/93
ln -s /usr/share/glvnd/egl_vendor.d/10_nvidia.json ./AppDir/share/glvnd/egl_vendor.d/10_nvidia.json

./uruntime2appimage

mkdir -p ./dist
mv -v ./*.AppImage* ./dist
22 changes: 0 additions & 22 deletions setup.sh → bin/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@ pacman -Syuq --needed --noconfirm --noprogressbar ${buildDeps} ${ghosttyDeps}
ARCH="$(uname -m)"

ZIG_VERSION="${ZIG_VERSION:-0.14.0}"
PANDOC_VERSION="$(get_latest_gh_release 'jgm/pandoc')"
MINISIGN_VERSION="$(get_latest_gh_release 'jedisct1/minisign')"

GH_BASE="https://github.com"
GH_USER_CONTENT="https://raw.githubusercontent.com"

PANDOC_BASE="${GH_BASE}/jgm/pandoc/releases/download/${PANDOC_VERSION}"
MINISIGN_URL="${GH_BASE}/jedisct1/minisign/releases/download/${MINISIGN_VERSION}/minisign-${MINISIGN_VERSION}-linux.tar.gz"

ZIG_PACKAGE_NAME="zig-linux-${ARCH}-${ZIG_VERSION}"
Expand All @@ -38,19 +36,6 @@ DEBLOATED_PKGS="${GH_USER_CONTENT}/pkgforge-dev/Anylinux-AppImages/refs/heads/ma
SHARUN="${GH_USER_CONTENT}/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/quick-sharun.sh"
URUNTIME="${GH_USER_CONTENT}/pkgforge-dev/Anylinux-AppImages/refs/heads/main/useful-tools/uruntime2appimage.sh"

case "${ARCH}" in
"x86_64")
PANDOC_URL="${PANDOC_BASE}/pandoc-${PANDOC_VERSION}-linux-amd64.tar.gz"
;;
"aarch64")
PANDOC_URL="${PANDOC_BASE}/pandoc-${PANDOC_VERSION}-linux-arm64.tar.gz"
;;
*)
echo "Unsupported ARCH: '${ARCH}'"
exit 1
;;
esac

# Install Debloated Pkgs
wget "${DEBLOATED_PKGS}" -O /tmp/get-debloated-pkgs.sh
chmod a+x /tmp/get-debloated-pkgs.sh
Expand All @@ -70,12 +55,6 @@ wget "${MINISIGN_URL}" -O /tmp/minisign-linux.tar.gz
tar -xzf /tmp/minisign-linux.tar.gz -C /tmp
mv /tmp/minisign-linux/"${ARCH}"/minisign /usr/local/bin

# pandoc: https://github.com/jgm/pandoc
rm -rf /usr/local/bin/pandoc*
wget "${PANDOC_URL}" -O /tmp/pandoc-linux.tar.gz
tar -xzf /tmp/pandoc-linux.tar.gz -C /tmp
mv /tmp/"pandoc-${PANDOC_VERSION}"/bin/* /usr/local/bin

# Sharun
wget "${SHARUN}" -O quick-sharun
chmod +x quick-sharun
Expand All @@ -91,5 +70,4 @@ rm -rf \
/tmp/appimagetool.AppImage \
/tmp/minisign-linux* \
/tmp/zig-linux.tar.xz \
/tmp/pandoc* \
/tmp/*.pkg.tar.zst