diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5ee99b5..7551c9c 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -40,7 +40,7 @@ jobs: release_appimage: name: "Upload binaries to current release" runs-on: ubuntu-latest - # if: ${{ github.event_name == 'release' }} + if: ${{ github.event_name == 'release' }} needs: "build_appimage" steps: - uses: actions/download-artifact@v4 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..2055d90 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,32 @@ +--- +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: check-executables-have-shebangs + - id: check-merge-conflict + - id: check-shebang-scripts-are-executable + - id: fix-byte-order-marker + - id: mixed-line-ending + - id: end-of-file-fixer + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + - id: check-yaml + - id: no-commit-to-branch + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck + args: ["--severity=error"] + + - repo: https://github.com/scop/pre-commit-shfmt + rev: v3.10.0-2 + hooks: + - id: shfmt + args: ["-w", "-s"] + + - repo: https://github.com/rhysd/actionlint + rev: v1.7.6 + hooks: + - id: actionlint-system diff --git a/README.md b/README.md index 83c85e1..1253e82 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,78 @@ -# ghostty-appimage -AppImage(s) for Ghostty +[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/psadi/ghostty-appimage/blob/main/LICENSE) +[![Build Status](https://github.com/psadi/ghostty-appimage/actions/workflows/ci.yaml/badge.svg)](https://github.com/psadi/ghostty-appimage/actions/workflows/ci.yaml) + +

+ Ghostty Logo + AppImage Logo +
Ghostty AppImage +

+ +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**. + + +**Ghostty Source Code:** [Click Here](https://github.com/ghostty-org/ghostty) + + +## 🚀 Quick Start + +1. Download the latest AppImage from the [releases](https://github.com/psadi/ghostty-appimage/releases) section. +2. Follow the installation instructions below to run the AppImage. + +## ⚙️ Installation + +### Command Line + +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 +chmod +x Ghostty-x86_64.AppImage +# Execute the AppImage +./Ghostty-x86_64.AppImage +``` + +### Graphical + +1. Download the latest AppImage package from the [releases](https://github.com/psadi/ghostty-appimage/releases) section. +2. Locate the downloaded file in your file explorer (e.g., Nautilus, Thunar, PCManFM). +3. Right-click the downloaded file and select **Properties**. +4. Navigate to the **Permissions** tab and check the box that says **Allow executing file as program/Executable as Program**. +5. Close the properties window and double-click the AppImage file to run it. + +

+ Step 1 + Step 2 +

+ +## ⏫ Updating + +Since AppImages are self-contained executables, there is no formal installation process beyond setting executable permissions. + +**To update:** + +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. + +## ❓ What's Next? + +1. Submit AppImage(s) to [AppImageHub](https://appimage.github.io/). +2. Provide AppImages for other supported architectures. + + | **Architecture** | **Support** | + |------------------|-------------| + | x86_64 | ✅ | + | i386 | ❌ | + | ARM | ❌ | + +### 🛠️ Troubleshooting + +- If the AppImage does not run, ensure that you have provided executable permissions. +- If you encounter any errors, check the terminal for error messages that may indicate missing dependencies or other issues. + +## 🤝 Contributing + +Contributions & Bugfixes are welcome. If you like to contribute, please feel free to fork the repository and submit a pull request. + +For any questions or discussions, please open an issue in the repository. diff --git a/assets/1.png b/assets/1.png new file mode 100644 index 0000000..713fdcc Binary files /dev/null and b/assets/1.png differ diff --git a/assets/2.png b/assets/2.png new file mode 100644 index 0000000..7c47d00 Binary files /dev/null and b/assets/2.png differ diff --git a/assets/appimage.png b/assets/appimage.png new file mode 100644 index 0000000..bb6a104 Binary files /dev/null and b/assets/appimage.png differ diff --git a/assets/ghostty.png b/assets/ghostty.png new file mode 100644 index 0000000..b51b8d7 Binary files /dev/null and b/assets/ghostty.png differ diff --git a/build.sh b/build.sh index d5bea87..1761483 100755 --- a/build.sh +++ b/build.sh @@ -33,19 +33,19 @@ ZIG_GLOBAL_CACHE_DIR=/tmp/offline-cache ./nix/build-support/fetch-zig-cache.sh # Build Ghostty with zig zig build \ - --summary all \ - --prefix "${APP_DIR}/usr" \ - --system /tmp/offline-cache/p \ - -Doptimize=ReleaseFast \ - -Dcpu=baseline \ - -Dpie=true \ - -Demit-docs \ - -Dversion-string="${GHOSTTY_VERSION}" + --summary all \ + --prefix "${APP_DIR}/usr" \ + --system /tmp/offline-cache/p \ + -Doptimize=ReleaseFast \ + -Dcpu=baseline \ + -Dpie=true \ + -Demit-docs \ + -Dversion-string="${GHOSTTY_VERSION}" cd "${APP_DIR}" # prep appimage -printf '#!/bin/sh\n\nexec "$(dirname "$(readlink -f "$0")")/usr/bin/ghostty"\n' | tee AppRun > /dev/null +printf '#!/bin/sh\n\nexec "$(dirname "$(readlink -f "$0")")/usr/bin/ghostty"\n' | tee AppRun >/dev/null chmod +x AppRun ln -s usr/share/applications/com.mitchellh.ghostty.desktop ln -s usr/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png @@ -53,3 +53,5 @@ ln -s usr/share/icons/hicolor/256x256/apps/com.mitchellh.ghostty.png cd "${TMP_DIR}" # create app image ARCH=x8_64 appimagetool "${APP_DIR}" + +appimagelint "${TMP_DIR}/Ghostty-x86_64.AppImage" || true diff --git a/setup.sh b/setup.sh index 1e9d664..444f944 100755 --- a/setup.sh +++ b/setup.sh @@ -17,6 +17,10 @@ wget -q "https://github.com/AppImage/appimagetool/releases/download/continuous/a install appimagetool-x86_64.AppImage /usr/local/bin/appimagetool rm appimagetool-x86_64.AppImage +wget -q "https://github.com/TheAssassin/appimagelint/releases/download/continuous/appimagelint-x86_64.AppImage" +install appimagelint-x86_64.AppImage /usr/local/bin/appimagelint +rm appimagelint-x86_64.AppImage + # minisign: https://github.com/jedisct1/minisign wget -q "https://github.com/jedisct1/minisign/releases/download/0.11/minisign-0.11-linux.tar.gz" tar -xzf minisign-0.11-linux.tar.gz