tgstation-server 6.17.0
The /tg/station 13 server suite
|
Base implementation of IEngineInstaller for EngineType.Byond. More...
Public Member Functions | |||||||||
override ValueTask< IEngineInstallation > | CreateInstallation (EngineVersion version, string path, Task installationTask, CancellationToken cancellationToken) | ||||||||
Creates an IEngineInstallation for a given version .
| |||||||||
override async Task | CleanCache (CancellationToken cancellationToken) | ||||||||
Attempts to cleans the engine's cache folder for the system.
| |||||||||
override async ValueTask< IEngineInstallationData > | DownloadVersion (EngineVersion version, JobProgressReporter progressReporter, CancellationToken cancellationToken) | ||||||||
Download a given engine version .
| |||||||||
![]() | |||||||||
ValueTask< IEngineInstallation > | CreateInstallation (EngineVersion version, string path, Task installationTask, CancellationToken cancellationToken) | ||||||||
Creates an IEngineInstallation for a given version .
| |||||||||
Task | CleanCache (CancellationToken cancellationToken) | ||||||||
Attempts to cleans the engine's cache folder for the system.
| |||||||||
ValueTask | Install (EngineVersion version, string path, bool deploymentPipelineProcesses, CancellationToken cancellationToken) | ||||||||
Does actions necessary to get an extracted installation working.
| |||||||||
ValueTask | UpgradeInstallation (EngineVersion version, string path, CancellationToken cancellationToken) | ||||||||
Does actions necessary to get upgrade a version installed by a previous version of TGS.
| |||||||||
ValueTask< IEngineInstallationData > | DownloadVersion (EngineVersion version, JobProgressReporter jobProgressReporter, CancellationToken cancellationToken) | ||||||||
Download a given engine version .
| |||||||||
ValueTask | TrustDmbPath (EngineVersion version, string fullDmbPath, CancellationToken cancellationToken) | ||||||||
Add a given fullDmbPath to the trusted DMBs list in BYOND's config.
| |||||||||
Protected Member Functions | |
ByondInstallerBase (IIOManager ioManager, ILogger< ByondInstallerBase > logger, IFileDownloader fileDownloader) | |
Initializes a new instance of the ByondInstallerBase class. | |
string | GetDreamDaemonName (Version byondVersion, out bool supportsCli) |
Get the file name of the DreamDaemon executable. | |
virtual IEnumerable< string > | AdditionalCacheCleanFilePaths (string configDirectory) |
List off additional file paths in the configDirectory to delete. | |
![]() | |
EngineInstallerBase (IIOManager ioManager, ILogger< EngineInstallerBase > logger) | |
Initializes a new instance of the EngineInstallerBase class. | |
void | CheckVersionValidity (EngineVersion version) |
Check that a given version is of type EngineType.Byond. | |
Static Protected Attributes | |
const string | ByondBinPath = "byond/bin" |
The path to the BYOND bin folder. | |
const string | CfgDirectoryName = "cfg" |
The path to the cfg directory. | |
Properties | |
override EngineType | TargetEngineType [get] |
string | PathToUserFolder [get] |
Path to the system user's local BYOND folder. | |
string | DreamMakerName [get] |
Path to the DreamMaker executable. | |
string | ByondRevisionsUrlTemplate [get] |
Gets the URL formatter string for downloading a byond version of {0:Major} {1:Minor}. | |
![]() | |
EngineType | TargetEngineType [get] |
The EngineType the installer supports. | |
IIOManager | IOManager [get] |
Gets the IIOManager for the EngineInstallerBase. | |
ILogger< EngineInstallerBase > | Logger [get] |
Gets the ILogger for the EngineInstallerBase. | |
Private Member Functions | |
Uri | GetDownloadZipUrl (EngineVersion version) |
Create a Uri pointing to the location of the download for a given version . | |
Private Attributes | |
readonly IFileDownloader | fileDownloader |
The IFileDownloader for the ByondInstallerBase. | |
Static Private Attributes | |
const string | CacheDirectoryName = "cache" |
The name of BYOND's cache directory. | |
static readonly Version | MapThreadsVersion = new(515, 1609) |
The first Version of BYOND that supports the '-map-threads' parameter on DreamDaemon. | |
Base implementation of IEngineInstaller for EngineType.Byond.
Definition at line 19 of file ByondInstallerBase.cs.
|
protected |
Initializes a new instance of the ByondInstallerBase class.
ioManager | The IIOManager for the EngineInstallerBase. |
logger | The ILogger for the EngineInstallerBase. |
fileDownloader | The value of fileDownloader. |
Definition at line 70 of file ByondInstallerBase.cs.
References Tgstation.Server.Host.Components.Engine.ByondInstallerBase.fileDownloader.
|
protectedvirtual |
List off additional file paths in the configDirectory to delete.
configDirectory | The full path to the relevant CfgDirectoryName. |
Reimplemented in Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CleanCache().
override async Task Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CleanCache | ( | CancellationToken | cancellationToken | ) |
Attempts to cleans the engine's cache folder for the system.
cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Host.Components.Engine.IEngineInstaller.
Definition at line 104 of file ByondInstallerBase.cs.
References Tgstation.Server.Host.Components.Engine.ByondInstallerBase.AdditionalCacheCleanFilePaths(), Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CacheDirectoryName, Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CfgDirectoryName, Tgstation.Server.Host.IO.IIOManager.ConcatPath(), Tgstation.Server.Host.IO.IIOManager.CreateDirectory(), Tgstation.Server.Host.IO.IIOManager.DeleteDirectory(), Tgstation.Server.Host.IO.IIOManager.DeleteFile(), Tgstation.Server.Host.Components.Engine.EngineInstallerBase.IOManager, Tgstation.Server.Host.Components.Engine.EngineInstallerBase.Logger, and Tgstation.Server.Host.Components.Engine.ByondInstallerBase.PathToUserFolder.
override ValueTask< IEngineInstallation > Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CreateInstallation | ( | EngineVersion | version, |
string | path, | ||
Task | installationTask, | ||
CancellationToken | cancellationToken | ||
) |
Creates an IEngineInstallation for a given version .
version | The EngineVersion of the installation. |
path | The path to the installation. |
installationTask | The Task representing the installation process for the installation. |
cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Host.Components.Engine.IEngineInstaller.
Definition at line 77 of file ByondInstallerBase.cs.
References Tgstation.Server.Host.Components.Engine.ByondInstallerBase.ByondBinPath, Tgstation.Server.Host.Components.Engine.EngineInstallerBase.CheckVersionValidity(), Tgstation.Server.Host.Components.Engine.ByondInstallerBase.DreamMakerName, Tgstation.Server.Host.Components.Engine.ByondInstallerBase.GetDreamDaemonName(), Tgstation.Server.Host.Components.Engine.EngineInstallerBase.IOManager, Tgstation.Server.Host.Components.Engine.ByondInstallerBase.MapThreadsVersion, and Tgstation.Server.Api.Models.EngineVersion.Version.
override async ValueTask< IEngineInstallationData > Tgstation.Server.Host.Components.Engine.ByondInstallerBase.DownloadVersion | ( | EngineVersion | version, |
JobProgressReporter | progressReporter, | ||
CancellationToken | cancellationToken | ||
) |
Download a given engine version .
version | The EngineVersion of the engine to download. |
jobProgressReporter | The JobProgressReporter for the operation. |
cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Host.Components.Engine.IEngineInstaller.
Definition at line 150 of file ByondInstallerBase.cs.
References Tgstation.Server.Host.Components.Engine.EngineInstallerBase.CheckVersionValidity(), Tgstation.Server.Host.IO.IFileDownloader.DownloadFile(), Tgstation.Server.Host.Components.Engine.ByondInstallerBase.fileDownloader, Tgstation.Server.Host.Components.Engine.ByondInstallerBase.GetDownloadZipUrl(), Tgstation.Server.Host.Components.Engine.EngineInstallerBase.IOManager, Tgstation.Server.Host.Components.Engine.EngineInstallerBase.Logger, and Tgstation.Server.Host.Components.Engine.ByondInstallerBase.TargetEngineType.
|
private |
Create a Uri pointing to the location of the download for a given version .
version | The EngineVersion to create a Uri for. |
Definition at line 195 of file ByondInstallerBase.cs.
References Tgstation.Server.Host.Components.Engine.ByondInstallerBase.ByondRevisionsUrlTemplate, Tgstation.Server.Host.Components.Engine.EngineInstallerBase.CheckVersionValidity(), and Tgstation.Server.Api.Models.EngineVersion.Version.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.DownloadVersion().
|
abstractprotected |
Get the file name of the DreamDaemon executable.
byondVersion | The Version of BYOND to select the executable name for. |
supportsCli | Whether or not the returned path supports being run as a command-line application. |
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CreateInstallation().
|
staticprotected |
The path to the BYOND bin folder.
Definition at line 24 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.AddDreamDaemonToFirewall(), Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CreateInstallation(), and Tgstation.Server.Host.Components.Engine.PosixByondInstaller.Install().
|
staticprivate |
The name of BYOND's cache directory.
Definition at line 34 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CleanCache().
|
staticprotected |
The path to the cfg directory.
Definition at line 29 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CleanCache(), and Tgstation.Server.Host.Components.Engine.WindowsByondInstaller.TrustDmbPath().
|
private |
The IFileDownloader for the ByondInstallerBase.
Definition at line 62 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.ByondInstallerBase(), and Tgstation.Server.Host.Components.Engine.ByondInstallerBase.DownloadVersion().
|
staticprivate |
The first Version of BYOND that supports the '-map-threads' parameter on DreamDaemon.
Definition at line 39 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CreateInstallation().
|
getabstractprotected |
Gets the URL formatter string for downloading a byond version of {0:Major} {1:Minor}.
Definition at line 57 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.GetDownloadZipUrl().
|
getabstractprotected |
Path to the DreamMaker executable.
Definition at line 52 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CreateInstallation().
|
getabstractprotected |
Path to the system user's local BYOND folder.
Definition at line 47 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.CleanCache().
|
getprotected |
Definition at line 42 of file ByondInstallerBase.cs.
Referenced by Tgstation.Server.Host.Components.Engine.ByondInstallerBase.DownloadVersion().