I strongly recommend that you choose to install and configure WSL2, and then build into WSL on Ubuntu 20.04.
Compiling on Ubuntu 20.04
There is a TFS 1.2 server compilation tutorial available on the
project page wiki on github. It is possible to compile following the official guide, however, at some point, some errors will occur and need to be fixed. That way, follow the step by step to compile the server without any problems.
Installing Dependencies
It is possible to install all dependencies at once, in a single command, however, I recommend installing them one by one:
Bash:
sudo apt update
sudo apt install git
sudo apt install cmake
sudo apt install build-essential
sudo apt install libluajit-5.1-dev
sudo apt install libmysqlclient-dev
sudo apt install libboost-system-dev
sudo apt install libboost-iostreams-dev
sudo apt install libboost-filesystem-dev
sudo apt install libpugixml-dev
sudo apt install libcrypto++-dev
sudo apt install libfmt-dev
sudo apt install llvm
sudo apt install libmpfr-dev
sudo apt install libgmp-dev
sudo apt install libboost-all-dev
After installing the dependencies, you will need to rename the luajit library directory. To do so, navigate to
/usr/include
and run the following command:
Bash:
sudo cp -R luajit-2.1 luajit
Cloning the Server Repository
Once the dependencies have been installed, we can clone the Nostalrius project. To do this, just clone the repository via the command line:
Bash:
sudo git clone https://github.com/Ezzz-dev/Nostalrius.git
Compiling the Server
First, navigate to the cloned repository:
Now, let's create the folder that cmake will use to compile the server:
Bash:
sudo mkdir build
cd build
sudo cmake ..
If everything happens without any errors, the server is ready to be compiled. To compile, just run the command:
If everything goes as expected and the build is successful, an executable named
tfs
will be created inside the
build
folder. In order to be able to run the server, the
tfs
file must be copied out of the
build
folder, making it available in the root of the server:
Once this is done, the server will be ready to run.
Why i recommend you to do this way? Because you can use it with docker and it will always work... You will not have to mantain different visual studio versions, and manage lot of versions and packges all together and installed on your windows. The best thing is: when you deploy your server on some cloud machine, you can use this same way to do in a linux cloud machine.