Merge pull request #67 from Mavy87/master
Fix to allow Torch to run as a service.
This commit is contained in:
@@ -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);
|
||||
|
@@ -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
|
||||
|
Reference in New Issue
Block a user