3using System.Threading.Tasks;
5using Microsoft.Extensions.Logging;
29 protected ILogger<EngineInstallerBase>
Logger {
get; }
38 IOManager = ioManager ??
throw new ArgumentNullException(nameof(ioManager));
39 Logger = logger ??
throw new ArgumentNullException(nameof(logger));
46 public abstract Task
CleanCache(CancellationToken cancellationToken);
49 public abstract ValueTask
Install(
EngineVersion version,
string path,
bool deploymentPipelineProcesses, CancellationToken cancellationToken);
66 ArgumentNullException.ThrowIfNull(version);
68 throw new InvalidOperationException($
"Non-{TargetEngineType} engine specified: {version.Engine.Value}");
Information about an engine installation.
EngineType? Engine
The EngineType.
ValueTask Install(EngineVersion version, string path, bool deploymentPipelineProcesses, CancellationToken cancellationToken)
Does actions necessary to get an extracted installation working.A ValueTask representing the running ...
ValueTask TrustDmbPath(EngineVersion version, string fullDmbPath, CancellationToken cancellationToken)
Add a given fullDmbPath to the trusted DMBs list in BYOND's config.A ValueTask representing the runn...
ValueTask UpgradeInstallation(EngineVersion version, string path, CancellationToken cancellationToken)
Does actions necessary to get upgrade a version installed by a previous version of TGS....
EngineType TargetEngineType
The EngineType the installer supports.
IEngineInstallation CreateInstallation(EngineVersion version, string path, Task installationTask)
Creates an IEngineInstallation for a given version .The IEngineInstallation.
Task CleanCache(CancellationToken cancellationToken)
Attempts to cleans the engine's cache folder for the system.A Task representing the running operation...
void CheckVersionValidity(EngineVersion version)
Check that a given version is of type EngineType.Byond.
IIOManager IOManager
Gets the IIOManager for the EngineInstallerBase.
EngineInstallerBase(IIOManager ioManager, ILogger< EngineInstallerBase > logger)
Initializes a new instance of the EngineInstallerBase class.
ILogger< EngineInstallerBase > Logger
Gets the ILogger for the EngineInstallerBase.
ValueTask< IEngineInstallationData > DownloadVersion(EngineVersion version, JobProgressReporter jobProgressReporter, CancellationToken cancellationToken)
Download a given engine version .A ValueTask<TResult> resulting in the IEngineInstallationData for th...
Progress reporter for a Job.
Represents a BYOND installation.
For downloading and installing game engines for a given system.
Interface for using filesystems.
EngineType
The type of engine the codebase is using.