Panel |
---|
borderColor | #3399cc |
---|
bgColor | #DCF1FC |
---|
titleColor | #FFFFFF |
---|
titleBGColor | #3399cc |
---|
borderStyle | solid Info |
---|
| 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 |
---|
|
Getting started
This guide describes how to get TrinityCore running on OS X. OS X ships with several libraries including OpenSSL and a special version of Readline - both required by TrinityCore. But: They are useless. OpenSSL is too old and Readline is... well... special. So we have to build the right ones. This is fairly easy and by doing this on your own (using programs like MacPorts or Homebrew is the alternative) you may learn more about libraries, your Mac and its handling on a non-graphic way. But no matter what you're doing in this guide there is one rule you should remind and never ever break:
DO NOT INSTALL ANYTHING YOU BUILD IN THIS GUIDE TO A SYSTEM-RELEVANT PATH! Rather use a path in your home directory.
We're going to put all the TrinityCore stuff to your home directory in the next step, even the installed binaries. We need to tell TrinityCore where its libraries are installed to. Further I guess you simply want to type "cmake" or "mysql" instead of "/Users/<Username>/Trinity/bin/cmake" or "/usr/local/mysql/bin/mysql". So we gonna set up a profile file which extends the default PATH and DYLD_LIBRARY_PATH variable and create a folder for the TrinityCore stuff:
Bloque de código |
---|
mkdir ~/Trinity
nano ~/.profile |
Add the following lines:
Bloque de código |
---|
export TRINITY=/Users/<Username>/Trinity
export PATH=$TRINITY/bin:/usr/local/mysql/bin:$PATH
export DYLD_LIBRARY_PATH=$TRINITY/lib:/usr/local/mysql/lib:$DYLD_LIBRARY_PATH |
Press Ctrl+O followed by Ctrl+X to save and close the file. Done. Quit the terminal application and restart it.
There is also an autocompletion script for git which can be downloaded and included here.
Bloque de código |
---|
curl -o ~/.gitcompletion "https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
nano ~/.profile |
Add the following line:
Bloque de código |
---|
source ~/.gitcompletion |
Press Ctrl+O followed by Ctrl+X to save and close the file. Done. Quit the terminal application and restart it.
Building the libraries
Open a terminal and change to your download folder. Safari automatically extracts .gz archives and leaves the tar ball.
OpenSSL
Bloque de código |
---|
tar xvf openssl-1.0.2l.tar
cd openssl-1.0.2l
./Configure darwin64-x86_64-cc shared --prefix=$TRINITY
make -j 4
make install
cd .. |
Readline
Bloque de código |
---|
tar xvf readline-7.0.tar
cd readline-7.0
./configure --prefix=$TRINITY
make -j 4
make install
cd .. |
CMake
Bloque de código |
---|
tar xvf cmake-3.9.2.tar
cd cmake-3.9.2
./bootstrap --prefix=$TRINITY
make -j 4
make install
cd .. |
Boost
Bloque de código |
---|
tar xvf boost_1_65_1.tar
cd boost_1_65_1
./bootstrap.sh --with-libraries=system,thread,program_options,filesystem,iostreams --prefix=$TRINITY
./b2 -j 4
./b2 install
cd .. |
Installing TrinityCore
You successfully installed all the dependencies. Now it's time to install the server.
Obtaining the source and preparing the build
Bloque de código |
---|
cd $TRINITY
git clone https://github.com/TrinityCore/TrinityCore.git repo
mkdir build
cd build |
Generate the Xcode project files using CMake:
Bloque de código |
---|
cmake $TRINITY/repo -G "Xcode" \
-DREADLINE_INCLUDE_DIR=$TRINITY/include \
-DREADLINE_LIBRARY=$TRINITY/lib/libreadline.dylib \
-DBOOST_INCLUDEDIR=$TRINITY/include \
-DBOOST_LIBRARYDIR=$TRINITY/lib \
-DOPENSSL_SSL_LIBRARIES=$TRINITY/lib/libssl.dylib \
-DOPENSSL_CRYPTO_LIBRARIES=$TRINITY/lib/libcrypto.dylib \
-DOPENSSL_INCLUDE_DIR=$TRINITY/include \
-DCMAKE_INSTALL_PREFIX=$TRINITY \
-DWITH_WARNINGS=1 |
Building the binaries
This step may take a while and needs to be done every time the source code changes. Afterwards you'll find the binaries in "/Users/<Username>/Trinity/bin"
Terminal
Bloque de código |
---|
xcodebuild -config Debug -jobs 4
xcodebuild -config Debug -target install |
"Debug" can be replaced by "Release" or "RelWithDebInfo"
Xcode
Open the generated "TrinityCore.xcodeproj" and select "Product" -> "Build" for a Debug build or "Product" ->"Archive" for a Release build. Do not forget to select "install" as compilation target.
Keeping the code up to date
Bloque de código |
---|
cd $TRINITY/repo
git reset --hard
git pull --rebase |
Repeat the steps described in "Building the binaries".
Panel |
---|
borderColor | #3399cc |
---|
bgColor | #DCF1FC |
---|
titleColor | #FFFFFF |
---|
titleBGColor | #3399cc |
---|
borderStyle | solid |
---|
title | Guide |
---|
|
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 3: Server Setup >>find it in our new wiki at: https://trinitycore.info/en/install/Core-Installation/macOS-core-installation |