aboutsummaryrefslogtreecommitdiff
path: root/zenserver
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
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')
-rw-r--r--zenserver/xmake.lua14
-rw-r--r--zenserver/zenserver.cpp17
-rw-r--r--zenserver/zenserver.vcxproj184
-rw-r--r--zenserver/zenserver.vcxproj.filters117
4 files changed, 6 insertions, 326 deletions
diff --git a/zenserver/xmake.lua b/zenserver/xmake.lua
index e4a768f7b..339afbfe5 100644
--- a/zenserver/xmake.lua
+++ b/zenserver/xmake.lua
@@ -34,17 +34,3 @@ target("zenserver")
add_packages(
"vcpkg::cxxopts",
"vcpkg::mimalloc")
-
- on_load(function(target)
- local commit, err = os.iorun("git log -1 --format=\"%h-%cI\"")
- if commit ~= nil then
- commit = commit:gsub("%s+", "")
- commit = commit:gsub("\n", "")
- if is_mode("release") then
- commit = "rel-" .. commit
- else
- commit = "dbg-" .. commit
- end
- target:add("defines", "BUILD_VERSION=\"" .. commit .. "\"")
- end
- end)
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();
diff --git a/zenserver/zenserver.vcxproj b/zenserver/zenserver.vcxproj
deleted file mode 100644
index 4b849eae8..000000000
--- a/zenserver/zenserver.vcxproj
+++ /dev/null
@@ -1,184 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup Label="ProjectConfigurations">
- <ProjectConfiguration Include="Debug|x64">
- <Configuration>Debug</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- <ProjectConfiguration Include="Release|x64">
- <Configuration>Release</Configuration>
- <Platform>x64</Platform>
- </ProjectConfiguration>
- </ItemGroup>
- <PropertyGroup Label="Globals">
- <VCProjectVersion>15.0</VCProjectVersion>
- <ProjectGuid>{8398D81C-B1B6-4327-82B1-06EACB8A144F}</ProjectGuid>
- <Keyword>Win32Proj</Keyword>
- <RootNamespace>zenserver</RootNamespace>
- <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
- <ConfigurationType>Application</ConfigurationType>
- <UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
- <WholeProgramOptimization>true</WholeProgramOptimization>
- <CharacterSet>Unicode</CharacterSet>
- </PropertyGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
- <ImportGroup Label="ExtensionSettings">
- </ImportGroup>
- <ImportGroup Label="Shared">
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\zenfs_common.props" />
- <Import Project="..\zen_base_debug.props" />
- </ImportGroup>
- <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
- <Import Project="..\zenfs_common.props" />
- <Import Project="..\zen_base_release.props" />
- </ImportGroup>
- <PropertyGroup Label="UserMacros" />
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <LinkIncremental>false</LinkIncremental>
- <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <LinkIncremental>true</LinkIncremental>
- <IncludePath>$(VC_IncludePath);$(WindowsSDK_IncludePath)</IncludePath>
- </PropertyGroup>
- <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <VcpkgEnableManifest>true</VcpkgEnableManifest>
- <VcpkgUseStatic>true</VcpkgUseStatic>
- <VcpkgAdditionalInstallOptions>--overlay-ports=$(SolutionDir)vcpkg_overlay-ports</VcpkgAdditionalInstallOptions>
- </PropertyGroup>
- <PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <VcpkgEnableManifest>true</VcpkgEnableManifest>
- <VcpkgUseStatic>true</VcpkgUseStatic>
- <VcpkgAdditionalInstallOptions>--overlay-ports=$(SolutionDir)vcpkg_overlay-ports</VcpkgAdditionalInstallOptions>
- </PropertyGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>MaxSpeed</Optimization>
- <FunctionLevelLinking>true</FunctionLevelLinking>
- <IntrinsicFunctions>true</IntrinsicFunctions>
- <SDLCheck>true</SDLCheck>
- <PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ConformanceMode>true</ConformanceMode>
- <LanguageStandard>stdcpplatest</LanguageStandard>
- <AdditionalIncludeDirectories>.</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <EnableCOMDATFolding>true</EnableCOMDATFolding>
- <OptimizeReferences>true</OptimizeReferences>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <DelayLoadDLLs>projectedfslib.dll;shell32.dll</DelayLoadDLLs>
- </Link>
- </ItemDefinitionGroup>
- <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
- <ClCompile>
- <PrecompiledHeader>NotUsing</PrecompiledHeader>
- <Optimization>Disabled</Optimization>
- <SDLCheck>true</SDLCheck>
- <PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
- <ConformanceMode>true</ConformanceMode>
- <LanguageStandard>stdcpplatest</LanguageStandard>
- <AdditionalIncludeDirectories>.</AdditionalIncludeDirectories>
- </ClCompile>
- <Link>
- <SubSystem>Console</SubSystem>
- <GenerateDebugInformation>true</GenerateDebugInformation>
- <DelayLoadDLLs>projectedfslib.dll;shell32.dll</DelayLoadDLLs>
- </Link>
- </ItemDefinitionGroup>
- <ItemGroup>
- <ClInclude Include="admin\admin.h" />
- <ClInclude Include="cache\cachetracking.h" />
- <ClInclude Include="cache\structuredcache.h" />
- <ClInclude Include="cache\structuredcachestore.h" />
- <ClInclude Include="compute\apply.h" />
- <ClInclude Include="config.h" />
- <ClInclude Include="diag\formatters.h" />
- <ClInclude Include="diag\logging.h" />
- <ClInclude Include="experimental\frontend.h" />
- <ClInclude Include="experimental\vfs.h" />
- <ClInclude Include="monitoring\httpstats.h" />
- <ClInclude Include="monitoring\httpstatus.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="sos\sos.h" />
- <ClInclude Include="testing\httptest.h" />
- <ClInclude Include="upstream\jupiter.h" />
- <ClInclude Include="projectstore.h" />
- <ClInclude Include="testing\launch.h" />
- <ClInclude Include="casstore.h" />
- <ClInclude Include="diag\diagsvcs.h" />
- <ClInclude Include="experimental\usnjournal.h" />
- <ClInclude Include="targetver.h" />
- <ClInclude Include="upstream\upstreamapply.h" />
- <ClInclude Include="upstream\upstreamcache.h" />
- <ClInclude Include="upstream\zen.h" />
- <ClInclude Include="windows\service.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="admin\admin.cpp" />
- <ClCompile Include="cache\cachetracking.cpp" />
- <ClCompile Include="cache\structuredcache.cpp" />
- <ClCompile Include="cache\structuredcachestore.cpp" />
- <ClCompile Include="compute\apply.cpp" />
- <ClCompile Include="config.cpp" />
- <ClCompile Include="diag\diagsvcs.cpp" />
- <ClCompile Include="diag\logging.cpp" />
- <ClCompile Include="experimental\frontend.cpp" />
- <ClCompile Include="experimental\vfs.cpp" />
- <ClCompile Include="monitoring\httpstats.cpp" />
- <ClCompile Include="monitoring\httpstatus.cpp" />
- <ClCompile Include="projectstore.cpp" />
- <ClCompile Include="sos\sos.cpp" />
- <ClCompile Include="testing\httptest.cpp" />
- <ClCompile Include="upstream\jupiter.cpp" />
- <ClCompile Include="testing\launch.cpp" />
- <ClCompile Include="casstore.cpp" />
- <ClCompile Include="experimental\usnjournal.cpp" />
- <ClCompile Include="upstream\upstreamapply.cpp" />
- <ClCompile Include="upstream\upstreamcache.cpp" />
- <ClCompile Include="upstream\zen.cpp" />
- <ClCompile Include="windows\service.cpp" />
- <ClCompile Include="zenserver.cpp" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\zencore\zencore.vcxproj">
- <Project>{d75bf9ab-c61e-4fff-ad59-1563430f05e2}</Project>
- </ProjectReference>
- <ProjectReference Include="..\zenhttp\zenhttp.vcxproj">
- <Project>{8eeb3be5-7001-46bf-aafd-edb7558ac012}</Project>
- </ProjectReference>
- <ProjectReference Include="..\zenstore\zenstore.vcxproj">
- <Project>{26cbbaeb-14c1-4efc-877d-80f48215651c}</Project>
- </ProjectReference>
- <ProjectReference Include="..\zenutil\zenutil.vcxproj">
- <Project>{77f8315d-b21d-4db0-9a6f-2d3359f88a70}</Project>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <None Include="xmake.lua" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="zenserver.rc" />
- </ItemGroup>
- <ItemGroup>
- <Image Include="..\UnrealEngine.ico" />
- </ItemGroup>
- <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
- <ImportGroup Label="ExtensionTargets">
- </ImportGroup>
-</Project> \ No newline at end of file
diff --git a/zenserver/zenserver.vcxproj.filters b/zenserver/zenserver.vcxproj.filters
deleted file mode 100644
index 9b248a38b..000000000
--- a/zenserver/zenserver.vcxproj.filters
+++ /dev/null
@@ -1,117 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <ItemGroup>
- <ClInclude Include="targetver.h" />
- <ClInclude Include="projectstore.h" />
- <ClInclude Include="casstore.h" />
- <ClInclude Include="testing\launch.h" />
- <ClInclude Include="diag\diagsvcs.h">
- <Filter>diag</Filter>
- </ClInclude>
- <ClInclude Include="admin\admin.h">
- <Filter>admin</Filter>
- </ClInclude>
- <ClInclude Include="experimental\usnjournal.h">
- <Filter>experimental</Filter>
- </ClInclude>
- <ClInclude Include="upstream\jupiter.h">
- <Filter>upstream</Filter>
- </ClInclude>
- <ClInclude Include="upstream\zen.h">
- <Filter>upstream</Filter>
- </ClInclude>
- <ClInclude Include="cache\structuredcache.h">
- <Filter>cache</Filter>
- </ClInclude>
- <ClInclude Include="config.h" />
- <ClInclude Include="diag\logging.h" />
- <ClInclude Include="cache\structuredcachestore.h" />
- <ClInclude Include="compute\apply.h" />
- <ClInclude Include="sos\sos.h" />
- <ClInclude Include="upstream\upstreamcache.h">
- <Filter>upstream</Filter>
- </ClInclude>
- <ClInclude Include="testing\httptest.h" />
- <ClInclude Include="windows\service.h" />
- <ClInclude Include="resource.h" />
- <ClInclude Include="experimental\frontend.h">
- <Filter>experimental</Filter>
- </ClInclude>
- <ClInclude Include="diag\formatters.h" />
- <ClInclude Include="experimental\vfs.h" />
- <ClInclude Include="monitoring\httpstats.h" />
- <ClInclude Include="monitoring\httpstatus.h" />
- <ClInclude Include="upstream\upstreamapply.h">
- <Filter>upstream</Filter>
- </ClInclude>
- <ClInclude Include="cache\cachetracking.h" />
- </ItemGroup>
- <ItemGroup>
- <ClCompile Include="zenserver.cpp" />
- <ClCompile Include="projectstore.cpp" />
- <ClCompile Include="casstore.cpp" />
- <ClCompile Include="experimental\usnjournal.cpp">
- <Filter>experimental</Filter>
- </ClCompile>
- <ClCompile Include="testing\launch.cpp" />
- <ClCompile Include="upstream\jupiter.cpp">
- <Filter>upstream</Filter>
- </ClCompile>
- <ClCompile Include="upstream\zen.cpp">
- <Filter>upstream</Filter>
- </ClCompile>
- <ClCompile Include="cache\structuredcache.cpp">
- <Filter>cache</Filter>
- </ClCompile>
- <ClCompile Include="config.cpp" />
- <ClCompile Include="diag\logging.cpp" />
- <ClCompile Include="cache\structuredcachestore.cpp" />
- <ClCompile Include="compute\apply.cpp" />
- <ClCompile Include="sos\sos.cpp" />
- <ClCompile Include="upstream\upstreamcache.cpp">
- <Filter>upstream</Filter>
- </ClCompile>
- <ClCompile Include="testing\httptest.cpp" />
- <ClCompile Include="windows\service.cpp" />
- <ClCompile Include="admin\admin.cpp" />
- <ClCompile Include="experimental\frontend.cpp">
- <Filter>experimental</Filter>
- </ClCompile>
- <ClCompile Include="experimental\vfs.cpp" />
- <ClCompile Include="monitoring\httpstats.cpp" />
- <ClCompile Include="monitoring\httpstatus.cpp" />
- <ClCompile Include="upstream\upstreamapply.cpp">
- <Filter>upstream</Filter>
- </ClCompile>
- <ClCompile Include="diag\diagsvcs.cpp">
- <Filter>diag</Filter>
- </ClCompile>
- <ClCompile Include="cache\cachetracking.cpp" />
- </ItemGroup>
- <ItemGroup>
- <Filter Include="cache">
- <UniqueIdentifier>{98e47c47-6bbe-46f5-b7cd-4b54352d964e}</UniqueIdentifier>
- </Filter>
- <Filter Include="diag">
- <UniqueIdentifier>{6a09a36e-fb5f-452a-ba0c-6d029240bad0}</UniqueIdentifier>
- </Filter>
- <Filter Include="admin">
- <UniqueIdentifier>{f72f861e-fa14-4ff8-9338-f0f84f4a8389}</UniqueIdentifier>
- </Filter>
- <Filter Include="experimental">
- <UniqueIdentifier>{76916270-97a6-4ec8-b323-a95b6080e245}</UniqueIdentifier>
- </Filter>
- <Filter Include="upstream">
- <UniqueIdentifier>{303c28c2-3607-4ef4-89bd-e3618fe37e74}</UniqueIdentifier>
- </Filter>
- </ItemGroup>
- <ItemGroup>
- <None Include="xmake.lua" />
- </ItemGroup>
- <ItemGroup>
- <ResourceCompile Include="zenserver.rc" />
- </ItemGroup>
- <ItemGroup>
- <Image Include="..\UnrealEngine.ico" />
- </ItemGroup>
-</Project> \ No newline at end of file