Fix to allow Torch to run as a service.

This commit is contained in:
Rene K
2017-08-05 13:06:15 +02:00
parent 97da740e7e
commit 0a38eb770d
2 changed files with 6 additions and 2 deletions

View File

@@ -31,7 +31,7 @@ namespace Torch.Server
{
base.OnStart(args);
string configName = args.Length > 0 ? args[0] : "TorchConfig.xml";
string configName = args.Length > 0 ? args[0] : "Torch.cfg";
var options = new TorchConfig("Torch");
if (File.Exists(configName))
options = TorchConfig.LoadFrom(configName);

View File

@@ -229,7 +229,11 @@ namespace Torch
TorchVersion = Assembly.GetEntryAssembly().GetName().Version;
GameVersion = new Version(new MyVersion(MyPerGameSettings.BasicGameInfo.GameVersion.Value).FormattedText.ToString().Replace("_", "."));
var verInfo = $"{Config.InstanceName} - Torch {TorchVersion}, SE {GameVersion}";
Console.Title = verInfo;
try { Console.Title = verInfo; }
catch {
///Running as service
}
#if DEBUG
Log.Info("DEBUG");
#else