Versiones comparadas

Clave

  • Se ha añadido esta línea.
  • Se ha eliminado esta línea.
  • El formato se ha cambiado.


ПУТИН В.В. ?

Panel
borderColor#3399cc
bgColor#DCF1FC
titleColor#FFFFFF
titleBGColor#3399cc
borderStylesolid
titleGuide

This article is part of the Installation Guide. You can read it alone or click on the previous link to easily move between the steps.

Sección


Columna

<< Step 1: Requirements


Columna

Step 3: Server Setup >>




Sección


Columna

Getting started

This how-to will attempt to help with TrinityCore, and also show how this can be done in a way that also shows you the basics of how linux compilations works.

Info
Most of this how-to is based on the use of a Debian based distribution, though we'll try to inform as best as we can when something differs totally.


Info
titleHint

DON'T clone, compile or run server as sudo or root.


Advices:

  • Read your distributions' documentation on how to install packages, and also have at least knowledge on how it works with regards to adding users.*
  • Run/install TrinityCore on a dedicated machine, or a machine that you know you have full control over.
  • Do NOT install the software on a shared server solution or any server where other users may have access or might require resources to be available at all times.


Your server may be abruptly killed by an angry administrator or system staff or by system restrictions for overuse of system resources and you willl see something like:

collect2: fatal error: ld terminated with signal 9 [Killed] compilation terminated.

you will need to use less jobs (make -j1) or increase swap.

Creating a user to work with

Start with logging in to your Linux-machine and create an account for the server itself - on most recent distributions this can easily be done with the following command :

Bloque de código
sudo adduser <username>

Note : Change <username> into the preferred username of your server-account - we will as far as possible avoid using specific usernames in this how-to.

Sample usernames found in various parts of this guide: wow , trinity ( - select a logical name that makes sense to you when creating the user - ).

Bloque de código
sudo su - <username>

Note : Change your current user to <username> so everything will run and compile with the user you just have created.

Required software

See Requirements


Columna


Panel
borderColor#BBB
bgColor#F0F0F0
borderStylesolid

Content

Tabla de contenidos




Building the server itself

Getting the source code

3.3.5 (wotlk client)
Bloque de código
cd ~/
git clone -b 3.3.5 git://github.com/TrinityCore/TrinityCore.git 

This will clone 3.3.5a branch, this is the  RECOMMENDED  branch for starters.

master (legion client)
Bloque de código
cd ~/
git clone -b master git://github.com/TrinityCore/TrinityCore.git 

...

Nota

FreeBSD users will need to apply the patch located here for g3d to compile properly, before doing anything else.

Compiling the source code

Creating the build-directory

To avoid issues with updates and colliding source builds, we create a specific build-directory, so we avoid any possible issues due to that (if any might occur)

Bloque de código
cd TrinityCore
mkdir build
cd build

Configuring for compiling

To configure the core, we use space-separated parameters attached to the configuration-tool (cmake) - do read the entire section before even starting on the configuration-part.
This is for your own good, and you HAVE been warned. A full example will also be shown underneath the explanations.

...

Expandir
titleParameter explanations (advanced users) (expand)

Parameter explanations

 

path to your OpenSSL library - use if you have OpenSSL installed system wide with a different version to 1.0.x:

 

Panel

-DOPENSSL_LIBRARIES=<path to OpenSSL library>

path to your OpenSSL includes directory - use if you have OpenSSL installed system wide with a different version to 1.0.x:

Panel

-DOPENSSL_INCLUDE_DIR=<path to OpenSSL includes>

 

ParameterValuesUsageDefault

DSCRIPTS

DSCRIPTS_COMMANDS

DSCRIPTS_CUSTOM

DSCRIPTS_EASTERNKINGDOMS
DSCRIPTS_EVENTS
DSCRIPTS_KALIMDOR
DSCRIPTS_NORTHREND
DSCRIPTS_OUTDOORPVP
DSCRIPTS_OUTLAND
DSCRIPTS_PET
DSCRIPTS_SPELLS
DSCRIPTS_WORLD


  • "none": Disables all scripts
  • "static": - Builds all scripts statically. (this is the old -DSCRIPTS=1 option).
  • "dynamic": - Builds all scripts dynamically (Experimental feature).
  • "minimal-static": Builds Commands and Spells statically, disables other scripts (this is the old -DSCRIPTS=0 option).
  • "minimal-dynamic": Builds Commands and Spells dynamically, disables other scripts.

DSCRIPTS modules

  • "default": Inherit DSCRIPTS value.
  • "disabled": Disables the building of the given module.
  • "static": Compiles the given module as a static library.
  • "dynamic": Compiles the given module as a dynamic library.





-DSCRIPTS="dynamic"


-DSCRIPTS_COMMANDS="default"


-DSCRIPTS_OUTDOORPVP="disabled"


-DSCRIPTS_PET="static"




"static"

DTOOLS
  • 1: Builds map/vmap/mmap etractor/assembler and connection_patcher (6.x)
  • 0: Disables the building of tools.
-DTOOLS=0

1

DSERVERS
  • 1: Builds authserver and worldserver.
  • 0: Disables the building of servers.
-DSERVERS=11
DCMAKE_INSTALL_PREFIX

Path to the directory where TrinityCore will be installed. Required for script hotswapping.

-DCMAKE_INSTALL_PREFIX=/home/trinitycore/bin

/usr/local
DWITH_WARNINGS
  • 1: Show all warning during compile. (Advanced users only)
  • 0: Disable most warnings during compile.
-DWITH_WARNINGS=10
DUSE_COREPCH
  • 1: Use precompiled headers when compiling servers.
  • 0: Disables precompiled headers during servers compilation. (Advanced users only)
-DUSE_COREPCH=01
DUSE_SCRIPTPCH
  • 1: Use precompiled headers when compiling scripts.
  • 0: Disables precompiled headers during servers compilation. (Advanced users only)
-DUSE_SCRIPTPCH=01
DCONF_DIRSets configuration directory. (Advanced users only)-DCONF_DIR=/home/trinitycore/conf/usr/local/etc
DLIBSDIRSets libraries directory. (Advanced users only)-DLIBSDIR=/lib/usr/local/lib
DCMAKE_C_FLAGSSet C_FLAGS for compilation. (Advanced users only)

-DCMAKE_C_FLAGS="-msse3 -O3"


DCMAKE_CXX_FLAGSSet CXX_FLAGS for compilation. (Advanced users only)-DCMAKE_CXX_FLAGS="-std=c++11 -O0"


...

Note that you WILL have to configure the server well if you ever want to use the RA-access functionality.

 

Building the core

 

After configuring and checking that everything is in order (read cmakes output), you can build Trinity (this will take some time unless you are on a rather fast machine)

...

After compiling and installing, you will find your core binaries in /home/<username>/server/bin, and the standard configuration files in the /home/<username>/server/etc folder.
 (As usual, replace <username> with the username you created earlier). Now you can continue reading on and learn how how to update the source tree.

Keeping the code up to date

TrinityCore developers are always at work fixing and adding new features to the core. You can always check them here. To update the core files, do the following :

...

Now return to the compilation-section again, and repeat the instructions there.

Installing MySQL Server

When configuring MySQL make sure you remember the password you set for the default root account and that you enabled both MyISAM and InnoDB engines.

SPECIAL NOTES! you don't need to read this unless you want to do custom instalations.

Things to notice :

Panel

-DWITH_COREDEBUG=0 not required, this flag is only for core developers as its default is : 0 it may cause crashes if using on production environments if you want to compile core on debug mode you need to use -DCMAKE_BUILD_TYPE=Debug

...