From b2304a4a8692057a52189f149a356f3a4c680d39 Mon Sep 17 00:00:00 2001 From: yamashi Date: Tue, 11 Jan 2022 23:56:19 +0100 Subject: [PATCH] fix: server admin console now relies exclusively on xmake --- Code/admin/xmake.lua | 13 ++++--------- Code/server/GameServer.cpp | 8 ++++---- Code/xmake.lua | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Code/admin/xmake.lua b/Code/admin/xmake.lua index 357abce2a..78e12938b 100644 --- a/Code/admin/xmake.lua +++ b/Code/admin/xmake.lua @@ -1,7 +1,5 @@ -add_requires("vcpkg::magnum") -add_requires("vcpkg::sdl2") -add_requires("vcpkg::magnum-integration[imgui]") -add_requires("vcpkg::corrade") +add_requires("magnum", { configs = { sdl2 = true }}) +add_requires("magnum-integration", { configs = { imgui = true }}) target("Admin") set_kind("binary") @@ -29,9 +27,6 @@ target("Admin") "spdlog", "hopscotch-map", "glm", - "vcpkg::corrade", - "vcpkg::magnum", - "vcpkg::magnum-integration[imgui]", - "imgui", - "vcpkg::sdl2", + "magnum", + "magnum-integration", "gamenetworkingsockets") diff --git a/Code/server/GameServer.cpp b/Code/server/GameServer.cpp index 473fab4f0..938e8dc50 100644 --- a/Code/server/GameServer.cpp +++ b/Code/server/GameServer.cpp @@ -97,7 +97,7 @@ GameServer::GameServer(uint16_t aPort, bool aPremium, String aName, String aToke return false; }; - //ClientAdminMessageFactory::Visit(adminHandlerGenerator); + ClientAdminMessageFactory::Visit(adminHandlerGenerator); } GameServer::~GameServer() @@ -133,15 +133,15 @@ void GameServer::OnConsume(const void* apData, const uint32_t aSize, const Conne if (m_adminSessions.contains(aConnectionId)) [[unlikely]] { - /* const ClientAdminMessageFactory factory; + const ClientAdminMessageFactory factory; auto pMessage = factory.Extract(reader); if (!pMessage) { spdlog::error("Couldn't parse packet from {:x}", aConnectionId); return; - }*/ + } - //m_adminMessageHandlers[pMessage->GetOpcode()](pMessage, aConnectionId); + m_adminMessageHandlers[pMessage->GetOpcode()](pMessage, aConnectionId); } else { diff --git a/Code/xmake.lua b/Code/xmake.lua index 59c059208..922e4b7e8 100644 --- a/Code/xmake.lua +++ b/Code/xmake.lua @@ -4,7 +4,7 @@ if is_plat("windows") then includes("client") includes("immersive_launcher") includes("tp_process") - --includes("admin") + includes("admin") end includes("common")