From 87ecc3f9f624099ff4d24298d330950dc0037a02 Mon Sep 17 00:00:00 2001 From: Lion Kortlepel Date: Fri, 1 Oct 2021 02:03:11 +0200 Subject: [PATCH] fix readme invalid cmake invocation, show ms in debug output --- README.md | 2 +- src/TConsole.cpp | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/README.md b/README.md index a138fa8..7ad35c9 100644 --- a/README.md +++ b/README.md @@ -95,7 +95,7 @@ On windows, use git-bash for these commands. On Linux, these should work in your 2. Clone the repository in a location of your choice with `git clone --recurse-submodules https://github.com/BeamMP/BeamMP-Server`. 3. Ensure that all submodules are initialized by running `git submodule update --init --recursive`. Then change into the cloned directory by running `cd BeamMP-Server`. 4. Checkout the branch of the release you want to compile (`master` is often unstable), for example `git checkout tags/v1.20` for version 1.20. You can find the latest version [here](https://github.com/BeamMP/BeamMP-Server/tags). -5. Run `cmake .` (with `.`) +5. Run `cmake . -DCMAKE_BUILD_TYPE=Release` (with `.`) 6. Run `make` 7. You will now have a `BeamMP-Server` file in your directory, which is executable with `./BeamMP-Server` (`.\BeamMP-Server.exe` for windows). Follow the (windows or linux, doesnt matter) instructions on the [wiki](https://wiki.beammp.com/en/home/Server_Mod) for further setup after installation (which we just did), such as port-forwarding and getting a key to actually run the server. diff --git a/src/TConsole.cpp b/src/TConsole.cpp index 2818ba6..6efebd9 100644 --- a/src/TConsole.cpp +++ b/src/TConsole.cpp @@ -14,7 +14,6 @@ std::string GetDate() { auto local_tm = std::localtime(&tt); char buf[30]; std::string date; -#if defined(DEBUG) if (Application::Settings.DebugModeEnabled) { std::strftime(buf, sizeof(buf), "[%d/%m/%y %T.", local_tm); date += buf; @@ -26,12 +25,9 @@ std::string GetDate() { date += fracstr; date += "] "; } else { -#endif std::strftime(buf, sizeof(buf), "[%d/%m/%y %T] ", local_tm); date += buf; -#if defined(DEBUG) } -#endif return date; }