aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-06-18 15:40:38 +0200
committerStefan Boberg <[email protected]>2021-06-18 15:40:38 +0200
commitdf8e675a39623e27ba1827b998937ef87e7f9dd1 (patch)
tree92cf8aedc11f60049580ef8f33658b03e6ff33bd
parentValidate that structured cache bucket identifiers are alphanumeric (diff)
downloadzen-df8e675a39623e27ba1827b998937ef87e7f9dd1.tar.xz
zen-df8e675a39623e27ba1827b998937ef87e7f9dd1.zip
Added stub code for 'top' command (no implementation yet - awaiting some vcpkg dependencies)
-rw-r--r--.zenroot0
-rw-r--r--zen/cmds/top.cpp22
-rw-r--r--zen/cmds/top.h18
-rw-r--r--zen/zen.cpp3
-rw-r--r--zen/zen.vcxproj3
-rw-r--r--zen/zen.vcxproj.filters6
6 files changed, 52 insertions, 0 deletions
diff --git a/.zenroot b/.zenroot
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/.zenroot
diff --git a/zen/cmds/top.cpp b/zen/cmds/top.cpp
new file mode 100644
index 000000000..e69f5e94c
--- /dev/null
+++ b/zen/cmds/top.cpp
@@ -0,0 +1,22 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+#include "top.h"
+
+#include <spdlog/spdlog.h>
+#include <memory>
+
+TopCommand::TopCommand()
+{
+}
+
+TopCommand::~TopCommand() = default;
+
+int
+TopCommand::Run(const ZenCliOptions& GlobalOptions, int argc, char** argv)
+{
+ ZEN_UNUSED(GlobalOptions, argc, argv);
+
+ return 0;
+}
diff --git a/zen/cmds/top.h b/zen/cmds/top.h
new file mode 100644
index 000000000..4e886e9fc
--- /dev/null
+++ b/zen/cmds/top.h
@@ -0,0 +1,18 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+#include "../zen.h"
+
+class TopCommand : public ZenCmdBase
+{
+public:
+ TopCommand();
+ ~TopCommand();
+
+ virtual int Run(const ZenCliOptions& GlobalOptions, int argc, char** argv) override;
+ virtual cxxopts::Options* Options() override { return &m_Options; }
+
+private:
+ cxxopts::Options m_Options{"top", "Show dev UI"};
+};
diff --git a/zen/zen.cpp b/zen/zen.cpp
index f61973e1b..6e06d6c49 100644
--- a/zen/zen.cpp
+++ b/zen/zen.cpp
@@ -13,6 +13,7 @@
#include "cmds/deploy.h"
#include "cmds/hash.h"
#include "cmds/run.h"
+#include "cmds/top.h"
#include <zencore/scopeguard.h>
#include <zencore/string.h>
@@ -122,6 +123,7 @@ main(int argc, char** argv)
ChunkCommand ChunkCmd;
RunTestsCommand RunTestsCmd;
RunCommand RunCmd;
+ TopCommand TopCmd;
const struct CommandInfo
{
@@ -135,6 +137,7 @@ main(int argc, char** argv)
{"hash", &HashCmd},
{"runtests", &RunTestsCmd},
{"run", &RunCmd},
+ {"top", &TopCmd},
};
// Build set containing available commands
diff --git a/zen/zen.vcxproj b/zen/zen.vcxproj
index 06c08e49f..60506c3bc 100644
--- a/zen/zen.vcxproj
+++ b/zen/zen.vcxproj
@@ -74,6 +74,7 @@
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
+ <ShowProgress>LinkVerboseLib</ShowProgress>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
@@ -100,6 +101,7 @@
<ClCompile Include="cmds\deploy.cpp" />
<ClCompile Include="cmds\hash.cpp" />
<ClCompile Include="cmds\run.cpp" />
+ <ClCompile Include="cmds\top.cpp" />
<ClCompile Include="internalfile.cpp" />
<ClCompile Include="zen.cpp" />
</ItemGroup>
@@ -110,6 +112,7 @@
<ClInclude Include="cmds\deploy.h" />
<ClInclude Include="cmds\hash.h" />
<ClInclude Include="cmds\run.h" />
+ <ClInclude Include="cmds\top.h" />
<ClInclude Include="internalfile.h" />
<ClInclude Include="zen.h" />
</ItemGroup>
diff --git a/zen/zen.vcxproj.filters b/zen/zen.vcxproj.filters
index 562f245d5..1112cbbf7 100644
--- a/zen/zen.vcxproj.filters
+++ b/zen/zen.vcxproj.filters
@@ -19,6 +19,9 @@
<ClCompile Include="cmds\run.cpp">
<Filter>cmds</Filter>
</ClCompile>
+ <ClCompile Include="cmds\top.cpp">
+ <Filter>cmds</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="chunk\chunk.h" />
@@ -39,6 +42,9 @@
<ClInclude Include="cmds\run.h">
<Filter>cmds</Filter>
</ClInclude>
+ <ClInclude Include="cmds\top.h">
+ <Filter>cmds</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<Filter Include="cmds">