Compiling on Windows
The purpose of this document is to:
-
Walk users through how to build TSWoW from source
-
Document important details and common issues
Prerequisites
All other dependencies can be installed during the installation.
Installation
When building TSWoW from source, we are concerned about three directories:
-
The
source
directory is the root directory containing all source code used to build TSWoW. -
The
build
directory contains all intermediate files and build configurations -
The
install
directory is where we install TSWoW
The source, build and install directories should all be separate. Do not place any of them inside any of the others. The recommended setup is to have a tswow-root
containing all three folders.
-
Run the following command (optionally in a new empty folder):
git clone https://github.com/tswow/tswow.git --recurse
-
This will create the
source
directory, called “tswow”. -
This download is expected to take some time.
-
-
Copy
source/build.default.yaml
tosource/build.yaml
and open it. Here you can configure where tswow should placebuild
andinstall
directories.- Do not set
install
to point at your normal TSWoW installation unless you know what you’re doing, it will frequently flush out all your settings and modules!
- Do not set
-
In the
source
directory, run the commandnpm i
-
In the
source
directory, run the commandnpm run build-interactive
(to build everything without an interactive prompt, usenpm run build
). -
Install dependencies (TSWoW expects these to be in the
build
directory, so you need most even if you normally compile TrinityCore- Install Boost
- The typical path to install this to is
C:\local\boost_1_72_0
- Open an elevated command prompt and type this command:
"setx BOOST_ROOT C:/local/boost_1_72_0" /M
(replacing the path with your boost path) - Should not be necessary if you can already compile TrinityCore
- The typical path to install this to is
- Install CMake
- Install it to
build/cmake
(The pathbuild/cmake/cmake-3.18.3-win64-x64
should exist)
- Install it to
- Install OpenSSL v1.1.1
- Set installation path to
build/openssl
- Set it to copy OpenSSL binaries to “The OpenSSL binaries (/bin) directory”.
- Set installation path to
- Install MySQL v5.7.32-x64
- Extract it to
build/mysql
(The pathbuild/mysql/mysql-mysql-5.7.32-winx64
should exist)
- Extract it to
- Install blpconverter
- Place it at
build/blpconverter.exe
- Place it at
- Install Boost
-
You should now have entered the main TSWoW build program. You can now build any components you want
-
All TypeScript for TSWoW and the transpiler is compiled automatically as long as the build program is running
-
We currently have a bug where the prompt doesn’t allow you to enter anything. Restarting the build script seems to fix this for now.
-
-
To get a fully working TSWoW installation, you can run the
build full
command, which will compile TrinityCore and all other components necessary.- To build only TrinityCore, you can use the command
build trinitycore-relwithdebinfo
- To build only TrinityCore, you can use the command
-
You should now be able to start TSWoW from the new installation folder.
Known Issues
-
build release
doesn’t work with a normalinstall
directory. To build a release, you must run turn off the build script, change the install directory to an empty/non-existing directory insource/build.yaml
and start the build script again.- This new directory can not be open in VSCodium/VSCode.