- Joined
- Dec 11, 2007
- Messages
- 3,666
- Solutions
- 1
- Reaction score
- 125
- Location
- Warsaw, Poland
- GitHub
- tayandenga
- Twitch
- tayandenga
I would like to note its my own guide, not copied from any other site, though, I gathered everything needed from many other tutorials- when compiling for the first time at my own server.
I want also to doubt success on other debian-like distributions just because I didn't test them, but it shouldn't fail.
It surely works, beause I can compile everything starting TFS 0.3 through otserv, so if it doesn't for You, then its probably only Your fault.
Okay, here it goes.
Pre. If you're using Ubuntu and you aren't logged on root user, do it by following command and type your password:
1. On the begining, you need to update your packets database, then upgrade your operating system.
If update fails, you have to increase apt cache size. To do it, perform following actions:
and paste there:
Now press F2 to close Nano and answer YES/NO to save the file.
2. Now you have to install some (maybe even alot of them ) packets.
If your apt says some packages are missing, make sure you have set repositories in /etc/sources.list. After you fix things around (distribution-independent), perform again step 1.
3. Ok, you have installed everything required to compile- easy, huh? Now you may do 'the job'.
Here's an compilation example for TFS 0.3.5pl1:
NOTE! If you are trying to compile TFS 0.2, please skip the step 6 (with autogen) and 7 (with configure) and finish with step 8 (just type make).
If you receive a linker error saying something with 'libboost', try pasting the following commands to terminal and then move back to compiling again:
4. Congratulations! You've just compiled your engine. Yet you need to move files from 'source' directory...
Now its up to run, you just have to configure it
NOTE! If you're trying to run 0.2, please use the following:
I want also to doubt success on other debian-like distributions just because I didn't test them, but it shouldn't fail.
It surely works, beause I can compile everything starting TFS 0.3 through otserv, so if it doesn't for You, then its probably only Your fault.
Okay, here it goes.
Pre. If you're using Ubuntu and you aren't logged on root user, do it by following command and type your password:
Code:
sudo su
1. On the begining, you need to update your packets database, then upgrade your operating system.
Code:
apt-get update
Code:
apt-get upgrade
Code:
cd /etc/apt
Code:
pico apt.conf
Code:
APT::Cache-Limit "125829120";
2. Now you have to install some (maybe even alot of them ) packets.
Code:
apt-get install libboost1.41-dev libboost-system1.41-dev libboost-filesystem1.41-dev libboost-date-time1.41-dev libboost-regex1.41-dev libboost-thread1.41-dev libgmp3-dev liblua5.1-0 liblua5.1-0-dev liblua50 liblua50-dev liblualib50 liblualib50-dev lua50 lua5.1 libsqlite0-dev libsqlite3-dev sqlite3 libmysql++-dev libmysqlclient-dev mysql-client-5.1 mysql-server-5.1 mysql-common libxml2-dev libxml++2.6-dev cpp gcc g++ make automake autoconf pkg-config subversion liblua5.1-sql-mysql-dev liblua5.1-sql-sqlite3-dev zlib1g-dev zlib1g libcrypto++-dev libcrypto++8
3. Ok, you have installed everything required to compile- easy, huh? Now you may do 'the job'.
Here's an compilation example for TFS 0.3.5pl1:
Code:svn co http://svn.otland.net/public/forgottenserver/tags/0.3.5pl1
Code:mv 0.3.5pl1 source
Code:mkdir forgottenserver
Code:mv source forgottenserver
Code:cd forgottenserver
Code:./autogen.sh
Code:./configure --enable-mysql --enable-sqlite --enable-remote-control --enable-server-diag
Code:make
NOTE! If you are trying to compile TFS 0.2, please skip the step 6 (with autogen) and 7 (with configure) and finish with step 8 (just type make).
If you receive a linker error saying something with 'libboost', try pasting the following commands to terminal and then move back to compiling again:
Code:
cd ~
Code:
wget http://garr.dl.sourceforge.net/sourceforge/asio/boost_asio_1_0_0.tar.gz
Code:
tar -xzf boost_asio_1_0_0.tar.gz
Code:
cp -ar boost_asio_1_0_0/boost/* /usr/include/boost/
Code:
g++ boost_asio_1_0_0/libs/system/src/error_code.cpp -c -o /usr/lib/libboost_system.a
Code:
ln /usr/lib/libboost_date_time-mt.so /usr/lib/libboost_date_time.so
Code:
ln /usr/lib/libboost_date_time-mt.a /usr/lib/libboost_date_time.a
Code:
ln /usr/lib/libboost_filesystem-mt.so /usr/lib/libboost_filesystem.so
Code:
ln /usr/lib/libboost_filesystem-mt.a /usr/lib/libboost_filesystem.a
Code:
ln /usr/lib/libboost_regex-mt.so /usr/lib/libboost_regex.so
Code:
ln /usr/lib/libboost_regex-mt.a /usr/lib/libboost_regex.a
Code:
ln /usr/lib/libboost_thread-mt.so /usr/lib/libboost_thread.so
Code:
ln /usr/lib/libboost_thread-mt.a /usr/lib/libboost_thread.a
Code:
ldconfig
Code:
cd ~
Code:
rm -rf boost_asio_1_0_0
4. Congratulations! You've just compiled your engine. Yet you need to move files from 'source' directory...
Code:
mv data doc mods schemas config.lua forgottenserver.s3db theforgottenserver theforgottenserver.s3db ..
NOTE! If you're trying to run 0.2, please use the following:
Code:
mv data doc config.lua forgottenserver.s3db forgottenserver.sql schema.sqlite forgottenserver ..
Last edited: