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.
abstract 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 run...
abstract ValueTask< IEngineInstallationData > DownloadVersion(EngineVersion version, JobProgressReporter? jobProgressReporter, CancellationToken cancellationToken)
Download a given engine version . A ValueTask<TResult> resulting in the IEngineInstallationData for t...
abstract Task CleanCache(CancellationToken cancellationToken)
Attempts to cleans the engine's cache folder for the system. A Task representing the running operatio...
void CheckVersionValidity(EngineVersion version)
Check that a given version is of type EngineType.Byond.
abstract IEngineInstallation CreateInstallation(EngineVersion version, string path, Task installationTask)
Creates an IEngineInstallation for a given version . The IEngineInstallation.
IIOManager IOManager
Gets the IIOManager for the EngineInstallerBase.
EngineInstallerBase(IIOManager ioManager, ILogger< EngineInstallerBase > logger)
Initializes a new instance of the EngineInstallerBase class.
abstract ValueTask Install(EngineVersion version, string path, bool deploymentPipelineProcesses, CancellationToken cancellationToken)
Does actions necessary to get an extracted installation working. A ValueTask representing the running...
ILogger< EngineInstallerBase > Logger
Gets the ILogger for the EngineInstallerBase.
abstract EngineType TargetEngineType
The EngineType the installer supports.
abstract ValueTask UpgradeInstallation(EngineVersion version, string path, CancellationToken cancellationToken)
Does actions necessary to get upgrade a version installed by a previous version of TGS....
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.