aboutsummaryrefslogtreecommitdiff
path: root/zenutil
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-16 21:08:58 +0200
committerStefan Boberg <[email protected]>2021-09-16 21:08:58 +0200
commitc3e856f37368c7488aa9298b12946f125c8895c0 (patch)
tree9b81949c046ddf885d2117a8757800df09a6d534 /zenutil
parentChanged how sponsor processes are managed (diff)
parentCompact binary package caching support (#9) (diff)
downloadzen-c3e856f37368c7488aa9298b12946f125c8895c0.tar.xz
zen-c3e856f37368c7488aa9298b12946f125c8895c0.zip
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenutil')
-rw-r--r--zenutil/include/zenserverprocess.h2
-rw-r--r--zenutil/zenserverprocess.cpp9
2 files changed, 8 insertions, 3 deletions
diff --git a/zenutil/include/zenserverprocess.h b/zenutil/include/zenserverprocess.h
index 7fcacf788..b659f6e58 100644
--- a/zenutil/include/zenserverprocess.h
+++ b/zenutil/include/zenserverprocess.h
@@ -55,7 +55,7 @@ struct ZenServerInstance
m_TestDir = TestDir;
}
- void SpawnServer(int BasePort = 0);
+ void SpawnServer(int BasePort = 0, std::string_view AdditionalServerArgs = std::string_view());
void AttachToRunningServer(int BasePort = 0);
diff --git a/zenutil/zenserverprocess.cpp b/zenutil/zenserverprocess.cpp
index 5142c6a54..2f2b3bd33 100644
--- a/zenutil/zenserverprocess.cpp
+++ b/zenutil/zenserverprocess.cpp
@@ -395,7 +395,7 @@ ZenServerInstance::Shutdown()
}
void
-ZenServerInstance::SpawnServer(int BasePort)
+ZenServerInstance::SpawnServer(int BasePort, std::string_view AdditionalServerArgs)
{
ZEN_ASSERT(!m_Process.IsValid()); // Only spawn once
@@ -414,7 +414,7 @@ ZenServerInstance::SpawnServer(int BasePort)
zen::ExtendableStringBuilder<32> LogId;
LogId << "Zen" << ChildId;
- zen::ExtendableWideStringBuilder<128> CommandLine;
+ zen::ExtendableWideStringBuilder<512> CommandLine;
CommandLine << "\"";
CommandLine.Append(Executable.c_str());
CommandLine << "\"";
@@ -455,6 +455,11 @@ ZenServerInstance::SpawnServer(int BasePort)
CommandLine << " --mesh";
}
+ if (!AdditionalServerArgs.empty())
+ {
+ CommandLine << " " << AdditionalServerArgs;
+ }
+
std::filesystem::path CurrentDirectory = std::filesystem::current_path();
ZEN_DEBUG("Spawning server '{}'", LogId);