aboutsummaryrefslogtreecommitdiff
path: root/zenserver/zenserver.cpp
diff options
context:
space:
mode:
authorPer Larsson <[email protected]>2021-12-15 14:05:15 +0100
committerGitHub <[email protected]>2021-12-15 14:05:15 +0100
commita7af402bd38b12364e00cf2de8227c7db0911d14 (patch)
tree9aca1e4d3ff9f881710564689cfc9e24396c6911 /zenserver/zenserver.cpp
parentInitialize CidStore to null. (diff)
downloadzen-a7af402bd38b12364e00cf2de8227c7db0911d14.tar.xz
zen-a7af402bd38b12364e00cf2de8227c7db0911d14.zip
Added preprocessing config file and removed Visual Studio files.
Diffstat (limited to 'zenserver/zenserver.cpp')
-rw-r--r--zenserver/zenserver.cpp17
1 files changed, 6 insertions, 11 deletions
diff --git a/zenserver/zenserver.cpp b/zenserver/zenserver.cpp
index 49bb3004d..0f67e3982 100644
--- a/zenserver/zenserver.cpp
+++ b/zenserver/zenserver.cpp
@@ -2,6 +2,7 @@
#include <zencore/compactbinarybuilder.h>
#include <zencore/compactbinaryvalidation.h>
+#include <zencore/config.h>
#include <zencore/filesystem.h>
#include <zencore/fmtutils.h>
#include <zencore/iobuffer.h>
@@ -43,12 +44,6 @@ ZEN_THIRD_PARTY_INCLUDES_END
#include <set>
#include <unordered_map>
-#if !defined(BUILD_VERSION)
-# define BUILD_VERSION ("dev-build")
-#endif
-
-#define ZEN_SCHEMA_VERSION 3 // Canged ZenCache manifest (per larsson)
-
//////////////////////////////////////////////////////////////////////////
// We don't have any doctest code in this file but this is needed to bring
// in some shared code into the executable
@@ -197,7 +192,7 @@ public:
m_HealthService.SetHealthInfo({.DataRoot = m_DataRoot,
.AbsLogPath = ServerOptions.AbsLogFile,
.HttpServerClass = std::string(ServerOptions.HttpServerClass),
- .BuildVersion = std::string(BUILD_VERSION)});
+ .BuildVersion = std::string(ZEN_CFG_VERSION_BUILD_STRING_FULL)});
// Ok so now we're configured, let's kick things off
@@ -611,10 +606,10 @@ ZenServer::InitializeState(const ZenServerOptions& ServerOptions)
const int32_t ManifestVersion = m_RootManifest["schema_version"].AsInt32(0);
- if (ManifestVersion != ZEN_SCHEMA_VERSION)
+ if (ManifestVersion != ZEN_CFG_SCHEMA_VERSION)
{
WipeState = true;
- WipeReason = "Manifest schema version: {}, differs from required: {}"_format(ManifestVersion, ZEN_SCHEMA_VERSION);
+ WipeReason = "Manifest schema version: {}, differs from required: {}"_format(ManifestVersion, ZEN_CFG_SCHEMA_VERSION);
}
}
}
@@ -656,7 +651,7 @@ ZenServer::InitializeState(const ZenServerOptions& ServerOptions)
const DateTime Now = DateTime::Now();
CbObjectWriter Cbo;
- Cbo << "schema_version" << ZEN_SCHEMA_VERSION << "created" << Now << "updated" << Now << "state_id" << Oid::NewOid();
+ Cbo << "schema_version" << ZEN_CFG_SCHEMA_VERSION << "created" << Now << "updated" << Now << "state_id" << Oid::NewOid();
m_RootManifest = Cbo.Save();
@@ -843,7 +838,7 @@ ZenEntryPoint::Run()
InitializeLogging(ServerOptions);
- ZEN_INFO(ZEN_APP_NAME " - starting on port {}, build '{}'", ServerOptions.BasePort, BUILD_VERSION);
+ ZEN_INFO(ZEN_APP_NAME " - starting on port {}, version '{}'", ServerOptions.BasePort, ZEN_CFG_VERSION_BUILD_STRING_FULL);
ZenServerState ServerState;
ServerState.Initialize();