From bc3af305ea7c6d60be4511ac25b07577c612c880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maximilian=20Ke=C3=9Fler?= Date: Fri, 22 Sep 2023 18:57:38 +0200 Subject: [PATCH] better installation instructions --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index dd5fa42..821d287 100644 --- a/README.md +++ b/README.md @@ -19,13 +19,50 @@ The build uses [CMake](https://cmake.org). Additionally, you need the following Refer to the corresponding pages for installation instructions. On Linux distributions, readline is probably already installed. Note that the libraries are all FOSS software and GPL-compatible. +For installation help, see below. -Now, building the project is quite easy: +Now, building the project is quite easy (this assumes you have installed above libraries system-wide): ``` cmake -DCMAKE_BUILD_TYPE=RELEASE . // Release build recommended for performance, unless you want to develop make // Rerun this every time you change sources ``` +### Installing the libraries +I can't provide information for all distributions, but in general it should be like the following: + +Linux systems: +- `boost` should be available as a system package via your package manager. +- `readline` should be installed already, otherwise try your package manager as well. +- `cpr` is a bit more complicated: + - On Arch, there is a package in the [AUR](https://aur.archlinux.org/packages/cpr). + - On Fedora, there is also a package via [rpm][https://src.fedoraproject.org/rpms/cpr]. + - There might be packages for other distributions, check out the [CPR project on Github](https://github.com/libcpr/cpr#packages-for-linux-distributions). + - If there is no package available for your distribution, see [below](# Installing cpr as a local CMAKE dependency) + +Mac OS: +- I recommend installing packages with [Homebrew](https://brew.sh). +- So `brew install boost cpr readline` should do the job. + +Windows: +- Currently, I have no idea regarding windows, sorry for that. + +### Installing cpr as a local CMAKE dependency +- There is also the option to install `cpr` directly as a dependency through `CMake`. + For this, replace the line + ``` + find_package(cpr) + ``` + with the lines + ``` +include(FetchContent) +FetchContent_Declare(cpr GIT_REPOSITORY https://github.com/libcpr/cpr.git + GIT_TAG 2553fc41450301cd09a9271c8d2c3e0cf3546b73) +FetchContent_MakeAvailable(cpr) + ``` + where you replace the git tag with the latest release tag from [Github](https://github.com/libcpr/cpr/releases). + You can find details on this installation method on the [cpr github page](https://github.com/lipcpr/cpr) as well. + + ## Usage ``` # ./endgame-analyzer (GAME_ID | GAME_FILE) TURN