Installation
First, clone craftium using the --recurse-submodules flag (important: the flag fetches submodules needed by the library) and cd into the project's main directory:
git clone --recurse-submodules https://github.com/mikelma/craftium.git # if you prefer ssh: git@github.com:mikelma/craftium.git
cd craftium
craftium depends on Luanti, which in turn, depends on a series of libraries that we need to install. Luanti's repo contains instructions on how to setup the build environment for many Linux distros (and MacOS. In Ubuntu/Debian the following command installs all the required libraries:
sudo apt install g++ make libc6-dev cmake libpng-dev libjpeg-dev libgl1-mesa-dev libsqlite3-dev libogg-dev libvorbis-dev libopenal-dev libcurl4-gnutls-dev libfreetype6-dev zlib1g-dev libgmp-dev libjsoncpp-dev libzstd-dev libluajit-5.1-dev gettext libsdl2-dev
Additionally, craftium requires Python's header files to build a dedicated Python module implemented in C (mt_server):
sudo apt install libpython3-dev
Then, check that setuptools is updated and run the installation command in the craftium repo's directory:
pip install -U setuptools
and,
pip install .
This last command should compile Luanti, install python dependencies, and, finally, craftium. If the installation process fails, please consider submitting an issue here. Note that this command only installs the minimum dependencies to run craftium, execute pip install ".[examples]" for installing optional dependencies (e.g., for running examples).