diff --git a/_application_8cs_source.html b/_application_8cs_source.html index 636aaed4db..baa4937b64 100644 --- a/_application_8cs_source.html +++ b/_application_8cs_source.html @@ -787,7 +787,7 @@ $(function() {
Tgstation.Server.Host.System.PosixNetworkPromptReaper
Definition: PosixNetworkPromptReaper.cs:5
Tgstation.Server.Host.System.PosixProcessFeatures
Definition: PosixProcessFeatures.cs:17
Tgstation.Server.Host.System.PosixSignalHandler
Handles POSIX signals.
Definition: PosixSignalHandler.cs:19
-
Tgstation.Server.Host.System.ProcessExecutor
Definition: ProcessExecutor.cs:17
+
Tgstation.Server.Host.System.ProcessExecutor
Definition: ProcessExecutor.cs:19
Tgstation.Server.Host.System.SystemDManager
Implements the SystemD notify service protocol.
Definition: SystemDManager.cs:20
Tgstation.Server.Host.System.WindowsNetworkPromptReaper
Definition: WindowsNetworkPromptReaper.cs:20
Tgstation.Server.Host.System.WindowsProcessFeatures
Definition: WindowsProcessFeatures.cs:22
@@ -856,7 +856,7 @@ $(function() {
Tgstation.Server.Host.System.IAssemblyInformationProvider.VersionPrefix
string VersionPrefix
Prefix to VersionString.
Definition: IAssemblyInformationProvider.cs:25
Tgstation.Server.Host.System.INetworkPromptReaper
On Windows, DreamDaemon will show an unskippable prompt when using /world/proc/OpenPort()....
Definition: INetworkPromptReaper.cs:7
Tgstation.Server.Host.System.IPlatformIdentifier.IsWindows
bool IsWindows
If the current platform is a Windows platform.
Definition: IPlatformIdentifier.cs:14
-
Tgstation.Server.Host.System.IProcessExecutor
For launching IProcess'.
Definition: IProcessExecutor.cs:7
+
Tgstation.Server.Host.System.IProcessExecutor
For launching IProcess'.
Definition: IProcessExecutor.cs:9
Tgstation.Server.Host.System.IProcessFeatures
Abstraction for suspending and resuming processes.
Definition: IProcessFeatures.cs:10
Tgstation.Server.Host.Transfer.IFileTransferStreamHandler
Reads and writes to Streams associated with FileTicketResponses.
Definition: IFileTransferStreamHandler.cs:14
Tgstation.Server.Host.Transfer.IFileTransferTicketProvider
Service for temporarily storing files to be downloaded or uploaded.
Definition: IFileTransferTicketProvider.cs:9
@@ -869,7 +869,7 @@ $(function() {
Tgstation.Server.Common.Http
Definition: CachedResponseStream.cs:7
Tgstation.Server.Host.Components.Chat
Definition: ChannelMapping.cs:4
Tgstation.Server.Host.Components.Deployment.Remote
Definition: BaseRemoteDeploymentManager.cs:15
-
Tgstation.Server.Host.Components.Engine
Definition: ByondInstallation.cs:11
+
Tgstation.Server.Host.Components.Engine
Definition: ByondInstallation.cs:12
Tgstation.Server.Host.Components.Events
Definition: EventConsumer.cs:10
Tgstation.Server.Host.Components.Interop.Bridge
Definition: BridgeCommandType.cs:2
Tgstation.Server.Host.Components.Interop
Definition: BridgeCommandType.cs:2
diff --git a/_byond_installation_8cs_source.html b/_byond_installation_8cs_source.html index a79db5b3bf..54c7039f01 100644 --- a/_byond_installation_8cs_source.html +++ b/_byond_installation_8cs_source.html @@ -85,110 +85,113 @@ $(function() {
6using Tgstation.Server.Api.Models;
7using Tgstation.Server.Api.Models.Internal;
8using Tgstation.Server.Host.Components.Deployment;
-
9
-
10namespace Tgstation.Server.Host.Components.Engine
-
11{
-
15 sealed class ByondInstallation : EngineInstallationBase
-
16 {
-
18 public override EngineVersion Version { get; }
-
19
-
21 public override string ServerExePath { get; }
-
22
-
24 public override string CompilerExePath { get; }
-
25
-
27 public override bool PromptsForNetworkAccess { get; }
-
28
-
30 public override bool HasStandardOutput { get; }
-
31
-
33 public override bool PreferFileLogging => false;
-
34
-
36 public override Task InstallationTask { get; }
-
37
-
41 readonly bool supportsMapThreads;
-
42
-
48 static string SecurityWord(DreamDaemonSecurity securityLevel)
-
49 {
-
50 return securityLevel switch
-
51 {
-
52 DreamDaemonSecurity.Safe => "safe",
-
53 DreamDaemonSecurity.Trusted => "trusted",
-
54 DreamDaemonSecurity.Ultrasafe => "ultrasafe",
-
55 _ => throw new ArgumentOutOfRangeException(nameof(securityLevel), securityLevel, String.Format(CultureInfo.InvariantCulture, "Bad DreamDaemon security level: {0}", securityLevel)),
-
56 };
-
57 }
-
58
-
64 static string VisibilityWord(DreamDaemonVisibility visibility)
-
65 {
-
66 return visibility switch
-
67 {
-
68 DreamDaemonVisibility.Public => "public",
-
69 DreamDaemonVisibility.Private => "private",
-
70 DreamDaemonVisibility.Invisible => "invisible",
-
71 _ => throw new ArgumentOutOfRangeException(nameof(visibility), visibility, String.Format(CultureInfo.InvariantCulture, "Bad DreamDaemon visibility level: {0}", visibility)),
-
72 };
-
73 }
-
74
-
84 public ByondInstallation(
-
85 Task installationTask,
-
86 EngineVersion version,
-
87 string dreamDaemonPath,
-
88 string dreamMakerPath,
-
89 bool supportsCli,
-
90 bool supportsMapThreads)
-
91 {
-
92 InstallationTask = installationTask ?? throw new ArgumentNullException(nameof(installationTask));
-
93 ArgumentNullException.ThrowIfNull(version);
-
94
-
95 if (version.Engine != EngineType.Byond)
-
96 throw new ArgumentException($"Invalid EngineType: {version.Engine}", nameof(version));
-
97
-
98 Version = version ?? throw new ArgumentNullException(nameof(version));
-
99 ServerExePath = dreamDaemonPath ?? throw new ArgumentNullException(nameof(dreamDaemonPath));
-
100 CompilerExePath = dreamMakerPath ?? throw new ArgumentNullException(nameof(dreamMakerPath));
-
101 HasStandardOutput = supportsCli;
-
102 PromptsForNetworkAccess = !supportsCli;
-
103 this.supportsMapThreads = supportsMapThreads;
-
104 }
-
105
-
107 public override string FormatServerArguments(
-
108 IDmbProvider dmbProvider,
-
109 IReadOnlyDictionary<string, string> parameters,
-
110 DreamDaemonLaunchParameters launchParameters,
-
111 string? logFilePath)
-
112 {
-
113 ArgumentNullException.ThrowIfNull(dmbProvider);
-
114 ArgumentNullException.ThrowIfNull(parameters);
-
115 ArgumentNullException.ThrowIfNull(launchParameters);
-
116
-
117 var parametersString = EncodeParameters(parameters, launchParameters);
-
118
-
119 var arguments = String.Format(
-
120 CultureInfo.InvariantCulture,
-
121 "\"{0}\" -port {1} -ports 1-65535 {2}-close -verbose -{3} -{4}{5}{6}{7} -params \"{8}\"",
-
122 dmbProvider.DmbName,
-
123 launchParameters.Port!.Value,
-
124 launchParameters.AllowWebClient!.Value
-
125 ? "-webclient "
-
126 : String.Empty,
-
127 SecurityWord(launchParameters.SecurityLevel!.Value),
-
128 VisibilityWord(launchParameters.Visibility!.Value),
-
129 logFilePath != null
-
130 ? $" -logself -log {logFilePath}"
-
131 : String.Empty, // DD doesn't output anything if -logself is set???
-
132 launchParameters.StartProfiler!.Value
-
133 ? " -profile"
-
134 : String.Empty,
-
135 supportsMapThreads && launchParameters.MapThreads!.Value != 0
-
136 ? $" -map-threads {launchParameters.MapThreads.Value}"
-
137 : String.Empty,
-
138 parametersString);
-
139 return arguments;
-
140 }
-
141
-
143 public override string FormatCompilerArguments(string dmePath)
-
144 => $"-clean \"{dmePath ?? throw new ArgumentNullException(nameof(dmePath))}\"";
-
145 }
-
146}
+
9using Tgstation.Server.Host.IO;
+
10
+
11namespace Tgstation.Server.Host.Components.Engine
+
12{
+
16 sealed class ByondInstallation : EngineInstallationBase
+
17 {
+
19 public override EngineVersion Version { get; }
+
20
+
22 public override string ServerExePath { get; }
+
23
+
25 public override string CompilerExePath { get; }
+
26
+
28 public override bool PromptsForNetworkAccess { get; }
+
29
+
31 public override bool HasStandardOutput { get; }
+
32
+
34 public override bool PreferFileLogging => false;
+
35
+
37 public override Task InstallationTask { get; }
+
38
+
42 readonly bool supportsMapThreads;
+
43
+
49 static string SecurityWord(DreamDaemonSecurity securityLevel)
+
50 {
+
51 return securityLevel switch
+
52 {
+
53 DreamDaemonSecurity.Safe => "safe",
+
54 DreamDaemonSecurity.Trusted => "trusted",
+
55 DreamDaemonSecurity.Ultrasafe => "ultrasafe",
+
56 _ => throw new ArgumentOutOfRangeException(nameof(securityLevel), securityLevel, String.Format(CultureInfo.InvariantCulture, "Bad DreamDaemon security level: {0}", securityLevel)),
+
57 };
+
58 }
+
59
+
65 static string VisibilityWord(DreamDaemonVisibility visibility)
+
66 {
+
67 return visibility switch
+
68 {
+
69 DreamDaemonVisibility.Public => "public",
+
70 DreamDaemonVisibility.Private => "private",
+
71 DreamDaemonVisibility.Invisible => "invisible",
+
72 _ => throw new ArgumentOutOfRangeException(nameof(visibility), visibility, String.Format(CultureInfo.InvariantCulture, "Bad DreamDaemon visibility level: {0}", visibility)),
+
73 };
+
74 }
+
75
+
86 public ByondInstallation(
+
87 IIOManager installationIOManager,
+
88 Task installationTask,
+
89 EngineVersion version,
+
90 string dreamDaemonPath,
+
91 string dreamMakerPath,
+
92 bool supportsCli,
+
93 bool supportsMapThreads)
+
94 : base(installationIOManager)
+
95 {
+
96 InstallationTask = installationTask ?? throw new ArgumentNullException(nameof(installationTask));
+
97 ArgumentNullException.ThrowIfNull(version);
+
98
+
99 if (version.Engine != EngineType.Byond)
+
100 throw new ArgumentException($"Invalid EngineType: {version.Engine}", nameof(version));
+
101
+
102 Version = version ?? throw new ArgumentNullException(nameof(version));
+
103 ServerExePath = dreamDaemonPath ?? throw new ArgumentNullException(nameof(dreamDaemonPath));
+
104 CompilerExePath = dreamMakerPath ?? throw new ArgumentNullException(nameof(dreamMakerPath));
+
105 HasStandardOutput = supportsCli;
+
106 PromptsForNetworkAccess = !supportsCli;
+
107 this.supportsMapThreads = supportsMapThreads;
+
108 }
+
109
+
111 public override string FormatServerArguments(
+
112 IDmbProvider dmbProvider,
+
113 IReadOnlyDictionary<string, string> parameters,
+
114 DreamDaemonLaunchParameters launchParameters,
+
115 string? logFilePath)
+
116 {
+
117 ArgumentNullException.ThrowIfNull(dmbProvider);
+
118 ArgumentNullException.ThrowIfNull(parameters);
+
119 ArgumentNullException.ThrowIfNull(launchParameters);
+
120
+
121 var parametersString = EncodeParameters(parameters, launchParameters);
+
122
+
123 var arguments = String.Format(
+
124 CultureInfo.InvariantCulture,
+
125 "\"{0}\" -port {1} -ports 1-65535 {2}-close -verbose -{3} -{4}{5}{6}{7} -params \"{8}\"",
+
126 dmbProvider.DmbName,
+
127 launchParameters.Port!.Value,
+
128 launchParameters.AllowWebClient!.Value
+
129 ? "-webclient "
+
130 : String.Empty,
+
131 SecurityWord(launchParameters.SecurityLevel!.Value),
+
132 VisibilityWord(launchParameters.Visibility!.Value),
+
133 logFilePath != null
+
134 ? $" -logself -log {logFilePath}"
+
135 : String.Empty, // DD doesn't output anything if -logself is set???
+
136 launchParameters.StartProfiler!.Value
+
137 ? " -profile"
+
138 : String.Empty,
+
139 supportsMapThreads && launchParameters.MapThreads!.Value != 0
+
140 ? $" -map-threads {launchParameters.MapThreads.Value}"
+
141 : String.Empty,
+
142 parametersString);
+
143 return arguments;
+
144 }
+
145
+
147 public override string FormatCompilerArguments(string dmePath)
+
148 => $"-clean \"{dmePath ?? throw new ArgumentNullException(nameof(dmePath))}\"";
+
149 }
+
150}
Tgstation.Server.Api.Models.EngineVersion
Information about an engine installation.
Definition: EngineVersion.cs:14
Tgstation.Server.Api.Models.EngineVersion.Engine
EngineType? Engine
The EngineType.
Definition: EngineVersion.cs:19
Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters
Launch settings for DreamDaemon.
Definition: DreamDaemonLaunchParameters.cs:10
@@ -198,31 +201,33 @@ $(function() {
Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.StartProfiler
bool? StartProfiler
If -profile is passed in on the DreamDaemon command line. No-op for EngineType.OpenDream.
Definition: DreamDaemonLaunchParameters.cs:23
Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.SecurityLevel
DreamDaemonSecurity? SecurityLevel
The DreamDaemonSecurity level of DreamDaemon. No-op for EngineType.OpenDream.
Definition: DreamDaemonLaunchParameters.cs:39
Tgstation.Server.Api.Models.Internal.DreamDaemonLaunchParameters.MapThreads
uint? MapThreads
If DreamDaemon supports it, the value added as the -map-threads parameter. 0 uses the default BYOND v...
Definition: DreamDaemonLaunchParameters.cs:99
-
Tgstation.Server.Host.Components.Engine.ByondInstallation
Implementation of IEngineInstallation for EngineType.Byond.
Definition: ByondInstallation.cs:16
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.supportsMapThreads
readonly bool supportsMapThreads
If map threads are supported by the Version.
Definition: ByondInstallation.cs:41
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.PromptsForNetworkAccess
override bool PromptsForNetworkAccess
If ServerExePath may create network prompts.
Definition: ByondInstallation.cs:27
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.VisibilityWord
static string VisibilityWord(DreamDaemonVisibility visibility)
Change a given visibility into the appropriate DreamDaemon command line word.
Definition: ByondInstallation.cs:64
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.SecurityWord
static string SecurityWord(DreamDaemonSecurity securityLevel)
Change a given securityLevel into the appropriate DreamDaemon command line word.
Definition: ByondInstallation.cs:48
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.ByondInstallation
ByondInstallation(Task installationTask, EngineVersion version, string dreamDaemonPath, string dreamMakerPath, bool supportsCli, bool supportsMapThreads)
Initializes a new instance of the ByondInstallation class.
Definition: ByondInstallation.cs:84
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.ServerExePath
override string ServerExePath
The full path to the game server executable.
Definition: ByondInstallation.cs:21
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.InstallationTask
override Task InstallationTask
The Task that completes when the BYOND version finished installing.
Definition: ByondInstallation.cs:36
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.FormatServerArguments
override string FormatServerArguments(IDmbProvider dmbProvider, IReadOnlyDictionary< string, string > parameters, DreamDaemonLaunchParameters launchParameters, string? logFilePath)
Return the command line arguments for launching with given launchParameters . The formatted arguments...
Definition: ByondInstallation.cs:107
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.HasStandardOutput
override bool HasStandardOutput
If ServerExePath supports being run as a command-line application and outputs log information to be c...
Definition: ByondInstallation.cs:30
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.Version
override EngineVersion Version
The EngineVersion of the IEngineInstallation.
Definition: ByondInstallation.cs:18
+
Tgstation.Server.Host.Components.Engine.ByondInstallation
Implementation of IEngineInstallation for EngineType.Byond.
Definition: ByondInstallation.cs:17
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.supportsMapThreads
readonly bool supportsMapThreads
If map threads are supported by the Version.
Definition: ByondInstallation.cs:42
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.PromptsForNetworkAccess
override bool PromptsForNetworkAccess
If ServerExePath may create network prompts.
Definition: ByondInstallation.cs:28
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.VisibilityWord
static string VisibilityWord(DreamDaemonVisibility visibility)
Change a given visibility into the appropriate DreamDaemon command line word.
Definition: ByondInstallation.cs:65
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.SecurityWord
static string SecurityWord(DreamDaemonSecurity securityLevel)
Change a given securityLevel into the appropriate DreamDaemon command line word.
Definition: ByondInstallation.cs:49
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.ServerExePath
override string ServerExePath
The full path to the game server executable.
Definition: ByondInstallation.cs:22
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.InstallationTask
override Task InstallationTask
The Task that completes when the BYOND version finished installing.
Definition: ByondInstallation.cs:37
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.ByondInstallation
ByondInstallation(IIOManager installationIOManager, Task installationTask, EngineVersion version, string dreamDaemonPath, string dreamMakerPath, bool supportsCli, bool supportsMapThreads)
Initializes a new instance of the ByondInstallation class.
Definition: ByondInstallation.cs:86
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.FormatServerArguments
override string FormatServerArguments(IDmbProvider dmbProvider, IReadOnlyDictionary< string, string > parameters, DreamDaemonLaunchParameters launchParameters, string? logFilePath)
Return the command line arguments for launching with given launchParameters . The formatted arguments...
Definition: ByondInstallation.cs:111
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.HasStandardOutput
override bool HasStandardOutput
If ServerExePath supports being run as a command-line application and outputs log information to be c...
Definition: ByondInstallation.cs:31
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.Version
override EngineVersion Version
The EngineVersion of the IEngineInstallation.
Definition: ByondInstallation.cs:19
Tgstation.Server.Host.Components.Engine.ByondInstallation.FormatCompilerArguments
override string FormatCompilerArguments(string dmePath)
Return the command line arguments for compiling a given dmePath if compilation is necessary....
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.PreferFileLogging
override bool PreferFileLogging
If HasStandardOutput is set, this indicates that the engine server has good file logging that should ...
Definition: ByondInstallation.cs:33
-
Tgstation.Server.Host.Components.Engine.ByondInstallation.CompilerExePath
override string CompilerExePath
The full path to the dm/DreamMaker executable.
Definition: ByondInstallation.cs:24
-
Tgstation.Server.Host.Components.Engine.EngineInstallationBase
Definition: EngineInstallationBase.cs:19
-
Tgstation.Server.Host.Components.Engine.EngineInstallationBase.EncodeParameters
static string EncodeParameters(IReadOnlyDictionary< string, string > parameters, DreamDaemonLaunchParameters launchParameters)
Encode given parameters for passing as world.params on the command line.
Definition: EngineInstallationBase.cs:47
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.PreferFileLogging
override bool PreferFileLogging
If HasStandardOutput is set, this indicates that the engine server has good file logging that should ...
Definition: ByondInstallation.cs:34
+
Tgstation.Server.Host.Components.Engine.ByondInstallation.CompilerExePath
override string CompilerExePath
The full path to the dm/DreamMaker executable.
Definition: ByondInstallation.cs:25
+
Tgstation.Server.Host.Components.Engine.EngineInstallationBase
Definition: EngineInstallationBase.cs:23
+
Tgstation.Server.Host.Components.Engine.EngineInstallationBase.EncodeParameters
static string EncodeParameters(IReadOnlyDictionary< string, string > parameters, DreamDaemonLaunchParameters launchParameters)
Encode given parameters for passing as world.params on the command line.
Definition: EngineInstallationBase.cs:56
Tgstation.Server.Host.Components.Deployment.IDmbProvider
Provides absolute paths to the latest compiled .dmbs.
Definition: IDmbProvider.cs:11
Tgstation.Server.Host.Components.Deployment.IDmbProvider.DmbName
string DmbName
The file name of the .dmb.
Definition: IDmbProvider.cs:15
+
Tgstation.Server.Host.IO.IIOManager
Interface for using filesystems.
Definition: IIOManager.cs:13
Tgstation.Server.Api.Models.Internal
Definition: ChatBotApiBase.cs:6
Tgstation.Server.Api.Models
Definition: ChatChannel.cs:6
Tgstation.Server.Api.Models.DreamDaemonVisibility
DreamDaemonVisibility
The visibility setting for DreamDaemon.
Definition: DreamDaemonVisibility.cs:7
Tgstation.Server.Api.Models.DreamDaemonSecurity
DreamDaemonSecurity
DreamDaemon's security level.
Definition: DreamDaemonSecurity.cs:7
Tgstation.Server.Api.Models.EngineType
EngineType
The type of engine the codebase is using.
Definition: EngineType.cs:7
Tgstation.Server.Host.Components.Deployment
Definition: DmbFactory.cs:22
-
Tgstation.Server.Host.Components.Engine
Definition: ByondInstallation.cs:11
+
Tgstation.Server.Host.Components.Engine
Definition: ByondInstallation.cs:12
+
Tgstation.Server.Host.IO
Definition: BufferedFileStreamProvider.cs:9