diff --git a/CMakeLists.txt b/CMakeLists.txt index 4be7b20..acac6e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,9 +30,6 @@ endif() set(SENTRY_BACKEND breakpad) add_subdirectory("deps/sentry-native") -set(BUILD_SHARED_LIBS OFF) -add_subdirectory("deps/libzip") - message(STATUS "Setting compiler flags") if (WIN32) @@ -95,7 +92,7 @@ add_executable(BeamMP-Server include/SignalHandling.h src/SignalHandling.cpp) target_compile_definitions(BeamMP-Server PRIVATE SECRET_SENTRY_URL="${BEAMMP_SECRET_SENTRY_URL}") -include_directories(BeamMP-Server PUBLIC ${libzip_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include) +include_directories(BeamMP-Server PUBLIC ${Boost_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include) target_include_directories(BeamMP-Server PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" @@ -115,7 +112,7 @@ message(STATUS "Looking for SSL") find_package(OpenSSL REQUIRED) -target_link_libraries(BeamMP-Server sol2::sol2 ${LUA_LIBRARIES} libzip::zip) +target_link_libraries(BeamMP-Server sol2::sol2 ${LUA_LIBRARIES}) message(STATUS "CURL IS ${CURL_LIBRARIES}") if (UNIX) diff --git a/src/TConsole.cpp b/src/TConsole.cpp index bc6e285..77734e2 100644 --- a/src/TConsole.cpp +++ b/src/TConsole.cpp @@ -35,6 +35,14 @@ std::string GetDate() { void TConsole::BackupOldLog() { fs::path Path = "Server.log"; if (fs::exists(Path)) { + auto OldLog = Path.filename().stem().string() + ".old.log"; + try { + fs::rename(Path, OldLog); + beammp_debug("renamed old log file to '" + OldLog + "'"); + } catch (const std::exception& e) { + beammp_warn(e.what()); + } + /* int err = 0; zip* z = zip_open("ServerLogs.zip", ZIP_CREATE, &err); if (!z) { @@ -68,6 +76,7 @@ void TConsole::BackupOldLog() { zip_file_add(z, NewName.c_str(), s, 0); zip_close(z); + */ } } diff --git a/src/TPPSMonitor.cpp b/src/TPPSMonitor.cpp index 9962107..9ea80dc 100644 --- a/src/TPPSMonitor.cpp +++ b/src/TPPSMonitor.cpp @@ -21,7 +21,7 @@ void TPPSMonitor::operator()() { // hard spi std::this_thread::sleep_for(std::chrono::milliseconds(1)); } - beammp_info("PPSMonitor starting"); + beammp_debug("PPSMonitor starting"); std::vector> TimedOutClients; while (!mShutdown) { std::this_thread::sleep_for(std::chrono::seconds(1));