Hotfix for assembly loading issues
This commit is contained in:
@@ -52,9 +52,17 @@ quit";
|
||||
AppDomain.CurrentDomain.UnhandledException += HandleException;
|
||||
#endif
|
||||
|
||||
if (!args.Contains("-noupdate"))
|
||||
// This is what happens when Keen is bad and puts extensions into the System namespace.
|
||||
if (!Enumerable.Contains(args, "-noupdate"))
|
||||
RunSteamCmd();
|
||||
|
||||
var basePath = new FileInfo(typeof(Program).Assembly.Location).Directory.ToString();
|
||||
var apiSource = Path.Combine(basePath, "DedicatedServer64", "steam_api64.dll");
|
||||
var apiTarget = Path.Combine(basePath, "steam_api64.dll");
|
||||
|
||||
if (!File.Exists(apiTarget))
|
||||
File.Copy(apiSource, apiTarget);
|
||||
|
||||
_config = InitConfig();
|
||||
if (!_config.Parse(args))
|
||||
return false;
|
||||
@@ -129,7 +137,7 @@ quit";
|
||||
}
|
||||
}
|
||||
|
||||
private static void RunSteamCmd()
|
||||
public static void RunSteamCmd()
|
||||
{
|
||||
var log = LogManager.GetLogger("SteamCMD");
|
||||
|
||||
|
@@ -1,7 +1,13 @@
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.IO.Compression;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.ServiceProcess;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using NLog;
|
||||
using NLog.Targets;
|
||||
using Torch.Utils;
|
||||
|
||||
@@ -23,7 +29,7 @@ namespace Torch.Server
|
||||
|
||||
if (!TorchLauncher.IsTorchWrapped())
|
||||
{
|
||||
TorchLauncher.Launch(Assembly.GetEntryAssembly().FullName,args, binDir);
|
||||
TorchLauncher.Launch(Assembly.GetEntryAssembly().FullName, args, binDir);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -41,4 +47,4 @@ namespace Torch.Server
|
||||
initializer.Run();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@@ -176,7 +176,7 @@ namespace Torch.Managers.PatchManager
|
||||
_log.Info("Patching begins...");
|
||||
_finishedPatchCount = 0;
|
||||
_dirtyPatchCount = _rewritePatterns.Values.Sum(x => x.HasChanged() ? 1 : 0);
|
||||
#if true
|
||||
#if false
|
||||
ParallelTasks.Parallel.ForEach(_rewritePatterns.Values.Where(x => !x.PrintMsil), DoCommit);
|
||||
foreach (DecoratedMethod m in _rewritePatterns.Values.Where(x => x.PrintMsil))
|
||||
DoCommit(m);
|
||||
|
Reference in New Issue
Block a user