====== Information ======
* CMaNGOS ((https://cmangos.net/))
* The Burning Crusade ((https://github.com/cmangos/mangos-tbc))
* :!: 2025/10/07: WIP
===== Prerequisites =====
* [[windows:10|Windows 10 (21H2)]]
* [[programs;windows;git|Git]]
* [[servers;windows;mariadb|MariaDB]] (Dev components required; no service/networking)
* [[games;windows;world_of_warcraft_2.4.3|World of Warcraft 2.4.3]]
====== Dependencies ======
* https://github.com/cmangos/issues/wiki/Installation-Instructions#install-manually
===== Visual Studio 2022 =====
* VS2022 [[https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022|VisualStudioSetup.exe]]
* 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 =====
* https://sourceforge.net/projects/boost/files/boost-binaries/
* Last tested: ''boost_1_88_0-msvc-14.3-64.exe'' ((2025/10/05: ''boost_1_89_0-msvc-14.3-64.exe'' failed ''cmake'' with missing ''system''))
===== CMake =====
* https://cmake.org/download/
* Last tested: ''cmake-4.1.1-windows-x86_64.msi''
* ''[ ]'' Add CMake to the PATH environment variable
====== Download Source ======
* https://github.com/cmangos/mangos-tbc/commits/master/
"%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 ======
* https://github.com/cmangos/mangos-tbc/blob/master/sql/create/db_create_mysql.sql
===== 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 =====
* https://github.com/cmangos/issues/wiki/Installation-Instructions#initialize-characters-database
* https://github.com/cmangos/mangos-tbc/tree/master/sql/base
* https://github.com/cmangos/mangos-tbc/tree/master/sql/updates
* 2025/10/05: Bases all have latest updates integrated ((:?: No update sqls need importing after the bases; later updates may need manual importing: [[#installfulldbsh|InstallFullDB.sh]] later is set-up to only manage ''tbcmangos'' world DB updates))
"%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 ======
* https://github.com/cmangos/issues/wiki/Installation-Instructions#compiling-cmangos-windows
* https://github.com/cmangos/mangos-tbc/blob/master/cmake/options.cmake
===== 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 ((2025/10/05: ''00:03:52.74''))
"%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 ======
* Expects [[games;windows;world_of_warcraft_2.4.3#install|World of Warcraft 2.4.3]] ((:!: Client needs to be TBC with the log-in music; Vanilla at 2.4.3 fails with missing ''5301243.map'' file on server-start; [[https://www.getmangos.eu/forums/topic/6664-mangos-one-maps-extraction-problem/|related thread]]))
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 ((no errors presented during extraction; server starts fine; not sure if offmesh/config confs directly benefit during extraction))
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 ====
* https://github.com/cmangos/tbc-db/commits/master/
"%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 ====
* https://github.com/cmangos/issues/wiki/Installation-Instructions#fill-world-database
* https://github.com/cmangos/tbc-db/blob/master/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=====
* Last commit: [[https://github.com/TrinityCore/TrinityCore/commit/68bf7e6d12e1689d688db32c05066b8832922c67|Jul 28, 2021]] ''68bf7e6''
* [[https://github.com/TrinityCore/TrinityCore/commits/3.3.5/src/server/authserver/authserver.conf.dist|New commits check]]
* [[https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/authserver/authserver.conf.dist|Upstream authserver.conf.dist]] ([[https://raw.githubusercontent.com/TrinityCore/TrinityCore/3.3.5/src/server/authserver/authserver.conf.dist|raw]])
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 =====
* Last commit: [[https://github.com/TrinityCore/TrinityCore/commit/0bd56da09b1f0ae34605a1a6fdd14ca26cd42d4c|June 10th, 2025]] ''0bd56da''
* [[https://github.com/TrinityCore/TrinityCore/commits/3.3.5/src/server/worldserver/worldserver.conf.dist|New commits check]]
* [[https://github.com/TrinityCore/TrinityCore/blob/3.3.5/src/server/worldserver/worldserver.conf.dist|Upstream worldserver.conf.dist]] ([[https://raw.githubusercontent.com/TrinityCore/TrinityCore/3.3.5/src/server/worldserver/worldserver.conf.dist|raw]])
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: ''worldserver'' -> ''authserver'' -> 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 =====
* https://github.com/cmangos/issues/wiki/Installation-Instructions#creating-first-account
* :!: Change ''x'' to password ((can be a single character for easy log-in))
* ''1'' at the end of ''account create'' = TBC ([[https://github.com/cmangos/issues/wiki/Installation-Instructions#enabling-expansions-for-a-user|info]])
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 =====
* [[#databases|Initial set-up]]
"%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"