Tools, SQL & Build

Tools, SQL migrations, tests, and build

CMake / build (CMakeLists.txt)

  • C++20 project Firelands with FetchContent: googletest, spdlog, MariaDB C/C++, nlohmann_json, yaml-cpp, Lua, StormLib, FTXUI
  • Libraries: FirelandsSharedFirelandsDomainFirelandsApplicationFirelandsInfrastructure
  • Executables: auth, world, FirelandsDevTools
  • Optional: merge-migrations runs tools/merge_migrations.py → refreshes sql/bundled/
  • Includes: ${PROJECT_SOURCE_DIR}/src — use #include <application/...> style

Build commands

cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug
ninja -C build                    # Full build + tests
ninja -C build auth world         # Servers only
ninja -C build FirelandsUnitTests # Tests only
ctest --test-dir build            # Run tests

Precompiled headers

Heavy headers precompiled for faster builds. spdlog must be included via <shared/Logger.h>. LuaGameScriptHost.cpp skips PCH.

SQL (sql/)

DirectoryPurpose
sql/init/Base schema per database
sql/migrations/Incremental changes (lexicographic order)
sql/bundled/Merged deploy bundles for Docker

DatabaseMigrator runs on auth/world startup; tracks applied files in firelands_auth.schema_migrations.

python3 tools/merge_migrations.py
# or
cmake --build build --target merge-migrations

Tools

PathPurpose
src/tools/DevTools.cppDevTools CLI
tools/extractors/Extractors — MPQ/DBC
tools/vmap/VMap pipeline
tools/sql/import_ref_*.pyWorld seed SQL → migrations (gossip, npc_text, quests, phases)

Tests (tests/)

GoogleTest targets mirror layers under tests/unit/ and tests/integration/. ~90 test files. See Testing.

MySQL repository tests benefit from Docker MySQL (docker-compose up -d db).