From 77882251e198f9a3480ed8ef471625e22f57ce77 Mon Sep 17 00:00:00 2001 From: misson20000 Date: Sat, 3 Aug 2024 23:49:09 -0400 Subject: [PATCH] Tweak CI and README for GTK 4.8 configuration --- .github/workflows/rust.yml | 3 ++- README.md | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index fe97893..5ae7cb6 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -43,7 +43,8 @@ jobs: # Default: "false" cache-on-failure: "" - name: Build - run: cargo build --verbose + # CI runs Ubuntu Jammy, which has gtk4.6, so we can't enable gtk4.8. + run: cargo build --no-default-features -F gtk --verbose - name: Run tests uses: coactions/setup-xvfb@v1 with: diff --git a/README.md b/README.md index 13267ee..cb70ce4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # charm -A hex editor that "isn't bad". +A structure-first hex editor. ![Screenshot of charm](doc/screenshot.png?raw=true) @@ -11,11 +11,23 @@ A hex editor that "isn't bad". 1. Install dependencies: ``` -sudo apt-get install libgtk-4-dev libgdk-pixbuf2.0-dev libatk1.0-dev libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ +sudo apt-get install libgtk-4-dev libadwaita-1-dev libgdk-pixbuf2.0-dev libatk1.0-dev libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++ ``` 2. Build: ``` -cargo build -F gtk +cargo build +``` + +On certain versions of Ubuntu, your version of GTK may be too old for the default configuration, which depends on GTK 4.8. You can disable GTK 4.8 features and build like so, but you may have worse scrolling behavior on Wayland. + +``` +cargo build --no-default-features -F gtk +``` + +### NixOS + +``` +nix-shell -p gtk4 gdk-pixbuf atk cairo libjpeg8 pango giflib pkg-config libadwaita ```