3using System.Threading.Tasks;
5using Microsoft.Extensions.Logging;
6using Microsoft.Extensions.Options;
45 ILogger<WindowsOpenDreamInstaller> logger,
51 IOptions<GeneralConfiguration> generalConfigurationOptions,
52 IOptions<SessionConfiguration> sessionConfigurationOptions,
62 generalConfigurationOptions,
63 sessionConfigurationOptions)
69 public override ValueTask
Install(
EngineVersion version,
string installPath,
bool deploymentPipelineProcesses, CancellationToken cancellationToken)
71 var installTask = base.Install(
74 deploymentPipelineProcesses,
79 deploymentPipelineProcesses,
86 protected override async ValueTask
HandleExtremelyLongPathOperation(Func<string, ValueTask> shortenedPathOperation,
string originalPath, CancellationToken cancellationToken)
88 var shortPath = $
"C:/{Guid.NewGuid()}";
89 Logger.LogDebug(
"Shortening path for build from {long} to {short}...", originalPath, shortPath);
93 await shortenedPathOperation(shortPath);
122 var ruleName = $
"TGS OpenDream {version}";
Information about an engine installation.
Extension methods for the ValueTask and ValueTask<TResult> classes.
static async ValueTask WhenAll(IEnumerable< ValueTask > tasks)
Fully await a given list of tasks .
IIOManager IOManager
Gets the IIOManager for the EngineInstallerBase.
ILogger< EngineInstallerBase > Logger
Gets the ILogger for the EngineInstallerBase.
Implementation of IEngineInstaller for EngineType.OpenDream.
void GetExecutablePaths(string installationPath, out string serverExePath, out string compilerExePath)
Gets the paths to the server and client executables.
readonly IAbstractHttpClientFactory httpClientFactory
The IAbstractHttpClientFactory for the OpenDreamInstaller.
readonly IPlatformIdentifier platformIdentifier
The IPlatformIdentifier for the OpenDreamInstaller.
readonly IRepositoryManager repositoryManager
The IRepositoryManager for the OpenDream repository.
readonly IAsyncDelayer asyncDelayer
The IAsyncDelayer for the OpenDreamInstaller.
Implementation of OpenDreamInstaller for Windows systems.
WindowsOpenDreamInstaller(IIOManager ioManager, ILogger< WindowsOpenDreamInstaller > logger, IPlatformIdentifier platformIdentifier, IProcessExecutor processExecutor, IRepositoryManager repositoryManager, IAsyncDelayer asyncDelayer, IAbstractHttpClientFactory httpClientFactory, IOptions< GeneralConfiguration > generalConfigurationOptions, IOptions< SessionConfiguration > sessionConfigurationOptions, IFilesystemLinkFactory linkFactory)
Initializes a new instance of the WindowsOpenDreamInstaller class.
override async ValueTask HandleExtremelyLongPathOperation(Func< string, ValueTask > shortenedPathOperation, string originalPath, CancellationToken cancellationToken)
Perform an operation on a very long path.A ValueTask representing the running operation.
async ValueTask AddServerFirewallException(EngineVersion version, string path, bool deploymentPipelineProcesses, CancellationToken cancellationToken)
Attempt to add the DreamDaemon executable as an exception to the Windows firewall.
override ValueTask Install(EngineVersion version, string installPath, bool deploymentPipelineProcesses, CancellationToken cancellationToken)
Does actions necessary to get an extracted installation working.A ValueTask representing the running ...
readonly IFilesystemLinkFactory linkFactory
The IFilesystemLinkFactory for the WindowsOpenDreamInstaller.
General configuration options.
bool SkipAddingByondFirewallException
If the netsh.exe execution to exempt DreamDaemon from Windows firewall should be skipped.
Configuration options for the game sessions.
bool LowPriorityDeploymentProcesses
If the deployment DreamMaker and DreamDaemon instances are set to be below normal priority processes.
Operation exceptions thrown from the context of a Models.Job.
Helper class for interacting with the Windows Firewall.
static async ValueTask< int > AddFirewallException(IProcessExecutor processExecutor, ILogger logger, string exceptionName, string exePath, bool lowPriority, CancellationToken cancellationToken)
Add an executable exception to the Windows firewall.
Factory for creating and loading IRepositorys.
For creating filesystem symbolic links.
Task CreateSymbolicLink(string targetPath, string linkPath, CancellationToken cancellationToken)
Create a symbolic link.
Interface for using filesystems.
Task DeleteDirectory(string path, CancellationToken cancellationToken)
Recursively delete a directory, removes and does not enter any symlinks encounterd.
For waiting asynchronously.
ErrorCode
Types of Response.ErrorMessageResponses that the API may return.