-
Notifications
You must be signed in to change notification settings - Fork 30
How to compile custom OT server source
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
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.
See this guide.
Important: Do not perform any of these steps as root! Use the
otsmanager
user.
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 the service file properly to start your executable file.
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:
sed -i 's/it->leaf()/it->path().filename().string()/g' *.cpp
sed -i 's/#define BOOST_FILESYSTEM_VERSION 2/#define BOOST_FILESYSTEM_VERSION 3/g' definitions.h
sed -i 's/ -lxml2$/ -lxml2 -lpthread/' Makefile
Then proceed to configure
and make
your binary.
Powered by Spigu.net Team | Get OTS Hosting Service with support | Visit our Otland Thread