From 0f038977ebe428e6430153d4ab8927b85e306a2f Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sat, 14 Oct 2023 23:11:28 -0400 Subject: [PATCH] Fix using wrong OD `DMCompiler.exe` --- .../Components/Engine/OpenDreamInstaller.cs | 34 ++++++++++++++----- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs b/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs index 1aa0bec4ec..4857dc4c02 100644 --- a/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs +++ b/src/Tgstation.Server.Host/Components/Engine/OpenDreamInstaller.cs @@ -24,9 +24,14 @@ namespace Tgstation.Server.Host.Components.Engine class OpenDreamInstaller : EngineInstallerBase { /// - /// The name of the subdirectory used to store the server and compiler binaries. + /// The name of the subdirectory used to store the server binaries. /// - const string InstallationBinDirectory = "bin"; + const string InstallationServerDirectory = "server"; + + /// + /// The name of the subdirectory used to store the compiler binaries. + /// + const string InstallationCompilerDirectory = "compiler"; /// /// The name of the subdirectory used for the 's copy. @@ -226,16 +231,27 @@ namespace Tgstation.Server.Host.Components.Engine if (buildExitCode != 0) throw new JobException("OpenDream build failed!"); - await IOManager.MoveDirectory( + var serverMoveTask = IOManager.MoveDirectory( IOManager.ConcatPath( sourcePath, - InstallationBinDirectory, + "bin", "Content.Server"), IOManager.ConcatPath( installPath, - InstallationBinDirectory), + InstallationServerDirectory), cancellationToken); + var compilerMoveTask = IOManager.MoveDirectory( + IOManager.ConcatPath( + sourcePath, + "bin", + "DMCompiler"), + IOManager.ConcatPath( + installPath, + InstallationCompilerDirectory), + cancellationToken); + + await Task.WhenAll(serverMoveTask, compilerMoveTask); await IOManager.DeleteDirectory(sourcePath, cancellationToken); } @@ -275,18 +291,18 @@ namespace Tgstation.Server.Host.Components.Engine /// The path to the DMCompiler executable. protected void GetExecutablePaths(string installationPath, out string serverExePath, out string compilerExePath) { - var binPathForVersion = IOManager.ConcatPath(installationPath, InstallationBinDirectory); - var exeExtension = platformIdentifier.IsWindows ? ".exe" : String.Empty; serverExePath = IOManager.ConcatPath( - binPathForVersion, + installationPath, + InstallationServerDirectory, $"OpenDreamServer{exeExtension}"); compilerExePath = IOManager.ConcatPath( - binPathForVersion, + installationPath, + InstallationCompilerDirectory, $"DMCompiler{exeExtension}"); } }