Both sides previous revisionPrevious revision | |
servers:games:cmangos_tbc_localhost [2024/03/31 06:59] – Sean Rhone | servers:games:cmangos_tbc_localhost [2024/03/31 11:36] (current) – Abandon; hard to source proper 2.4.3 client Sean Rhone |
---|
====== Information ====== | |
| |
* CMaNGOS ((https://cmangos.net/)) | |
* TBC ((https://github.com/cmangos/mangos-tbc)) | |
* tbc-db ((https://github.com/cmangos/tbc-db)) | |
| |
* These notes provide a local singleplayer server | |
| |
* :!: 2024/03/31: WIP | |
| |
===== Prerequisites ===== | |
| |
* [[distros:fedora_workstation_gnome|Fedora Workstation]] | |
* [[servers:mariadb|MariaDB]] | |
* [[games:wine:world_of_warcraft_2.4.3|World of Warcraft (2.4.3)]] | |
| |
====== Dependencies ====== | |
| |
**** | |
| |
sudo dnf install bzip2-devel gcc-c++ cmake git mariadb-devel boost boost-static boost-devel readline-devel | |
| |
====== Download Source ====== | |
| |
**** | |
| |
cd ~ && mkdir -p ~/'Projects' && rm -Rf ~/'Projects/cmangos-tbc/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/cmangos/mangos-tbc.git' ~/'Projects/cmangos-tbc/src' && git clone --branch 'master' --depth '1' --recurse-submodules 'https://github.com/cmangos/tbc-db.git' ~/'Projects/cmangos-tbc/src/tbc-db' && sync | |
| |
====== Databases ====== | |
| |
* This creates the ''mangos'' user for ''InstallFullDB.sh'' | |
| |
sudo mariadb | |
| |
CREATE USER 'mangos'@'localhost' IDENTIFIED BY 'x'; | |
| |
EXIT | |
| |
====== Compile ====== | |
| |
**** | |
| |
rm -Rf ~/'Projects/cmangos-tbc/build' ~/'Projects/cmangos-tbc/run' && mkdir -p ~/'Projects/cmangos-tbc/build' ~/'Projects/cmangos-tbc/run' && cd ~/'Projects/cmangos-tbc/build' && cmake ~/'Projects/cmangos-tbc/src' -DCMAKE_INSTALL_PREFIX=~/'Projects/cmangos-tbc/run' -DBUILD_EXTRACTORS='1' && sync && make --jobs=$(nproc) install && sync | |
| |
====== Content ====== | |
| |
* :!: WoW Clients from other private server projects could come modified in ways that fail with certain server emulator checks | |
* 2024/03/31: [[https://wowdl.net/client/World-of-Warcraft-2.4.3.8606-enUS|World-of-Warcraft-2.4.3.8606-enUS.zip]] is not usable as it's missing ''expansion.MPQ'' (see [[https://github.com/cmangos/issues/issues/3394|#3394]]) | |
| |
===== Extract ===== | |
| |
* Expects [[games:wine:world_of_warcraft_2.4.3|World of Warcraft 2.4.3]] | |
* 2024/03/31: Takes about 27 minutes on i5-8400H | |
| |
cp --remove-destination ~/'Projects/cmangos-tbc/run/bin/tools/'* ~/'.wine/World of Warcraft 2.4.3/drive_c/Program Files/World of Warcraft 2.4.3.8606'*'/' && cd ~/'.wine/World of Warcraft 2.4.3/drive_c/Program Files/World of Warcraft 2.4.3.8606'*'/' && ~/'.wine/World of Warcraft 2.4.3/drive_c/Program Files/World of Warcraft 2.4.3.8606'*'/ExtractResources.sh' | |
| |
===== Move Files ===== | |
| |
**** | |
| |
cd ~/'.wine/World of Warcraft 2.4.3/drive_c/Program Files/World of Warcraft 2.4.3.8606'*'/' && mv --force 'maps' 'dbc' 'vmaps' 'mmaps' 'Cameras' ~/'Projects/cmangos-tbc/run/bin' | |
| |
===== Database ===== | |
| |
cd ~/'Projects/cmangos-tbc/src/tbc-db' && ~/'Projects/cmangos-tbc/src/tbc-db/InstallFullDB.sh' | |
| |
nano ~/'Projects/cmangos-tbc/src/tbc-db/InstallFullDB.config' | |
| |
====== Settings ====== | |
| |
===== mangosd.conf ===== | |
| |
mkdir -p ~/'Projects/cmangos-tbc/run/bin/etc' && cp --remove-destination ~/'Projects/cmangos-tbc/src/src/mangosd/mangosd.conf.dist.in' ~/'Projects/cmangos-tbc/run/bin/etc/mangosd.conf' | |
| |
nano ~/'Projects/cmangos-tbc/run/bin/etc/mangosd.conf' | |
| |
===== realmd.conf ===== | |
| |
mkdir -p ~/'Projects/cmangos-tbc/run/bin/etc' && cp --remove-destination ~/'Projects/cmangos-tbc/src/src/realmd/realmd.conf.dist.in' ~/'Projects/cmangos-tbc/run/bin/etc/realmd.conf' | |
| |
nano ~/'Projects/cmangos-tbc/run/bin/etc/realmd.conf' | |
| |
====== Realm ====== | |
| |
===== authserver ===== | |
| |
* ''authserver'' needs started at least once to create the tables and to start ''worldserver'' for account creation | |
* Ctrl + C to exit | |
| |
cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/authserver' | |
| |
===== Realm ===== | |
| |
**** | |
| |
sudo mariadb --execute="UPDATE authserver.realmlist SET name = 'localhost', address = 'localhost' WHERE realmlist.id = 1" | |
| |
====== Create GM Account ====== | |
| |
* Change ''x'' to password | |
| |
cd ~/'Projects/cmangos-tbc/run/bin' && ~/'Projects/cmangos-tbc/run/bin/realmd' --config 'etc/realmd.conf' | |
| |
cd ~/'Projects/cmangos-tbc/run/bin' && ~/'Projects/cmangos-tbc/run/bin/mangosd' --config 'etc/mangosd.conf' | |
| |
account create Espionage724 x | |
| |
account set gmlevel Espionage724 3 -1 | |
| |
server shutdown 1 | |
| |
====== Launch ====== | |
| |
===== Desktop Launcher ===== | |
| |
* See [[games:wine:world_of_warcraft_3.3.5#desktop_launcher|Desktop Launcher]] | |
* :!: Expects GNOME Terminal ((other Terminals and non-GNOME desktop environments untested)) | |
| |
===== Commands ===== | |
| |
==== authserver ==== | |
| |
**** | |
| |
cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/authserver' | |
| |
==== worldserver ==== | |
| |
**** | |
| |
cd ~/'Projects/trinity-335/run/bin' && ~/'Projects/trinity-335/run/bin/worldserver' | |
| |
====== Character Data ====== | |
| |
===== Backup ===== | |
| |
* Dumps ''authserver'' and ''characters'' MariaDB databases as ''.sql'' in ''~/Downloads'' | |
| |
==== Desktop Launcher ==== | |
| |
* See [[games:wine:world_of_warcraft_3.3.5#desktop_launcher|Desktop Launcher]] | |
* :!: Expects GNOME Terminal ((other Terminals and non-GNOME desktop environments untested)) | |
| |
==== authserver ==== | |
| |
**** | |
| |
cd ~/'Downloads' && sudo mariadb-dump --databases 'authserver' --result-file='localserver-authserver-database-'$(date +%Y-%m-%d-%s)'.sql' && sudo chown $USER:$USER ~/'Downloads/localserver-authserver-database-'*'.sql' && sync | |
| |
==== characters ==== | |
| |
**** | |
| |
cd ~/'Downloads' && sudo mariadb-dump --databases 'characters' --result-file='localserver-characters-database-'$(date +%Y-%m-%d-%s)'.sql' && sudo chown $USER:$USER ~/'Downloads/localserver-characters-database-'*'.sql' && sync | |
| |
===== Restore ===== | |
| |
* :!: This deletes the existing ''authserver'' and ''characters'' databases before restoring from backup | |
* :!: Only have a single ''authserver'' and ''worldserver'' ''.sql'' in ''~/Downloads'' ((more than 1 makes ''mariadb'' throw ''ambiguous redirect'')) ((TODO: See if there's a way to select a newer file either via timestamp or filename as ''%s'' should always increase?)) | |
| |
==== authserver ==== | |
| |
**** | |
| |
ls ~/'Downloads/localserver-authserver-database-'*'.sql' && sudo mariadb --execute='DROP DATABASE authserver' && sudo mariadb --execute='CREATE DATABASE authserver' && sudo mariadb 'authserver' < ~/'Downloads/localserver-authserver-database-'*'.sql' && sync | |
| |
==== characters ==== | |
| |
**** | |
| |
ls ~/'Downloads/localserver-characters-database-'*'.sql' && sudo mariadb --execute='DROP DATABASE characters' && sudo mariadb --execute='CREATE DATABASE characters' && sudo mariadb 'characters' < ~/'Downloads/localserver-characters-database-'*'.sql' && sync | |
| |
==== Reapply Permissions ==== | |
| |
sudo mariadb | |
| |
GRANT ALL PRIVILEGES ON authserver.* to 'authserver'@'localhost' IDENTIFIED BY 'x'; | |
| |
GRANT ALL PRIVILEGES ON characters.* to 'characters'@'localhost' IDENTIFIED BY 'x'; | |
| |
FLUSH PRIVILEGES; | |
| |
EXIT | |
| |