diff --git a/README.md b/README.md index 169cac0..5a654fe 100644 --- a/README.md +++ b/README.md @@ -48,11 +48,36 @@ the Go toolchain. ### Prerequisites -**Go 1.24 or newer** — check with `go version`. +There are **two** prerequisites — the Go toolchain, and a C toolchain for cgo. +Both are needed on every platform, macOS included. -Then the C toolchain and system headers Fyne needs: +**1. Go 1.24 or newer.** Verify with `go version`; if that says +`command not found`, install it: ```sh +# macOS +brew install go + +# Debian / Ubuntu +sudo apt install golang-go + +# Fedora +sudo dnf install golang + +# Arch +sudo pacman -S go +``` + +Or download it from [go.dev/dl](https://go.dev/dl/). If your distro's package +is older than 1.24, use the tarball from there instead. + +**2. A C toolchain and the platform's graphics headers**, because Fyne renders +through OpenGL: + +```sh +# macOS — the Xcode command line tools +xcode-select --install + # Debian / Ubuntu sudo apt install gcc libgl1-mesa-dev xorg-dev @@ -62,14 +87,16 @@ sudo dnf install gcc libX11-devel libXcursor-devel libXrandr-devel \ # Arch sudo pacman -S gcc libx11 libxcursor libxrandr libxinerama mesa libxi - -# macOS — the Xcode command line tools -xcode-select --install ``` On Windows, use a MinGW-w64 toolchain (for example via [MSYS2](https://www.msys2.org/)) so cgo has a C compiler. +On macOS the command line tools cover the C side entirely — there is no +Homebrew formula to add for graphics. That makes it easy to run +`xcode-select --install`, see "already installed", and assume you're ready when +Go itself is still missing. Both steps are required. + ### Build it ```sh