linux编译trinitycore,TC编译步骤之二代码安装

该楼层疑似违规已被系统折叠 隐藏此楼查看此楼

Getting started

Before you get scared by this long guide, we assure you the procedure is quite simple. Most of the following steps are to be performed only the first time you install Trinity and only the Trinity updating procedures will need to be run from time to time.

Required Software

See Requirements

Pulling & Compiling the SourcePulling the Source

Create a directory in which Core files will be pulled (for example: C:\Trinity).

Right-click on the directory and click on Git Extensions -> Clone.

Fill in the data as follows:

1、3.3.5

Repository to clone: https://github.com/TrinityCore/TrinityCore

Destination: C:\Trinity

Subdirectory to create:

Branch: 3.3.5

Personal Repository: Yes

2、6.x

Repository to clone: https://github.com/TrinityCore/TrinityCore

Destination: C:\Trinity

Subdirectory to create:

Branch: 6.x

Personal Repository: Yes

This will clone 6.x branch, note that this is NOT the recommended branch for starters.

Click Clone. Within a few minutes all of the TrinityCore source files will be pulled into the directory C:\Trinity.

Contents

Configuring and generating Visual C++ solutions with CMake

Before you begin, create an empty directory called Build. In this example, we will use D:\Build.

Note: If CMake do not recognize C/C++ compiler, choose Specific Native Compiler, and choose path to target vcvarsall.bat, e.g. C:\Program Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat

Files\Microsoft Visual Studio 12.0\VC\vcvarsall.bat

Click Browse Source... -> Select the source directory (C:/Trinity) 2. Click Browse Build... -> Select the build directory (D:/Build) 3. Click Configure

4. Make sure Use default native compilers is checked 5. In the drop-down menu, choose the version of the compiler you downloaded in the Software Required section . 6. Click Finish.

7. Make sure Tools is checked. This will compile the map extractors needed later in the setup. 8. Click Configure again. 9. Click Generate. This will install the selected build files into your D:/Build folder.

Note: If MySQL is not found by CMake it is required to set MYSQL_INCLUDE_DIR = C:/mysql_libs/include and MYSQL_LIBRARY= C:/mysql_libs/lib_XX/libmysql.lib.

XX depends if you are compiling in 32 or 64 bits mode. (See the 9th point of the Windows requirement list in Requirements.)

Note 2: If you get linker errors (e.g "error LNK2019: unresolved external symbol mysql_server_init"), make sure MYSQL_LIBRARY is set to the libmysql.lib that matches your compile mode (x64 vs 32 bits).

(If you do not see the MYSQL fields in CMake, tick the Advanced box).

Tip: Use the WITH_SOURCE_TREE option to enable a pretty source tree structure in Visual Studio:

no source tree: flat: hierarchical:

Compiling the Source

Browse into your D:\Build folder and open TrinityCore.sln with Visual C++ Community.

On the menu at the top, click Build and select Configuration Manager.

Set Active Solution Configuration to Release

In the list menus below "Help", set Active Solution Platform to Win32 (if you set 64-bit compilation during the CMake configuration, select Win64)

click Close (settings get saved instantly).

Right-click ALL_BUILD in the Solution Explorer on the left sidebar and select Clean .

(on some VS2013 versions, click the Build menu and select Clean Solution.)

Right-click ALL_BUILD and select Build.

Compilation length differs from machine to machine, you should expect it to take 5-30 minutes.

If you are asked to "Reload build files" during the compile, do so.

When the build is complete, you will find a message similar to the one below (the numbers may be different).

========== Build: 22 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

You will find your freshly compiled binaries in the C:\Build\bin\Release or C:\Build\bin\Debug folder. These are all used to run your server at the end of this instruction.

You will need the following files in order for the core to function properly:

libeay32.dll

libmySQL.dll

ssleay32.dll

worldserver.conf.dist

worldserver.exe

authserver.conf.dist

authserver.exe

There are a few DLLs that needs to be manually added to this folder, and you need to copy them over from the following installation/bin directories:

libmySQL.dll - C:\Program Files\MySQL\MySQL Server 5.x\lib

libeay32.dll, ssleay32.dll - C:\OpenSSL-Win32\bin

libzmq-v120-mt-4_0_4.dll - C:\Program Files\ZeroMQ 4.0.4\bin

Keeping the Source Up-to-Date

TrinityCore Developers are always at work fixing and adding new features to the core. You can always check them here, or by viewing them from within Git Extensions.

Open your TrinityCore repository in GitExtensions.

Click on the blue arrow

In the new window, click Pull.

This will sync your local repo to the latest commits from the branch you have setup as default.

Now you will need to re-run CMake Configure & Generate to update your SLN files.

Compile

??

Profit!!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值