mirror of
https://github.com/storytold/photocraft.git
synced 2026-11-02 18:13:39 +00:00
fix(docs): Linux build prerequisites only name Debian packages (#2437)
The prerequisites listed `libxkbcommon-dev ... libgtk-3-dev`, which exist only
on Debian and Ubuntu: on Arch none of those names resolve and `pacman -S` fails
on the whole line, and on Fedora and openSUSE they all need `-devel`. Nothing
else in the repository gives the equivalents.
The app already speaks four distros at runtime: linux_libs.rs carries a
{soname, debian, fedora, arch, suse} table, reads ID and ID_LIKE from
/etc/os-release and prints the matching apt, dnf, pacman or zypper command when
a runtime library is missing. This brings the build instructions up to that.
Also adds the prerequisites to the book's Building page, which said only to
install the Rust toolchain.
Co-authored-by: Brandon Thomas <echelon@gmail.com>
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
PhotoCraft uses the Rust workspace at the repository root. Install the stable Rust toolchain, clone the repository, and run commands from that root.
|
||||
|
||||
On Linux, install the windowing, GL and GTK development packages first. The development guide's
|
||||
[Prerequisites](https://github.com/storytold/photocraft/blob/main/docs/development.md#prerequisites)
|
||||
list them for Debian/Ubuntu, Fedora, Arch and openSUSE.
|
||||
|
||||
```sh
|
||||
cargo build --workspace
|
||||
cargo run --release -p photocraft -- image.psd
|
||||
|
||||
+5
-1
@@ -3,7 +3,11 @@
|
||||
## Prerequisites
|
||||
|
||||
- Rust stable (1.95+). Add the web target with `rustup target add wasm32-unknown-unknown`.
|
||||
- macOS, Windows or Linux. Linux needs `libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libgtk-3-dev`.
|
||||
- macOS, Windows or Linux. On Linux, install the windowing, GL and GTK development packages:
|
||||
- Debian/Ubuntu: `sudo apt install libxkbcommon-dev libwayland-dev libx11-dev libxrandr-dev libxi-dev libgl1-mesa-dev libgtk-3-dev`
|
||||
- Fedora/RHEL: `sudo dnf install libxkbcommon-devel wayland-devel libX11-devel libXrandr-devel libXi-devel mesa-libGL-devel gtk3-devel`
|
||||
- Arch: `sudo pacman -S libxkbcommon wayland libx11 libxrandr libxi mesa gtk3`
|
||||
- openSUSE: `sudo zypper install libxkbcommon-devel wayland-devel libX11-devel libXrandr-devel libXi-devel Mesa-libGL-devel gtk3-devel`
|
||||
|
||||
### Windows source builds
|
||||
|
||||
|
||||
Reference in New Issue
Block a user