• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Compiling Compiling on Ubuntu

Master-m

Need help? Just ask!
Senator
Joined
May 28, 2007
Messages
4,338
Reaction score
16
Location
The Netherlands
This tutorial was written by Deathplanter.



Hello,


I don't looked at OTServ forums from some time, but today finally I looked, and I saw that there aren't any instructions how to Compile SVN in Ubuntu ( Linux ). This method is other than official ./configure && Make, which just don't work..

WARNING:
In this Tutorial we are using Ubuntu 6.10 Edgy Eft ONLY!

1. First, we download necessary libraries:
Code:
sudo apt-get install  pkg-config libboost-dev  libboost-regex-dev  libboost-regex1.33.1  libboost-thread-dev  libboost-thread1.33.1  liblua5.1-0  liblua5.1-0-dev  lua5.1 subversion g++ libnumerix-ocaml libnumerix-ocaml-dev libxml2  libxml2-dev libmysqlclient15-dev libsqlite3-dev

If you can't download any from this libraries, we need to write after /etc/apt/sources.list this:
Code:
deb http://pl.archive.ubuntu.com/ubuntu/ edgy universe
deb-src http://pl.archive.ubuntu.com/ubuntu/ edgy universe
deb http://pl.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb-src http://pl.archive.ubuntu.com/ubuntu/ edgy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu edgy-security universe
deb-src http://security.ubuntu.com/ubuntu edgy-security universe
deb http://archive.ubuntu.com/ubuntu/ edgy universe multiverse

When we save file with changes, we enter in sudo apt-get update and we do this long update again.

2. We download newest SVN.

3. Delete exception.h and exception.cpp, also databasemysql.cpp and databasemysql.h
Code:
rm exception.* databasemysql.*

4. In file definitions.h delete including the file exception.h

5. Open:
Code:
g++ -DHAVE_CONFIG_H -  -I/usr/include/libxml2  -I/usr/include//lua5.1    -D_THREAD_SAFE -D_REENTRANT -Werror -g -O2 -c *.cpp
g++ -I/usr/include/libxml2  -I/usr/include//lua50    -D_THREAD_SAFE -D_REENTRANT -Werror -g -O2  -o otserv *.o -L/usr/lib -lxml2  -llua5.1  -lboost_thread-gcc-mt-1_33_1 -ldl -lboost_regex-gcc-1_33_1 -lboost_regex-gcc-mt-1_33_1 -lgmp

6. Look if compilation is working:
Code:
sudo ./otserv

There need to appear a window with this text:
Code:
OTServ executed as root user, please login with a normal user.

6. If it will appear, we terminate the instalation!
Code:
mkdir ~/.otserv
cp otserv ~/.otserv
cp -R data ~/.otserv
cp -R config.lua.dist ~/.otserv/config.lua

7. To open this server, we use command:
Code:
~/.otserv/otserv

***Configuration of source***

In our OTServ we can change XML to SQL or SQLite. To do it, in definitions.h we write after:
Code:
#define __OTSERV_DEFINITIONS_H__

this ( MySQL ):
Code:
#define __USE_MYSQL__ 1

Or this if we want SQLite
Code:
#define __USE_SQLITE__ 1

If we want to open OTServer from root:
Code:
#define __ROOT_PERMISSION__ 1

Tutorial works at all Debian's, like knopix, debian, *ubuntu, etc... Bik~
 
Igr0 said:
Has he given you the permission to post it here? :O

I dont even know who that guy is XD
But I think it is usefull and I think he doesnt care because I give his credits, but if anyone of you know him and he says he doesnt want it than I will remove it..
 
The tutorial won't work on Debian, or atleast I don't think so, I think it only works on Ubuntu.
 
Back
Top