The client is in this repo.
If you're using Windows or Docker environment, skip the following content and see install using docker.
TL;DR
The development environment is Ubuntu 20.04, other linux release should also work.
All the dependencies can be installed using apt
.
sudo apt install \
libxerces-c-dev \
libmysqlclient-dev \
liblua5.1-dev
Compile is easy, just call:
make
or make -j 8
if you have a 8 cores CPU computor to accelerate the compilation.
MySQL 5.7 or 8 are tested.
Create a user 'elcastle'@'%' with password 'elca110'
Create the DARKEDEN
and USERINFO
database:
create database DARKEDEN;
create database USERINFO;
Make sure the sql_mode
allow zero date time, remove the NO_ZERO_DATE
from the sql_mode
.
And also remove the STRICT_TRANS_TABLES
from it to workaround a guild related issue :
mysql> select @@global.sql_mode;
+-------------------------------------------------------------------------------------------------------------------------------------------+
| @@global.sql_mode |
+-------------------------------------------------------------------------------------------------------------------------------------------+
| ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> set @@global.sql_mode = 'ONLY_FULL_GROUP_BY,NO_ZERO_IN_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION';
Query OK, 0 rows affected (0.02 sec)
Then load the SQL file initdb/DARKEDEN.sql
and initdb/USERINFO.sql
:
mysql -h 127.0.0.1 -u elcastle -D 'DARKEDEN' -p < initdb/DARKEDEN.sql
mysql -h 127.0.0.1 -u elcastle -D 'USERINFO' -p < initdb/USERINFO.sql
Update the DARKEDEN.WorldDBInfo
and DARKEDEN.GameServerInfo
table to set the correct IP/PORT().
You need to change the configure files in the conf/
directory.
HomePath
should be the repository directory path.
The DB_HOST
should be you database IP address, LoginServerIP
should also be changed accordingly.
DON'T forget the DARKEDEN.WorldDBInfo
and DARKEDEN.GameServerInfo
tables in the database, they are not in the configure files, but the data should match, otherwise you can't login.
Start the loginserver, sharedserver, gameserver in order:
./bin/loginserver -f ./conf/loginserver.conf
./bin/sharedserver -f ./conf/sharedserver.conf
./bin/gameserver -f ./conf/gameserver.conf