-
Notifications
You must be signed in to change notification settings - Fork 163
Building from source
First, install the required dependencies for the build:
sudo apt install git build-essential cmake qtbase5-dev qtbase5-dev-tools libqt5svg5-dev
Run the following commands to clone the Cute Chess repository and build the source:
git clone https://github.com/cutechess/cutechess.git
cd cutechess
mkdir build
cd build
cmake ..
make
You may want to use the Ninja build backend (sudo apt install ninja-build) to speedup the build:
...
cmake -G Ninja ..
ninja
Optionally, you can create plain-text and HTML versions of the manuals with mandoc:
sudo apt install mandoc
cd cutechess
mandoc -Tascii docs/cutechess-cli.6 | col -b > docs/cutechess-cli.6.txt
mandoc -Tascii docs/engines.json.5 | col -b > docs/engines.json.5.txt
mandoc -Thtml -Ostyle=man-style.css docs/cutechess-cli.6 > docs/cutechess-cli.6.html
mandoc -Thtml -Ostyle=man-style.css docs/engines.json.5 > docs/engines.json.5.html
There are several ways to install Qt on macOS. The most common installation methods are using the official Qt installer or through Homebrew. These instructions assume Homebrew.
First, install Homebrew. The Homebrew installation will go through installing the Xcode command-line tools which include git and the required build environment.
Install Qt and CMake with Homebrew:
brew install qt cmake
Run the following commands to clone the Cute Chess repository and build the source:
git clone https://github.com/cutechess/cutechess.git
cd cutechess
mkdir build
cd build
cmake ..
make
You may want to use the Ninja build backend (brew install ninja) to speedup the build:
...
cmake -G Ninja ..
ninja
Optionally, you can create plain-text and HTML versions of the manuals with mandoc:
brew install mandoc
cd cutechess
mandoc -Tascii docs/cutechess-cli.6 | col -b > docs/cutechess-cli.6.txt
mandoc -Tascii docs/engines.json.5 | col -b > docs/engines.json.5.txt
mandoc -Thtml -Ostyle=man-style.css docs/cutechess-cli.6 > docs/cutechess-cli.6.html
mandoc -Thtml -Ostyle=man-style.css docs/engines.json.5 > docs/engines.json.5.html
There are several compiler options on Windows. The most common ones are GNU GCC and Microsoft Visual Studio C/C++ compiler. These instructions assume GCC through MinGW.
First, install Qt. Select MinGW (32-bit or 64-bit depending on your OS) during installation.
The quickest way to get the Cute Chess source code on Windows is to download the source code archive either from the master branch or from one of the releases. Installing Git on Windows is out of scope of this document.
You may use the Qt Creator tool to build Cute Chess. Qt Creator is installed by default when you use the Qt installer. Open the CMakeLists.txt in Qt Creator and click Build - Build project "cutechess". Click Build - Open Build and Run Kit Selector... to switch between running the command-line and GUI versions of Cute Chess.