aboutsummaryrefslogtreecommitdiff
path: root/zenserver/config.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-17 19:11:11 +0200
committerStefan Boberg <[email protected]>2021-09-17 19:11:11 +0200
commit03dddb20a2a378eaf8c529a986ccfaeb8ee019a7 (patch)
tree2aa5ee04c38ae5a69acf2558e736e9eb785c2284 /zenserver/config.cpp
parentAdded UNICODE and defined _WIN32_WINNT to match the sln (diff)
downloadzen-03dddb20a2a378eaf8c529a986ccfaeb8ee019a7.tar.xz
zen-03dddb20a2a378eaf8c529a986ccfaeb8ee019a7.zip
Implemented basics for Windows server support (not yet 100% - needs to properly report service state etc to the OS)
Diffstat (limited to 'zenserver/config.cpp')
-rw-r--r--zenserver/config.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/zenserver/config.cpp b/zenserver/config.cpp
index 578a3a202..092fc6998 100644
--- a/zenserver/config.cpp
+++ b/zenserver/config.cpp
@@ -77,6 +77,21 @@ ParseGlobalCliOptions(int argc, char* argv[], ZenServerOptions& GlobalOptions, Z
cxxopts::value<std::string>(GlobalOptions.ChildId),
"<identifier>");
+#if ZEN_PLATFORM_WINDOWS
+ options.add_option("lifetime",
+ "",
+ "install",
+ "Install zenserver as a Windows service",
+ cxxopts::value<bool>(GlobalOptions.InstallService),
+ "");
+ options.add_option("lifetime",
+ "",
+ "uninstall",
+ "Uninstall zenserver as a Windows service",
+ cxxopts::value<bool>(GlobalOptions.UninstallService),
+ "");
+#endif
+
options.add_option("network",
"p",
"port",