better installation instructions

This commit is contained in:
Maximilian Keßler 2023-09-22 18:57:38 +02:00
parent f300c61c81
commit bc3af305ea
Signed by: max
GPG key ID: BCC5A619923C0BA5

View file

@ -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. 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. 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 cmake -DCMAKE_BUILD_TYPE=RELEASE . // Release build recommended for performance, unless you want to develop
make // Rerun this every time you change sources 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 ## Usage
``` ```
# ./endgame-analyzer (GAME_ID | GAME_FILE) TURN # ./endgame-analyzer (GAME_ID | GAME_FILE) TURN