User Tools

Site Tools


servers:windows:games:cmangos_tbc_localhost

Information

  • CMaNGOS 1)
  • The Burning Crusade 2)
  • :!: 2025/10/07: WIP

Prerequisites

Dependencies

Visual Studio 2022

  • Pause installer to prevent initial auto-download of unnecessary components

Required Components

  • Desktop development with C++ (C++ core desktop features)
  • MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
  • Windows 11 SDK (10.0.26100.4654)
"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\setup.exe"

Boost

CMake

  • [ ] Add CMake to the PATH environment variable

Download Source

"%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/cmangos/mangos-tbc.git" "%UserProfile%\Projects\CMaNGOS-tbc\src"

Databases

Connect

"%ProgramFiles%\MariaDB 12.1\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.1\data\my.ini"
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p

Databases

CREATE DATABASE tbcrealmd;
CREATE DATABASE tbccharacters;
CREATE DATABASE tbcmangos;
CREATE DATABASE tbclogs;

Users

CREATE USER 'tbcrealmd'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'tbccharacters'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'tbcmangos'@'localhost' IDENTIFIED BY 'x';
CREATE USER 'tbclogs'@'localhost' IDENTIFIED BY 'x';

Permissions

GRANT ALL PRIVILEGES ON tbcrealmd.* to 'tbcrealmd'@'localhost';
GRANT ALL PRIVILEGES ON tbccharacters.* to 'tbccharacters'@'localhost';
GRANT ALL PRIVILEGES ON tbcmangos.* to 'tbcmangos'@'localhost';
GRANT ALL PRIVILEGES ON tbclogs.* to 'tbclogs'@'localhost';
FLUSH PRIVILEGES;
EXIT

Base Imports

  • 2025/10/05: Bases all have latest updates integrated 4)
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "tbcrealmd" < "%UserProfile%\Projects\CMaNGOS-tbc\src\sql\base\realmd.sql"
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "tbccharacters" < "%UserProfile%\Projects\CMaNGOS-tbc\src\sql\base\characters.sql"
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "tbclogs" < "%UserProfile%\Projects\CMaNGOS-tbc\src\sql\base\logs.sql"

Initial Compile

CMake

"%ProgramFiles%\CMake\bin\cmake.exe" -S "%UserProfile%\Projects\CMaNGOS-tbc\src" -B "%UserProfile%\Projects\CMaNGOS-tbc\build" -G "Visual Studio 17 2022" --fresh -Wno-dev -DBOOST_ROOT="%SYSTEMDRIVE%/local/boost_1_88_0" -DMYSQL_INCLUDE_DIR="%ProgramFiles%\MariaDB 12.1\include\mysql" -DMYSQL_LIBRARY="%ProgramFiles%\MariaDB 12.1\lib\libmariadb.lib" -DDEBUG="0" -DBUILD_METRICS="0" -DBUILD_GIT_ID="1" -DBUILD_EXTRACTORS="1" -DCMAKE_INTERPROCEDURAL_OPTIMIZATION="1"

Compile

  • 4-5 minutes i5-8400H 5)
"%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe" "%UserProfile%\Projects\CMaNGOS-tbc\build\ALL_BUILD.vcxproj" -target:"Rebuild" -property:"Configuration=Release"

Content

DIR "%ProgramFiles(x86)%\World of Warcraft 2.4.3\Wow.exe"

DBCs, Maps, and Cameras

COPY /Y "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\Extractors\ad.exe" "%ProgramFiles(x86)%\World of Warcraft 2.4.3"
CD "%ProgramFiles(x86)%\World of Warcraft 2.4.3" && "%ProgramFiles(x86)%\World of Warcraft 2.4.3\ad.exe" -f "0"

VMaps

Extract

COPY /Y "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\Extractors\vmap_extractor.exe" "%ProgramFiles(x86)%\World of Warcraft 2.4.3"
CD "%ProgramFiles(x86)%\World of Warcraft 2.4.3" && "%ProgramFiles(x86)%\World of Warcraft 2.4.3\vmap_extractor.exe" -l

Assemble

COPY /Y "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\Extractors\vmap_assembler.exe" "%ProgramFiles(x86)%\World of Warcraft 2.4.3"
CD "%ProgramFiles(x86)%\World of Warcraft 2.4.3" && MKDIR "%ProgramFiles(x86)%\World of Warcraft 2.4.3\vmaps" & "%ProgramFiles(x86)%\World of Warcraft 2.4.3\vmap_assembler.exe" "Buildings" "vmaps"

MMaps

  • :!: 20-30 minutes i5-8400H
  • --threads %NUMBER_OF_PROCESSORS%
  • TODO: Test with --silent
  • TODO: Check if --configInputPath and --offMeshInput work with that kind of path 7)
COPY /Y "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\Extractors\MoveMapGen.exe" "%ProgramFiles(x86)%\World of Warcraft 2.4.3"
CD "%ProgramFiles(x86)%\World of Warcraft 2.4.3" && MKDIR "%ProgramFiles(x86)%\World of Warcraft 2.4.3\mmaps" & "%ProgramFiles(x86)%\World of Warcraft 2.4.3\MoveMapGen.exe" --offMeshInput "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\Extractors\offmesh.txt" --configInputPath "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\Extractors\config.json" --threads %NUMBER_OF_PROCESSORS%

Move Files

MOVE /Y "%ProgramFiles(X86)%\World of Warcraft 2.4.3\Cameras" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release" && MOVE /Y "%ProgramFiles(X86)%\World of Warcraft 2.4.3\dbc" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release" && MOVE /Y "%ProgramFiles(X86)%\World of Warcraft 2.4.3\maps" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release" && MOVE /Y "%ProgramFiles(X86)%\World of Warcraft 2.4.3\mmaps" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release" && MOVE /Y "%ProgramFiles(X86)%\World of Warcraft 2.4.3\vmaps" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release"

Clean-up

RMDIR /S /Q "%ProgramFiles(X86)%\World of Warcraft 3.3.5\Buildings" && DEL /Q "%ProgramFiles(X86)%\World of Warcraft 3.3.5\mapextractor.exe" "%ProgramFiles(X86)%\World of Warcraft 3.3.5\mmaps_generator.exe" "%ProgramFiles(X86)%\World of Warcraft 3.3.5\vmap4assembler.exe" "%ProgramFiles(X86)%\World of Warcraft 3.3.5\vmap4extractor.exe"

World Database

TBC-DB

Git

"%ProgramFiles%\Git\bin\git.exe" clone --branch "master" --depth "1" --recurse-submodules "https://github.com/cmangos/tbc-db.git" "%UserProfile%\Projects\CMaNGOS-tbc\tbc-db"

InstallFullDB.sh

"%ProgramFiles%\Git\bin\sh.exe" -- "%UserProfile%\Projects\CMaNGOS-tbc\tbc-db\InstallFullDB.sh"
"notepad.exe" "%UserProfile%\Projects\CMaNGOS-tbc\tbc-db\InstallFullDB.config"
MYSQL_HOST="."
MYSQL_USERNAME="tbcmangos"
MYSQL_PASSWORD="x"
MYSQL_PATH="C:\Program Files\MariaDB 12.1\bin\mariadb.exe"
CORE_PATH="C:\Users\Espionage724\Projects\CMaNGOS-tbc\src"
  • Initial: Option 2 Install fresh TBC-DB only to tbcmangos
  • Later updates: Option 3 Install core updates only
"%ProgramFiles%\Git\bin\sh.exe" -- "%UserProfile%\Projects\CMaNGOS-tbc\tbc-db\InstallFullDB.sh"

Settings

  • 2025/10/06: Conf URLs need updating to CMaNGOS

realmd

COPY /Y "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\realmd.conf.dist" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\realmd-localhost.conf"
"notepad.exe" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\realmd-localhost.conf"
LoginDatabaseInfo = ".;3306;tbcrealmd;x;tbcrealmd"

mangosd

COPY /Y "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\mangosd.conf.dist" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\mangosd-localhost.conf"
"notepad.exe" "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\mangosd-localhost.conf"
LoginDatabaseInfo = ".;3306;tbcrealmd;x;tbcrealmd"
WorldDatabaseInfo = ".;3306;tbcmangos;x;tbcmangos"
CharacterDatabaseInfo = ".;3306;tbccharacters;x;tbccharacters"
LogsDatabaseInfo = ".;3306;tbclogs;x;tbclogs"

PathFinder.NormalizeZ = 1

Quests.LowLevelHideDiff = -1
Quests.HighLevelHideDiff = -1

Motd = "Welcome to your localhost server!"

Firewall

Block

"netsh.exe" advfirewall firewall add rule name="TrinityCore 3.3.5 localhost (authserver)" dir="in" action="block" profile="any" program="%UserProfile%\Projects\TrinityCore-335\build\bin\Release\authserver.exe" & "netsh.exe" advfirewall firewall add rule name="TrinityCore 3.3.5 localhost (worldserver)" dir="in" action="block" profile="any" program="%UserProfile%\Projects\TrinityCore-335\build\bin\Release\worldserver.exe"

Delete Rules

"netsh.exe" advfirewall firewall delete rule name="TrinityCore 3.3.5 localhost (authserver)" & "netsh.exe" advfirewall firewall delete rule name="TrinityCore 3.3.5 localhost (worldserver)"

Scripts

Server Start

  • Shutdown order: worldserverauthserver → MariaDB
MKDIR "%UserProfile%\Projects\TrinityCore-335\scripts" & "notepad.exe" "%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-start.bat"
@echo off

TITLE TrinityCore 335 Launcher

START "MariaDB Server" "%ProgramFiles%\MariaDB 12.1\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.1\data\my.ini"
TIMEOUT /T "2" /NOBREAK

CD "%UserProfile%\Projects\TrinityCore-335\build\bin\Release"
START "WoW 3.3.5 [auth]" "%UserProfile%\Projects\TrinityCore-335\build\bin\Release\authserver.exe" --config-dir "%UserProfile%\Projects\TrinityCore-335\conf\authserver"
START "WoW 3.3.5 [world]" "%UserProfile%\Projects\TrinityCore-335\build\bin\Release\worldserver.exe" --config-dir "%UserProfile%\Projects\TrinityCore-335\conf\worldserver"

:: End
"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-start.bat"

Server Update

MKDIR "%UserProfile%\Projects\TrinityCore-335\scripts" & "notepad.exe" "%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-update.bat"
@echo off

TITLE TrinityCore 335 Updater

"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\TrinityCore-335\src" reset --hard
"%ProgramFiles%\Git\bin\git.exe" -C "%UserProfile%\Projects\TrinityCore-335\src" pull origin "3.3.5" --rebase

"%ProgramFiles%\CMake\bin\cmake.exe" -S "%UserProfile%\Projects\TrinityCore-335\src" -B "%UserProfile%\Projects\TrinityCore-335\build" -G "Visual Studio 17 2022" --fresh -Wno-dev -DBOOST_ROOT="%SYSTEMDRIVE%/local/boost_1_89_0" -DMYSQL_INCLUDE_DIR="%ProgramFiles%\MariaDB 12.1\include\mysql" -DMYSQL_LIBRARY="%ProgramFiles%\MariaDB 12.1\lib\libmariadb.lib" -DWITHOUT_METRICS="1" -DTOOLS="0"

"%ProgramFiles%\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\amd64\MSBuild.exe" "%UserProfile%\Projects\TrinityCore-335\build\ALL_BUILD.vcxproj" -target:"Build" -property:"Configuration=Release"

:: End
"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-update.bat"

Database Back-up

MKDIR "%UserProfile%\Projects\TrinityCore-335\scripts" & "notepad.exe" "%UserProfile%\Projects\TrinityCore-335\scripts\localhost-database-backup.bat"
@echo off

TITLE WoW 3.3.5 Database Back-up

START "MariaDB Server" "%ProgramFiles%\MariaDB 12.1\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.1\data\my.ini"
TIMEOUT /T "2" /NOBREAK

CD "%UserProfile%\Downloads"

ECHO Root MariaDB user password prompts:
"%ProgramFiles%\MariaDB 12.1\bin\mariadb-dump.exe" -u "root" -p --opt -r "localhost-authserver.sql" "authserver"
"%ProgramFiles%\MariaDB 12.1\bin\mariadb-dump.exe" -u "root" -p --opt -r "localhost-characters.sql" "characters"

:: End
"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-database-backup.bat"

Launcher Shortcuts

Desktop

Server Start

"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-start.bat"
WoW 3.3.5 Server

Start Menu

MKDIR "%AppData%\Microsoft\Windows\Start Menu\Programs\World of Warcraft 3.3.5" & "explorer.exe" "%AppData%\Microsoft\Windows\Start Menu\Programs\World of Warcraft 3.3.5"

Server Start

"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-start.bat"
Server Start

Update

"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-server-update.bat"
Server Updater

Database Backup

"%UserProfile%\Projects\TrinityCore-335\scripts\localhost-database-backup.bat"
Database Back-up

Install Notes

"https://wiki.realmofespionage.xyz/servers;windows;games;trinitycore_3.3.5_localhost"
Install Notes (Server)

Management

Servers

"%ProgramFiles%\MariaDB 12.1\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.1\data\my.ini"
CD "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release" && "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\realmd.exe" -c "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\realmd-localhost.conf"
CD "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release" && "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\mangosd.exe" -c "%UserProfile%\Projects\CMaNGOS-tbc\build\bin\x64_Release\mangosd-localhost.conf"

Create Account

account create Espionage724 x 1
account set gmlevel Espionage724 3
server shutdown 1

Realm

  • address to LAN IP allows LAN connections
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p
UPDATE `tbcrealmd`.`realmlist` SET `name` = 'localhost' WHERE `id` = '1';
UPDATE `tbcrealmd`.`realmlist` SET `address` = '192.168.1.150' WHERE `id` = '1';
EXIT

Character Data

Backup

"%ProgramFiles%\MariaDB 12.1\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.1\data\my.ini"
CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.1\bin\mariadb-dump.exe" -u "root" -p --opt -r "localhost-authserver.sql" "authserver"
CD "%UserProfile%\Downloads" && "%ProgramFiles%\MariaDB 12.1\bin\mariadb-dump.exe" -u "root" -p --opt -r "localhost-characters.sql" "characters"

Restore

"%ProgramFiles%\MariaDB 12.1\bin\mariadbd.exe" --defaults-file="%ProgramFiles%\MariaDB 12.1\data\my.ini"

authserver

"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE authserver"
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "authserver" < "%UserProfile%\Downloads\localhost-authserver.sql"

characters

"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p --execute="CREATE DATABASE characters"
"%ProgramFiles%\MariaDB 12.1\bin\mariadb.exe" -u "root" -p "characters" < "%UserProfile%\Downloads\localhost-characters.sql"
3)
2025/10/05: boost_1_89_0-msvc-14.3-64.exe failed cmake with missing system
4)
:?: No update sqls need importing after the bases; later updates may need manual importing: InstallFullDB.sh later is set-up to only manage tbcmangos world DB updates
5)
2025/10/05: 00:03:52.74
6)
:!: Client needs to be TBC with the log-in music; Vanilla at 2.4.3 fails with missing 5301243.map file on server-start; related thread
7)
no errors presented during extraction; server starts fine; not sure if offmesh/config confs directly benefit during extraction
8)
can be a single character for easy log-in
/srv/www/wiki/data/pages/servers/windows/games/cmangos_tbc_localhost.txt · Last modified: by Sean Rhone