From f0df3fe2570d20bc31b8ee279665b97ac89a71e2 Mon Sep 17 00:00:00 2001 From: InviseDivine Date: Fri, 10 Jul 2026 00:46:36 +0200 Subject: [PATCH] Server for windows wow --- CMakeLists.txt | 17 +++++++---------- src/NinecraftApp.cpp | 2 +- src/main_dedicated.cpp | 2 ++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7650b9a..eab2ada 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -149,7 +149,6 @@ file(GLOB SERVER_SOURCES "src/platform/CThread.cpp" "src/platform/HttpClient.cpp" - "src/platform/PngLoader.cpp" "src/platform/time.cpp" "src/platform/input/Controller.cpp" @@ -302,18 +301,16 @@ if (${PLATFORM} STREQUAL "Desktop") endif() # Server -if(UNIX) - add_executable("${PROJECT_NAME}-server" ${SERVER_SOURCES}) +add_executable("${PROJECT_NAME}-server" ${SERVER_SOURCES}) - target_compile_definitions("${PROJECT_NAME}-server" PUBLIC "STANDALONE_SERVER" "SERVER_PROFILER") +target_compile_definitions("${PROJECT_NAME}-server" PUBLIC "STANDALONE_SERVER" "SERVER_PROFILER") - target_include_directories("${PROJECT_NAME}-server" PUBLIC - "${CMAKE_SOURCE_DIR}/src/" - "project/lib_projects/raknet/jni/RaknetSources" - ) +target_include_directories("${PROJECT_NAME}-server" PUBLIC + "${CMAKE_SOURCE_DIR}/src/" + "project/lib_projects/raknet/jni/RaknetSources" +) - target_link_libraries("${PROJECT_NAME}-server" ${CMAKE_THREAD_LIBS_INIT}) -endif() +target_link_libraries("${PROJECT_NAME}-server" ${CMAKE_THREAD_LIBS_INIT}) add_executable(${PROJECT_NAME} ${CLIENT_SOURCES}) diff --git a/src/NinecraftApp.cpp b/src/NinecraftApp.cpp index d2feea6..60e9fee 100755 --- a/src/NinecraftApp.cpp +++ b/src/NinecraftApp.cpp @@ -136,7 +136,7 @@ void NinecraftApp::teardown() Recipes ::teardownRecipes(); TileEntity::teardownTileEntities(); #endif -#ifdef WIN32 +#if defined(WIN32) && !defined(STANDALONE_SERVER) ItemRenderer::teardown_static(); if (EntityTileRenderer::instance != NULL) { delete EntityTileRenderer::instance; diff --git a/src/main_dedicated.cpp b/src/main_dedicated.cpp index 4c667b5..fcf14ce 100755 --- a/src/main_dedicated.cpp +++ b/src/main_dedicated.cpp @@ -5,7 +5,9 @@ #include #include #include +#ifdef __linux__ #include +#endif #include "world/level/LevelSettings.h" #include "world/level/Level.h"