-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Compiling on Linux & Mac OS X (vcpkg)
Ranieri Althoff edited this page Jun 5, 2024
·
2 revisions
To download, build, and run The Forgotten Server on Linux or Mac OS X using vcpkg, follow these steps:
You need the following software installed before proceeding:
- A Linux or Mac OS X system with a shell (terminal) access.
git
pkg-config
-
cmake
>= 3.19 -
g++
>= 10.5 orclang++
>= 12.0
- Clone the vcpkg repository:
git clone https://github.com/microsoft/vcpkg.git "$HOME/vcpkg"
cd "$HOME/vcpkg"
- Bootstrap vcpkg:
./bootstrap-vcpkg.sh
- (Optional, but recommended) Integrate vcpkg with your system:
./vcpkg integrate install
- Setup environment variables
export VCPKG_ROOT="$HOME/vcpkg"
- Clone the otland/forgottenserver repository:
git clone https://github.com/otland/forgottenserver.git "$HOME/forgottenserver"
cd "$HOME/forgottenserver"
- Run CMake to configure the build:
cmake --preset vcpkg
- Build the server:
cmake --build --preset vcpkg --config RelWithDebInfo
If you already have configured your config.lua
file, copy it to the current folder ($HOME/forgottenserver
) now. Otherwise, copy config.lua.dist
to config.lua
(cp config.lua.dist config.lua
) and change it to your needs.
To run the server, execute the following:
./build/RelWithDebInfo/tfs
Note: you need a MySQL/MariaDB server running with the configuration set in config.lua
, otherwise the server will not start.