diff --git a/Torch.Client.Tests/Torch.Client.Tests.csproj b/Torch.Client.Tests/Torch.Client.Tests.csproj
index f57c10c..c1dc43a 100644
--- a/Torch.Client.Tests/Torch.Client.Tests.csproj
+++ b/Torch.Client.Tests/Torch.Client.Tests.csproj
@@ -86,6 +86,7 @@
+
diff --git a/Torch.Client.Tests/app.config b/Torch.Client.Tests/app.config
new file mode 100644
index 0000000..a73892d
--- /dev/null
+++ b/Torch.Client.Tests/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Torch.Client/Torch.Client.csproj b/Torch.Client/Torch.Client.csproj
index 82a74fa..1ecb37a 100644
--- a/Torch.Client/Torch.Client.csproj
+++ b/Torch.Client/Torch.Client.csproj
@@ -147,6 +147,7 @@
ResXFileCodeGenerator
Resources.Designer.cs
+
SettingsSingleFileGenerator
diff --git a/Torch.Client/TorchClientConfig.cs b/Torch.Client/TorchClientConfig.cs
index fda35e0..ba6e5b3 100644
--- a/Torch.Client/TorchClientConfig.cs
+++ b/Torch.Client/TorchClientConfig.cs
@@ -23,6 +23,8 @@ namespace Torch.Client
public bool NoGui { get; set; } = false;
public bool RestartOnCrash { get; set; } = false;
public string WaitForPID { get; set; } = null;
+ public string ChatName { get; set; }
+ public string ChatColor { get; set; }
public bool Save(string path = null)
{
diff --git a/Torch.Client/app.config b/Torch.Client/app.config
new file mode 100644
index 0000000..a73892d
--- /dev/null
+++ b/Torch.Client/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Torch.Server.Tests/Torch.Server.Tests.csproj b/Torch.Server.Tests/Torch.Server.Tests.csproj
index 157bedf..cf95a9a 100644
--- a/Torch.Server.Tests/Torch.Server.Tests.csproj
+++ b/Torch.Server.Tests/Torch.Server.Tests.csproj
@@ -92,6 +92,7 @@
+
diff --git a/Torch.Server.Tests/app.config b/Torch.Server.Tests/app.config
new file mode 100644
index 0000000..a73892d
--- /dev/null
+++ b/Torch.Server.Tests/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Torch.Server/Initializer.cs b/Torch.Server/Initializer.cs
index f9af400..b141d90 100644
--- a/Torch.Server/Initializer.cs
+++ b/Torch.Server/Initializer.cs
@@ -65,12 +65,12 @@ quit";
if (!File.Exists(apiTarget))
File.Copy(apiSource, apiTarget);
-
- var protoSource = Path.Combine(basePath, "DedicatedServer64", "protobuf-net.dll");
- var protoTarget = Path.Combine(basePath, "protobuf-net.dll");
-
- if(!File.Exists(protoTarget))
- File.Copy(protoSource, protoTarget);
+
+ var havokSource = Path.Combine(basePath, "DedicatedServer64", "Havok.dll");
+ var havokTarget = Path.Combine(basePath, "Havok.dll");
+
+ if (!File.Exists(havokTarget))
+ File.Copy(havokSource, havokTarget);
_config = InitConfig();
if (!_config.Parse(args))
@@ -177,9 +177,10 @@ quit";
File.Delete(STEAMCMD_ZIP);
log.Info("SteamCMD downloaded successfully!");
}
- catch
+ catch (Exception e)
{
log.Error("Failed to download SteamCMD, unable to update the DS.");
+ log.Error(e);
return;
}
}
diff --git a/Torch.Server/Program.cs b/Torch.Server/Program.cs
index 0bc4d7e..731dd02 100644
--- a/Torch.Server/Program.cs
+++ b/Torch.Server/Program.cs
@@ -2,12 +2,14 @@
using System.Diagnostics;
using System.IO;
using System.IO.Compression;
+using System.Linq;
using System.Net;
using System.Reflection;
using System.ServiceProcess;
using System.Text;
using System.Threading;
using NLog;
+using NLog.Fluent;
using NLog.Targets;
using Torch.Utils;
@@ -21,12 +23,34 @@ namespace Torch.Server
[STAThread]
public static void Main(string[] args)
{
+
+
Target.Register("FlowDocument");
//Ensures that all the files are downloaded in the Torch directory.
var workingDir = new FileInfo(typeof(Program).Assembly.Location).Directory.ToString();
var binDir = Path.Combine(workingDir, "DedicatedServer64");
Directory.SetCurrentDirectory(workingDir);
+ //HACK for block skins update
+ var badDlls = new[]
+ {
+ "System.Security.Principal.Windows.dll"
+ };
+
+ try
+ {
+ foreach (var file in badDlls)
+ {
+ if (File.Exists(file))
+ File.Delete(file);
+ }
+ }
+ catch
+ {
+ LogManager.GetCurrentClassLogger().Error($"Error updating. Please delete the following files from the Torch root folder manually:\r\n{string.Join("\r\n", badDlls)}");
+ return;
+ }
+
if (!TorchLauncher.IsTorchWrapped())
{
TorchLauncher.Launch(Assembly.GetEntryAssembly().FullName, args, binDir);
diff --git a/Torch.Server/Torch.Server.csproj b/Torch.Server/Torch.Server.csproj
index f89e0b4..798c6a8 100644
--- a/Torch.Server/Torch.Server.csproj
+++ b/Torch.Server/Torch.Server.csproj
@@ -86,6 +86,10 @@
..\packages\Microsoft.Win32.Registry.4.4.0\lib\net461\Microsoft.Win32.Registry.dll
+
+
+ ..\GameBinaries\netstandard.dll
+
..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll
@@ -93,8 +97,8 @@
..\packages\NLog.4.4.12\lib\net45\NLog.dll
True
-
- ..\packages\protobuf-net.2.1.0\lib\net451\protobuf-net.dll
+
+ ..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll
False
@@ -130,17 +134,24 @@
..\GameBinaries\Steamworks.NET.dll
+
+ ..\packages\System.ComponentModel.Annotations.4.5.0\lib\net461\System.ComponentModel.Annotations.dll
+ True
+
+
+
..\packages\System.Security.AccessControl.4.4.0\lib\net461\System.Security.AccessControl.dll
..\packages\System.Security.Principal.Windows.4.4.0\lib\net461\System.Security.Principal.Windows.dll
+
diff --git a/Torch.Server/TorchServer.cs b/Torch.Server/TorchServer.cs
index 06e1402..30c177d 100644
--- a/Torch.Server/TorchServer.cs
+++ b/Torch.Server/TorchServer.cs
@@ -127,12 +127,14 @@ namespace Torch.Server
_hasRun = true;
Log.Info("Starting server.");
MySandboxGame.ConfigDedicated = DedicatedInstance.DedicatedConfig.Model;
- if (MySandboxGame.ConfigDedicated.RemoteApiEnabled && !string.IsNullOrEmpty(MySandboxGame.ConfigDedicated.RemoteSecurityKey))
- {
- var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
- Log.Info($"Remote API started on port {myRemoteServer.Port}");
- }
-
+ //Are you serious, Keen? This is going away until it stops hanging.
+ //if (MySandboxGame.ConfigDedicated.RemoteApiEnabled && !string.IsNullOrEmpty(MySandboxGame.ConfigDedicated.RemoteSecurityKey))
+ //{
+ // var myRemoteServer = new MyRemoteServer(MySandboxGame.ConfigDedicated.RemoteApiPort, MySandboxGame.ConfigDedicated.RemoteSecurityKey);
+ // Log.Info($"Remote API started on port {myRemoteServer.Port}");
+ //}
+ Log.Warn("Remote API is disabled because it hangs the server start process. Blame Keen.");
+
_uptime = Stopwatch.StartNew();
base.Start();
}
diff --git a/Torch.Server/packages.config b/Torch.Server/packages.config
index 11d6e4d..24c621a 100644
--- a/Torch.Server/packages.config
+++ b/Torch.Server/packages.config
@@ -7,8 +7,9 @@
-
+
+
\ No newline at end of file
diff --git a/Torch.Tests/Torch.Tests.csproj b/Torch.Tests/Torch.Tests.csproj
index 50977de..f4cf215 100644
--- a/Torch.Tests/Torch.Tests.csproj
+++ b/Torch.Tests/Torch.Tests.csproj
@@ -82,6 +82,7 @@
+
diff --git a/Torch.Tests/app.config b/Torch.Tests/app.config
new file mode 100644
index 0000000..a73892d
--- /dev/null
+++ b/Torch.Tests/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Torch/Torch.csproj b/Torch/Torch.csproj
index b1ab8fe..ca60249 100644
--- a/Torch/Torch.csproj
+++ b/Torch/Torch.csproj
@@ -37,6 +37,7 @@
+
@@ -65,9 +66,8 @@
-
- False
- ..\GameBinaries\protobuf-net.dll
+
+ ..\packages\protobuf-net.2.4.0\lib\net40\protobuf-net.dll
..\GameBinaries\Sandbox.Common.dll
@@ -100,16 +100,23 @@
..\GameBinaries\Steamworks.NET.dll
+
+ ..\packages\System.ComponentModel.Annotations.4.5.0\lib\net461\System.ComponentModel.Annotations.dll
+ True
+
+
+
..\packages\System.Security.AccessControl.4.4.0\lib\net461\System.Security.AccessControl.dll
..\packages\System.Security.Principal.Windows.4.4.0\lib\net461\System.Security.Principal.Windows.dll
+
..\packages\ControlzEx.3.0.2.4\lib\net45\System.Windows.Interactivity.dll
True
@@ -161,6 +168,9 @@
..\GameBinaries\VRage.OpenVRWrapper.dll
False
+
+ ..\bin\x64\Release\DedicatedServer64\VRage.Platform.Windows.dll
+
..\GameBinaries\VRage.Render.dll
False
@@ -320,6 +330,7 @@
+
diff --git a/Torch/VRageGame.cs b/Torch/VRageGame.cs
index 1065f49..b3460a4 100644
--- a/Torch/VRageGame.cs
+++ b/Torch/VRageGame.cs
@@ -31,6 +31,7 @@ using VRage.Game.ObjectBuilder;
using VRage.Game.SessionComponents;
using VRage.GameServices;
using VRage.Network;
+using VRage.Platform.Windows;
using VRage.Plugins;
using VRage.Steam;
using VRage.Utils;
@@ -156,6 +157,7 @@ namespace Torch
_tweakGameSettings();
MyFileSystem.Reset();
+ MyVRageWindows.Init(MySandboxGame.Log, Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "SpaceEngineersDedicated"));
MyInitializer.InvokeBeforeRun(_appSteamId, _appName, _userDataPath);
// MyInitializer.InitCheckSum();
diff --git a/Torch/app.config b/Torch/app.config
new file mode 100644
index 0000000..a73892d
--- /dev/null
+++ b/Torch/app.config
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Torch/packages.config b/Torch/packages.config
index e77c03c..7f9ae61 100644
--- a/Torch/packages.config
+++ b/Torch/packages.config
@@ -5,8 +5,9 @@
-
+
+
\ No newline at end of file