Compare commits

...

4 Commits
2.0.2 ... 2.0.6

Author SHA1 Message Date
6c9ec57d87 Update for latest SE version 2023-05-29 12:32:49 -04:00
zznty
b0f491ac88 do not exit without autostart 2023-04-25 16:32:52 +07:00
zznty
a426ad9e02 fix steam redist missing on automatic download 2023-04-22 21:22:46 +07:00
zznty
ba75b1583a do not copy dlls in service mode as it can mess up with runtimes 2023-04-22 18:30:02 +07:00
9 changed files with 39 additions and 27 deletions

View File

@@ -21,7 +21,7 @@
<PackageReference Include="NuGet.Commands" Version="6.4.0" />
<PackageReference Include="NuGet.DependencyResolver.Core" Version="6.4.0" />
<PackageReference Include="SemanticVersioning" Version="2.0.2" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.66">
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.117">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>

View File

@@ -43,9 +43,9 @@
},
"SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.202.66, )",
"resolved": "1.202.66",
"contentHash": "VTOwwfTPnov6WWJNrsmB9lWs5s+6XVUXtV8SgLvgJTswK11MTA0e+TZFfZJoSZ1WUsE2dvxlMrNOYJ6aL6j0wA==",
"requested": "[1.202.117, )",
"resolved": "1.202.117",
"contentHash": "eMyu/AJiKxgmQqMiMUuyL+XdHgNpzw6AfpL6OJkYugXnOJQ10tU8sVvEpmlPqIjWGcRrOhyA6bIGIN4s0JyyUw==",
"dependencies": {
"protobuf-net": "1.0.0"
}

View File

@@ -30,7 +30,8 @@ namespace Torch.Server
private const string TOOL_DIR = "tool";
private const string TOOL_ZIP = "temp.zip";
private static readonly string TOOL_EXE = "DepotDownloader.exe";
private const string TOOL_ARGS = "-app 298740 -depot 298741 -dir \"{0}\"";
private const string TOOL_ARGS = "-app 298740 -depot {1} -dir \"{0}\"";
private static readonly int[] Depots = { 298741, 1004 };
private TorchServer _server;
internal Persistent<TorchConfig> ConfigPersistent { get; }
@@ -122,6 +123,8 @@ namespace Torch.Server
Config.TempAutostart = false;
_server.Start();
}
uiThread.Join();
}
}
@@ -160,9 +163,16 @@ namespace Torch.Server
}
log.Info("Checking for DS updates.");
foreach (var depot in Depots)
{
await DownloadDepot(depot);
}
async Task DownloadDepot(int depotId)
{
var steamCmdProc = new ProcessStartInfo(steamCmdExePath)
{
Arguments = string.Format(TOOL_ARGS, configuration.GetValue("gamePath", "../")),
Arguments = string.Format(TOOL_ARGS, configuration.GetValue("gamePath", "../"), depotId),
WorkingDirectory = path,
RedirectStandardOutput = true
};
@@ -175,4 +185,5 @@ namespace Torch.Server
}
}
}
}
}

View File

@@ -51,7 +51,7 @@
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="System.Management" Version="7.0.0" />
<PackageReference Include="nulastudio.NetCoreBeauty" Version="1.2.9.3" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.66">
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.117">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>

View File

@@ -122,9 +122,9 @@
},
"SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.202.66, )",
"resolved": "1.202.66",
"contentHash": "VTOwwfTPnov6WWJNrsmB9lWs5s+6XVUXtV8SgLvgJTswK11MTA0e+TZFfZJoSZ1WUsE2dvxlMrNOYJ6aL6j0wA==",
"requested": "[1.202.117, )",
"resolved": "1.202.117",
"contentHash": "eMyu/AJiKxgmQqMiMUuyL+XdHgNpzw6AfpL6OJkYugXnOJQ10tU8sVvEpmlPqIjWGcRrOhyA6bIGIN4s0JyyUw==",
"dependencies": {
"protobuf-net": "1.0.0"
}

View File

@@ -35,7 +35,7 @@
<PackageReference Include="protobuf-net" Version="3.1.26" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.66">
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.202.117">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>compile</IncludeAssets>
</PackageReference>

View File

@@ -47,7 +47,7 @@ namespace Torch.Utils
private static void CopyNative()
{
if (ApplicationContext.Current.GameFilesDirectory.Attributes.HasFlag(FileAttributes.ReadOnly))
if (ApplicationContext.Current.IsService || ApplicationContext.Current.GameFilesDirectory.Attributes.HasFlag(FileAttributes.ReadOnly))
{
Log.Warn("Torch directory is readonly. You should copy steam_api64.dll, Havok.dll from bin manually");
return;

View File

@@ -165,7 +165,7 @@ namespace Torch
_tweakGameSettings();
MyFileSystem.Reset();
MyInitializer.InvokeBeforeRun(_appSteamId, _appName, _userDataPath);
MyInitializer.InvokeBeforeRun(_appSteamId, _appName, MyVRage.Platform.System.GetRootPath(), _userDataPath);
_log.Info("Loading Dedicated Config");
// object created in SpaceEngineersGame.SetupPerGameSettings()
@@ -193,7 +193,7 @@ namespace Torch
{
service = MyEOSService.Create();
MyEOSService.InitNetworking(dedicated,
MyEOSService.InitNetworking(dedicated, true, //true because using Eos
"Space Engineers",
service,
"xyza7891A4WeGrpP85BTlBa3BSfUEABN",
@@ -225,7 +225,8 @@ namespace Torch
MyGameService.WorkshopService.AddAggregate(MyModIoService.Create(service, "spaceengineers", "264",
"1fb4489996a5e8ffc6ec1135f9985b5b", "331", "f2b64abe55452252b030c48adc0c1f0e",
MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, true));
MyPlatformGameSettings.UGC_TEST_ENVIRONMENT, true, MyPlatformGameSettings.MODIO_PLATFORM,
MyPlatformGameSettings.MODIO_PORTAL));
if (!isEos && !MyGameService.HasGameServer)
{

View File

@@ -102,9 +102,9 @@
},
"SpaceEngineersDedicated.ReferenceAssemblies": {
"type": "Direct",
"requested": "[1.202.66, )",
"resolved": "1.202.66",
"contentHash": "VTOwwfTPnov6WWJNrsmB9lWs5s+6XVUXtV8SgLvgJTswK11MTA0e+TZFfZJoSZ1WUsE2dvxlMrNOYJ6aL6j0wA==",
"requested": "[1.202.117, )",
"resolved": "1.202.117",
"contentHash": "eMyu/AJiKxgmQqMiMUuyL+XdHgNpzw6AfpL6OJkYugXnOJQ10tU8sVvEpmlPqIjWGcRrOhyA6bIGIN4s0JyyUw==",
"dependencies": {
"protobuf-net": "1.0.0"
}