This guide describes how to get TrinityCore running on macOS. macOS 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.
So we gonna set up a profile file which extends the default PATH and create a folder for the TrinityCore stuff:
mkdir ~/Trinity
nano ~/.profile
Add the following lines:
export TRINITY=/Users/<Username>/Trinity
export PATH=$TRINITY/bin:$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.
curl -o ~/.gitcompletion "https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash"
nano ~/.profile
Add the following line:
source ~/.gitcompletion
Press Ctrl+O followed by Ctrl+X to save and close the file. Done. Quit the terminal application and restart it.
You successfully installed all the dependencies. Now it's time to install the server.
cd $TRINITY
git clone https://github.com/TrinityCore/TrinityCore.git repo
mkdir build
cd build
Generate the make project files using CMake:
cmake $TRINITY/repo \
-DCMAKE_INSTALL_PREFIX=$TRINITY \
-DWITH_WARNINGS=1
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"
make -j X(number of cores)
make install
cd $TRINITY/repo
git reset --hard
git pull --rebase
Repeat the steps described in "Building the binaries".