From 7122f7e461feab5ae78406ebb83b9d11027ecb57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mickae=CC=88l=20Menu?= Date: Sun, 4 Apr 2021 16:31:31 +0200 Subject: [PATCH] Improve build instructions --- README.md | 34 ++++++++++++++++++++++++++++++---- 1 file changed, 30 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 8cd35b1..4177941 100644 --- a/README.md +++ b/README.md @@ -32,18 +32,44 @@ ## Install -`zk` was only tested on macOS and Linux. +[Check out the latest release](https://github.com/mickael-menu/zk/releases) for pre-built binaries for macOS and Linux (`zk` was not tested on Windows). ### Build from scratch -Make sure you have a working [Go installation](https://golang.org/), with Go's `bin` directory in your `PATH`. +Make sure you have a working [Go installation](https://golang.org/), then clone the repository: ```sh $ git clone https://github.com/mickael-menu/zk.git $ cd zk $ chmod a+x go -$ ./go install -$ zk -h +``` + +#### On macOS + +`icu4c` is required to build `zk`, which you can install with [Homebrew](https://brew.sh/). + +``` +$ brew install icu4c +$ ./go build +$ ./zk -h +``` + +##### Apple Silicon + +The build command needs additional environment variables on Apple Silicon: + +``` +$ GOARCH=arm64 CGO_CFLAGS="-I/opt/homebrew/opt/icu4c/include" CGO_LDFLAGS="-L/opt/homebrew/opt/icu4c/lib" ./go build +``` + +#### On Linux + +`libicu-dev` is required to build `zk`, use your favorite package manager to install it. + +``` +$ apt-install libicu-dev +$ ./go build +$ ./zk -h ``` ## Related projects