Only disable service mode on Windows Server 2019
This commit is contained in:
@@ -8,6 +8,7 @@ using System.Reflection;
|
|||||||
using System.ServiceProcess;
|
using System.ServiceProcess;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading;
|
using System.Threading;
|
||||||
|
using Microsoft.VisualBasic.Devices;
|
||||||
using NLog;
|
using NLog;
|
||||||
using NLog.Fluent;
|
using NLog.Fluent;
|
||||||
using NLog.Targets;
|
using NLog.Targets;
|
||||||
@@ -59,13 +60,13 @@ namespace Torch.Server
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Breaks on Windows Server 2019 and we don't fully support services anyway
|
// Breaks on Windows Server 2019
|
||||||
if (!Environment.UserInteractive)
|
if (!new ComputerInfo().OSFullName.Contains("Server 2019") && !Environment.UserInteractive)
|
||||||
{
|
{
|
||||||
using (var service = new TorchService())
|
using (var service = new TorchService())
|
||||||
ServiceBase.Run(service);
|
ServiceBase.Run(service);
|
||||||
return;
|
return;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
var initializer = new Initializer(workingDir);
|
var initializer = new Initializer(workingDir);
|
||||||
if (!initializer.Initialize(args))
|
if (!initializer.Initialize(args))
|
||||||
|
@@ -83,6 +83,7 @@
|
|||||||
<HintPath>..\GameBinaries\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
<HintPath>..\GameBinaries\Microsoft.CodeAnalysis.CSharp.dll</HintPath>
|
||||||
<Private>False</Private>
|
<Private>False</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
<Reference Include="Microsoft.VisualBasic" />
|
||||||
<Reference Include="Microsoft.Win32.Registry, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
<Reference Include="Microsoft.Win32.Registry, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||||
<HintPath>..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
<HintPath>..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll</HintPath>
|
||||||
</Reference>
|
</Reference>
|
||||||
|
Reference in New Issue
Block a user