The server already has all required libraries and packages to compile any popular OTS engine, including:
- TFS 0.2/0.3/0.4/1.X
- theotxserver
- otserv
Compiling TFS 1.X
Your server is preinstalled with latest TFS 1.X already.
If you want to know how to do that manually, please see the official guide.
Compiling old/unsupported versions (e.g. r3884)
See this guide.
Compiling TFS 0.X/theotxserver
Important: Do not perform any of these steps as root! Use the
otsmanageruser.
The general workflow to compile the server is as follows:
- Unpack/upload the source to a directory in your home, e.g. to /home/otsmanager/ots
- Enter the directory:
cd ~/ots - Run autogen.sh:
chmod +x autogen.sh; ./autogen.sh
Note: it's possible this file doesn't exist, then it's not necessary to run it. - Run configure:
chmod +x configure; ./configure --enable-mysql --enable-server-diag
Note: it's possible this file doesn't exist, then it's not necessary to run it. - Run make:
make
After the compilation is complete, you should figure out what is the name of the executable.
You will then need to adjust service file properly to start your executable file.
Troubleshooting
-
My TFS 0.3/0.4 source is complaining about deprecated it->leaf() function calls
Try running the following commands to automatically fix your code:
1sed -i 's/it->leaf()/it->path().filename().string()/g' *.cpp 2sed -i 's/#define BOOST_FILESYSTEM_VERSION 2/#define BOOST_FILESYSTEM_VERSION 3/g' definitions.h 3sed -i 's/ -lxml2$/ -lxml2 -lpthread/' MakefileThen proceed to
configureandmakeyour binary.