mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 07:04:57 +01:00
Fix BYOND updates not triggering recompile
This commit is contained in:
@@ -306,8 +306,15 @@ namespace TGS.Server
|
||||
RevisionStaging = null;
|
||||
}
|
||||
}
|
||||
if(staged)
|
||||
Compile();
|
||||
if (staged)
|
||||
lock (ByondLock)
|
||||
{
|
||||
//Some fuckery to trick the compiler into starting even though we're staged
|
||||
//Won't fuck up the actual compiler thread though
|
||||
updateStat = ByondStatus.Idle;
|
||||
Compile();
|
||||
updateStat = ByondStatus.Staged;
|
||||
}
|
||||
}
|
||||
/// <inheritdoc />
|
||||
public bool UpdateToVersion(int major, int minor)
|
||||
|
||||
@@ -289,15 +289,6 @@ namespace TGS.Server
|
||||
{
|
||||
try
|
||||
{
|
||||
if (GetVersion(ByondVersion.Installed) == null)
|
||||
{
|
||||
lock (CompilerLock)
|
||||
{
|
||||
lastCompilerError = "BYOND not installed!";
|
||||
compilerCurrentStatus = CompilerStatus.Initialized;
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!RepoConfigsMatch())
|
||||
{
|
||||
lock (CompilerLock)
|
||||
@@ -419,15 +410,23 @@ namespace TGS.Server
|
||||
return;
|
||||
}
|
||||
|
||||
bool stagedBuild;
|
||||
lock (ByondLock)
|
||||
{
|
||||
stagedBuild = updateStat == ByondStatus.Staged;
|
||||
if (stagedBuild)
|
||||
updateStat = ByondStatus.CompilingStaged;
|
||||
else if (GetVersion(ByondVersion.Installed) == null)
|
||||
lock (CompilerLock)
|
||||
{
|
||||
lastCompilerError = "BYOND not installed!";
|
||||
compilerCurrentStatus = CompilerStatus.Initialized;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
using (var DM = new Process()) //will kill the process if the thread is terminated
|
||||
{
|
||||
bool stagedBuild;
|
||||
lock (ByondLock)
|
||||
{
|
||||
stagedBuild = updateStat == ByondStatus.Staged;
|
||||
if (stagedBuild)
|
||||
updateStat = ByondStatus.CompilingStaged;
|
||||
}
|
||||
DM.StartInfo.FileName = RelativePath(Path.Combine(stagedBuild ? StagingDirectoryInner : ByondDirectory, "bin/dm.exe"));
|
||||
DM.StartInfo.Arguments = String.Format("-clean {0}", dmePath);
|
||||
DM.StartInfo.RedirectStandardOutput = true;
|
||||
|
||||
Reference in New Issue
Block a user