diff --git a/.github/apps/ci/ci-compile.sh b/.github/apps/ci/ci-compile.sh index 02e0d84e2..66102e71e 100644 --- a/.github/apps/ci/ci-compile.sh +++ b/.github/apps/ci/ci-compile.sh @@ -8,7 +8,22 @@ cd _build # PCH is OFF on purpose. A precompiled header supplies declarations the source never # named, so a green PCH build says nothing about whether a file includes what it uses -- # and that is exactly the class of defect this CI exists to catch. -time cmake .. -DCMAKE_INSTALL_PREFIX=../_install -DBUILD_TOOLS:BOOL=1 -DBUILD_MANGOSD:BOOL=1 -DBUILD_REALMD:BOOL=1 -DSOAP:BOOL=1 -DSCRIPT_LIB_ELUNA:BOOL=1 -DSCRIPT_LIB_SD3:BOOL=1 -DPLAYERBOTS:BOOL=1 -DPCH:BOOL=0 +# +# BUILD_CONFEDITOR* are Windows-only; left ON so configure options match StatusInfo. +# On Linux the confeditor subdirectory returns without creating targets. +time cmake .. \ + -DCMAKE_INSTALL_PREFIX=../_install \ + -DBUILD_TOOLS:BOOL=1 \ + -DBUILD_MANGOSD:BOOL=1 \ + -DBUILD_REALMD:BOOL=1 \ + -DBUILD_AH_SERVICE:BOOL=1 \ + -DBUILD_CONFEDITOR:BOOL=1 \ + -DBUILD_CONFEDITOR_WEB:BOOL=1 \ + -DSOAP:BOOL=1 \ + -DSCRIPT_LIB_ELUNA:BOOL=1 \ + -DSCRIPT_LIB_SD3:BOOL=1 \ + -DPLAYERBOTS:BOOL=1 \ + -DPCH:BOOL=0 time make -j $(nproc) time make install diff --git a/.github/workflows/core_linux_build.yml b/.github/workflows/core_linux_build.yml index 24161c65a..d196704f2 100644 --- a/.github/workflows/core_linux_build.yml +++ b/.github/workflows/core_linux_build.yml @@ -53,6 +53,8 @@ jobs: key: linux-${{ matrix.name }} max-size: 500M + # WITH_NET_TESTS off (slow sockets). CONFEDITOR* ON for option parity; + # the subdirectory is a no-op on Linux. - name: Configure run: > cmake -S . -B "$BUILD_DIR" -G Ninja @@ -66,9 +68,9 @@ jobs: -DBUILD_MANGOSD=1 -DBUILD_REALMD=1 -DBUILD_AH_SERVICE=1 + -DBUILD_CONFEDITOR=1 + -DBUILD_CONFEDITOR_WEB=1 -DWITH_TESTS=1 - # Never the socket tests: they bind real listeners and dominate the - # suite's wall-clock. A human asks for them, CI does not. -DWITH_NET_TESTS=0 -DSOAP=1 -DSCRIPT_LIB_ELUNA=1 diff --git a/.github/workflows/core_windows_build.yml b/.github/workflows/core_windows_build.yml index 2255196f4..9bcce5013 100644 --- a/.github/workflows/core_windows_build.yml +++ b/.github/workflows/core_windows_build.yml @@ -109,6 +109,8 @@ jobs: key: windows-msvc max-size: 500M + # WITH_NET_TESTS stays off: socket tests bind real listeners and dominate wall-clock. + # BUILD_CONFEDITOR_WEB fetches the WebView2 NuGet SDK at configure (needs network). - name: Configure shell: bash run: > @@ -122,9 +124,10 @@ jobs: -DBUILD_MANGOSD=1 -DBUILD_REALMD=1 -DBUILD_AH_SERVICE=1 + -DBUILD_CONFEDITOR=1 + -DBUILD_CONFEDITOR_WEB=1 + -DWEBVIEW2_FETCH_SDK=1 -DWITH_TESTS=1 - # Never the socket tests: they bind real listeners and dominate the - # suite's wall-clock. A human asks for them, CI does not. -DWITH_NET_TESTS=0 -DSOAP=1 -DSCRIPT_LIB_ELUNA=1 @@ -151,6 +154,24 @@ jobs: echo "$out" | grep -q "intent codec selftest OK" || { echo "MISSING: intent codec selftest OK"; exit 1; } echo "$out" | grep -q "ipc selftest OK" || { echo "MISSING: ipc selftest OK"; exit 1; } + # Both conf editors are Windows-only; the web one needs WebView2 SDK at + # configure (fetched) and the Runtime only at run time (present on runners). + - name: Verify conf editors built + shell: bash + run: | + win32="$(find "$BUILD_DIR" -type f -name mangos-conf-editor.exe | head -n1)" + web="$(find "$BUILD_DIR" -type f -name mangos-conf-editor-web.exe | head -n1)" + if [ -z "$win32" ]; then echo "mangos-conf-editor.exe not found"; exit 1; fi + if [ -z "$web" ]; then echo "mangos-conf-editor-web.exe not found"; exit 1; fi + ui_dir="$(dirname "$web")/confeditor-ui" + if [ ! -f "$ui_dir/index.html" ]; then + echo "confeditor-ui/index.html missing next to web editor" + exit 1 + fi + echo "Win32 conf editor: $win32" + echo "Web conf editor: $web" + echo "HTML UI: $ui_dir" + - name: Verify the working tree is clean shell: bash run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 1ea7e48c2..42462fffb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,43 +62,48 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON) #================================================================================== # Define available cmake options below -option(BUILD_MANGOSD "Build the main server" ON) -option(BUILD_REALMD "Build the login server" ON) -option(BUILD_TOOLS "Build the client-data extractor" ON) -option(SCRIPT_LIB_ELUNA "Compile with support for Eluna scripts" ON) -option(SCRIPT_LIB_SD3 "Compile with support for ScriptDev3 scripts" ON) -option(PLAYERBOTS "Enable Player Bots" OFF) -option(SOAP "Enable remote access via SOAP" OFF) -option(PCH "Enable precompiled headers" ON) -option(WITH_IO_URING "Use the io_uring network backend (Linux, needs liburing)" OFF) -option(DEBUG "Enable debug build (only on non IDEs)" OFF) -option(WITHOUT_GIT "Disable Git revision detection" OFF) -option(BUILD_AH_SERVICE "Build the out-of-process auction-house service" ON) -option(WITH_TESTS "Build the unit tests" OFF) -option(WITH_NET_TESTS "Build the socket tests (slow; never in CI)" OFF) +# Keep this list, the help message below, and cmake/StatusInfo.cmake in sync. +option(BUILD_MANGOSD "Build the main server" ON) +option(BUILD_REALMD "Build the login server" ON) +option(BUILD_TOOLS "Build the client-data extractor" ON) +option(BUILD_CONFEDITOR "Build the Win32 mangosd.conf editor (Windows)" ON) +option(BUILD_CONFEDITOR_WEB "Build the HTML/WebView2 conf editor (Windows)" ON) +option(BUILD_AH_SERVICE "Build the out-of-process auction-house service" ON) +option(SCRIPT_LIB_ELUNA "Compile with support for Eluna scripts" ON) +option(SCRIPT_LIB_SD3 "Compile with support for ScriptDev3 scripts" ON) +option(PLAYERBOTS "Enable Player Bots" OFF) +option(SOAP "Enable remote access via SOAP" OFF) +option(PCH "Enable precompiled headers" ON) +option(WITH_IO_URING "Use the io_uring network backend (Linux, needs liburing)" OFF) +option(WITH_TESTS "Build the unit tests" OFF) +option(WITH_NET_TESTS "Build the socket tests (slow; never in CI)" OFF) +option(DEBUG "Enable debug build (only on non IDEs)" OFF) +option(WITHOUT_GIT "Disable Git revision detection" OFF) #================================================================================== message("") message( "This script builds the MaNGOS server. - Options that can be used in order to configure the process: + Options that can be used in order to configure the process + (same set is summarised at the end of configure by cmake/StatusInfo.cmake): + General: CMAKE_INSTALL_PREFIX Path where the server should be installed to BUILD_MANGOSD Build the main server BUILD_REALMD Build the login server BUILD_TOOLS Build the client-data extractor + BUILD_CONFEDITOR Win32 mangosd.conf dialog editor (Windows only) + BUILD_CONFEDITOR_WEB HTML/WebView2 conf editor (Windows; needs WebView2 SDK) + BUILD_AH_SERVICE Out-of-process auction-house service + SCRIPT_LIB_ELUNA Compile with support for Eluna scripts + SCRIPT_LIB_SD3 Compile with support for ScriptDev3 scripts + PLAYERBOTS Enable Player Bots SOAP Enable remote access via SOAP PCH Enable use of precompiled headers - WITH_TESTS Build the unit tests (target: mangos_tests) - WITH_NET_TESTS Build the socket tests as well. Disjoint from WITH_TESTS, - off by default, and deliberately not run in CI: they bind - real sockets and dominate the suite's wall-clock time. + WITH_IO_URING io_uring network backend (Linux; needs liburing) + WITH_TESTS Unit tests (target: mangos_tests) + WITH_NET_TESTS Socket tests (slow; never in CI) DEBUG Debug build, only for systems without IDE (Linux, *BSD) WITHOUT_GIT Disable Git revision detection - Scripting engines: - SCRIPT_LIB_ELUNA Compile with support for Eluna scripts - SCRIPT_LIB_SD3 Compile with support for ScriptDev3 scripts - Modules: - PLAYERBOTS Enable Player Bots To set an option simply type -D