Compare commits

..

4 Commits

Author SHA1 Message Date
zznty
aeea192860 exit on restart 2023-01-09 22:02:54 +07:00
zznty
b8be5b2dce fix auto-updates 2023-01-05 00:48:11 +07:00
zznty
ea08d60d58 update protobuf 2023-01-05 00:41:49 +07:00
zznty
6493a305f7 remove retarded assembly version checks 2023-01-04 23:59:33 +07:00
6 changed files with 33 additions and 102 deletions

View File

@@ -229,6 +229,8 @@ namespace Torch.Server
} }
Process.Start(exe, $"--waitForPid {Environment.ProcessId} --tempAutostart true {string.Join(" ", args)}"); Process.Start(exe, $"--waitForPid {Environment.ProcessId} --tempAutostart true {string.Join(" ", args)}");
Environment.Exit(0);
}) })
{ {
Name = "Restart thread" Name = "Restart thread"

View File

@@ -308,11 +308,6 @@
"resolved": "7.0.0", "resolved": "7.0.0",
"contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q==" "contentHash": "um1KU5kxcRp3CNuI8o/GrZtD4AIOXDk+RLsytjZ9QPok3ttLUelLKpilVPuaFT3TFjOhSibUAso0odbOaCDj3Q=="
}, },
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "2.1.0",
"contentHash": "ok+RPAtESz/9MUXeIEz6Lv5XAGQsaNmEYXMsgVALj4D7kqC8gveKWXWXbufLySR2fWrwZf8smyN5RmHu0e4BHA=="
},
"Microsoft.Xaml.Behaviors.Wpf": { "Microsoft.Xaml.Behaviors.Wpf": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.1.31", "resolved": "1.1.31",
@@ -371,12 +366,17 @@
}, },
"protobuf-net": { "protobuf-net": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.4.7", "resolved": "3.1.26",
"contentHash": "0+zS9IjL7DIcnJ1tz0KQ3luhS4BlmvGzX04dju7ejhX3P91AZ33AMF3nL6z3Hh2bB5+JW6U/Fmo8PrmheKnm4g==", "contentHash": "iy+VROYtWZEqDvkUjS6FfzKZNpWRoVGc5h0cupGQT/37Ox0LxPblRKLnw6V0RT1MPclLo8nZp7E2M0f7PNn/Tw==",
"dependencies": { "dependencies": {
"System.ServiceModel.Primitives": "4.5.3" "protobuf-net.Core": "3.1.26"
} }
}, },
"protobuf-net.Core": {
"type": "Transitive",
"resolved": "3.1.26",
"contentHash": "fuKoDWgAf5ju+ixbJoasVFhnUaT0oWUgrWh1AZ5D0Y5keKHpA93vQB5g6aQNtB4zgeQ4hGEeh0MY9bIbAUPgEw=="
},
"SemanticVersioning": { "SemanticVersioning": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.0.2", "resolved": "2.0.2",
@@ -413,21 +413,6 @@
"resolved": "4.5.5", "resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
}, },
"System.Private.ServiceModel": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "ancrQgJagx+yC4SZbuE+eShiEAUIF0E1d21TRSoy1C/rTwafAVcBr/fKibkq5TQzyy9uNil2tx2/iaUxsy0S9g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.1.0",
"System.Reflection.DispatchProxy": "4.5.0",
"System.Security.Principal.Windows": "4.5.0"
}
},
"System.Reflection.DispatchProxy": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "+UW1hq11TNSeb+16rIk8hRQ02o339NFyzMc4ma/FqmxBzM30l1c2IherBB4ld1MNcenS48fz8tbt50OW4rVULA=="
},
"System.Reflection.Emit": { "System.Reflection.Emit": {
"type": "Transitive", "type": "Transitive",
"resolved": "4.7.0", "resolved": "4.7.0",
@@ -464,22 +449,6 @@
"System.Security.Cryptography.Pkcs": "7.0.0" "System.Security.Cryptography.Pkcs": "7.0.0"
} }
}, },
"System.Security.Principal.Windows": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "U77HfRXlZlOeIXd//Yoj6Jnk8AXlbeisf1oq1os+hxOGVnuG+lGSfGqTwTZBoORFF6j/0q7HXIl8cqwQ9aUGqQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0"
}
},
"System.ServiceModel.Primitives": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "Wc9Hgg4Cmqi416zvEgq2sW1YYCGuhwWzspDclJWlFZqY6EGhFUPZU+kVpl5z9kAgrSOQP7/Uiik+PtSQtmq+5A==",
"dependencies": {
"System.Private.ServiceModel": "4.5.3"
}
},
"System.Text.Encoding.CodePages": { "System.Text.Encoding.CodePages": {
"type": "Transitive", "type": "Transitive",
"resolved": "6.0.0", "resolved": "6.0.0",
@@ -520,7 +489,7 @@
"System.ComponentModel.Annotations": "[5.0.0, )", "System.ComponentModel.Annotations": "[5.0.0, )",
"Torch.API": "[1.0.0, )", "Torch.API": "[1.0.0, )",
"Torch.SixLabors.ImageSharp": "[1.0.0-beta6, )", "Torch.SixLabors.ImageSharp": "[1.0.0-beta6, )",
"protobuf-net": "[2.4.7, )" "protobuf-net": "[3.1.26, )"
} }
}, },
"torch.api": { "torch.api": {
@@ -548,16 +517,6 @@
"System.CodeDom": "7.0.0" "System.CodeDom": "7.0.0"
} }
}, },
"System.Private.ServiceModel": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "ancrQgJagx+yC4SZbuE+eShiEAUIF0E1d21TRSoy1C/rTwafAVcBr/fKibkq5TQzyy9uNil2tx2/iaUxsy0S9g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.1.0",
"System.Reflection.DispatchProxy": "4.5.0",
"System.Security.Principal.Windows": "4.5.0"
}
},
"System.Security.Cryptography.Pkcs": { "System.Security.Cryptography.Pkcs": {
"type": "Transitive", "type": "Transitive",
"resolved": "7.0.0", "resolved": "7.0.0",
@@ -566,14 +525,6 @@
"System.Formats.Asn1": "7.0.0" "System.Formats.Asn1": "7.0.0"
} }
}, },
"System.Security.Principal.Windows": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "U77HfRXlZlOeIXd//Yoj6Jnk8AXlbeisf1oq1os+hxOGVnuG+lGSfGqTwTZBoORFF6j/0q7HXIl8cqwQ9aUGqQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0"
}
},
"System.Text.Encoding.CodePages": { "System.Text.Encoding.CodePages": {
"type": "Transitive", "type": "Transitive",
"resolved": "6.0.0", "resolved": "6.0.0",

View File

@@ -100,9 +100,18 @@ namespace Torch.Managers
_log.Debug($"Unzipping {file.FullName}"); _log.Debug($"Unzipping {file.FullName}");
var targetFile = Path.Combine(extractPath, file.FullName); var targetFile = Path.Combine(extractPath, file.FullName);
// if its a directory
if (Path.GetFileName(targetFile).Length == 0)
{
Directory.CreateDirectory(targetFile);
}
else
{
_fsManager.SoftDelete(extractPath, file.FullName); _fsManager.SoftDelete(extractPath, file.FullName);
file.ExtractToFile(targetFile, true); file.ExtractToFile(targetFile, true);
} }
}
//zip.ExtractToDirectory(extractPath); //throws exceptions sometimes? //zip.ExtractToDirectory(extractPath); //throws exceptions sometimes?
} }

View File

@@ -429,7 +429,7 @@ namespace Torch.Managers
if (a.Version is null || b.Version is null) if (a.Version is null || b.Version is null)
return a.Name == b.Name; return a.Name == b.Name;
return a.Name == b.Name && a.Version.Major == b.Version.Major && a.Version.Minor == b.Version.Minor; return a.Name == b.Name && b.Version >= a.Version;
} }
private void InstantiatePlugin(PluginManifest manifest, IEnumerable<Assembly> assemblies) private void InstantiatePlugin(PluginManifest manifest, IEnumerable<Assembly> assemblies)

View File

@@ -31,7 +31,7 @@
<PackageReference Include="MonoModReorg.RuntimeDetour" Version="22.11.21-prerelease.2" /> <PackageReference Include="MonoModReorg.RuntimeDetour" Version="22.11.21-prerelease.2" />
<PackageReference Include="NLog" Version="5.1.0" /> <PackageReference Include="NLog" Version="5.1.0" />
<PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" /> <PackageReference Include="PropertyChanged.Fody" Version="4.1.0" PrivateAssets="all" />
<PackageReference Include="protobuf-net" Version="2.4.7" /> <PackageReference Include="protobuf-net" Version="3.1.26" />
<PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" /> <PackageReference Include="System.ComponentModel.Annotations" Version="5.0.0" />
<PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" /> <PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" />
<PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.201.13"> <PackageReference Include="SpaceEngineersDedicated.ReferenceAssemblies" Version="1.201.13">

View File

@@ -95,11 +95,11 @@
}, },
"protobuf-net": { "protobuf-net": {
"type": "Direct", "type": "Direct",
"requested": "[2.4.7, )", "requested": "[3.1.26, )",
"resolved": "2.4.7", "resolved": "3.1.26",
"contentHash": "0+zS9IjL7DIcnJ1tz0KQ3luhS4BlmvGzX04dju7ejhX3P91AZ33AMF3nL6z3Hh2bB5+JW6U/Fmo8PrmheKnm4g==", "contentHash": "iy+VROYtWZEqDvkUjS6FfzKZNpWRoVGc5h0cupGQT/37Ox0LxPblRKLnw6V0RT1MPclLo8nZp7E2M0f7PNn/Tw==",
"dependencies": { "dependencies": {
"System.ServiceModel.Primitives": "4.5.3" "protobuf-net.Core": "3.1.26"
} }
}, },
"SpaceEngineersDedicated.ReferenceAssemblies": { "SpaceEngineersDedicated.ReferenceAssemblies": {
@@ -142,11 +142,6 @@
"resolved": "3.3.3", "resolved": "3.3.3",
"contentHash": "j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ==" "contentHash": "j/rOZtLMVJjrfLRlAMckJLPW/1rze9MT1yfWqSIbUPGRu1m1P0fuo9PmqapwsmePfGB5PJrudQLvmUOAMF0DqQ=="
}, },
"Microsoft.NETCore.Platforms": {
"type": "Transitive",
"resolved": "2.1.0",
"contentHash": "ok+RPAtESz/9MUXeIEz6Lv5XAGQsaNmEYXMsgVALj4D7kqC8gveKWXWXbufLySR2fWrwZf8smyN5RmHu0e4BHA=="
},
"Microsoft.Xaml.Behaviors.Wpf": { "Microsoft.Xaml.Behaviors.Wpf": {
"type": "Transitive", "type": "Transitive",
"resolved": "1.1.31", "resolved": "1.1.31",
@@ -191,6 +186,11 @@
"MonoModReorg.ILHelpers": "22.11.21-prerelease.2" "MonoModReorg.ILHelpers": "22.11.21-prerelease.2"
} }
}, },
"protobuf-net.Core": {
"type": "Transitive",
"resolved": "3.1.26",
"contentHash": "fuKoDWgAf5ju+ixbJoasVFhnUaT0oWUgrWh1AZ5D0Y5keKHpA93vQB5g6aQNtB4zgeQ4hGEeh0MY9bIbAUPgEw=="
},
"SemanticVersioning": { "SemanticVersioning": {
"type": "Transitive", "type": "Transitive",
"resolved": "2.0.2", "resolved": "2.0.2",
@@ -217,21 +217,6 @@
"resolved": "4.5.5", "resolved": "4.5.5",
"contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw==" "contentHash": "XIWiDvKPXaTveaB7HVganDlOCRoj03l+jrwNvcge/t8vhGYKvqV+dMv6G4SAX2NoNmN0wZfVPTAlFwZcZvVOUw=="
}, },
"System.Private.ServiceModel": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "ancrQgJagx+yC4SZbuE+eShiEAUIF0E1d21TRSoy1C/rTwafAVcBr/fKibkq5TQzyy9uNil2tx2/iaUxsy0S9g==",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.1.0",
"System.Reflection.DispatchProxy": "4.5.0",
"System.Security.Principal.Windows": "4.5.0"
}
},
"System.Reflection.DispatchProxy": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "+UW1hq11TNSeb+16rIk8hRQ02o339NFyzMc4ma/FqmxBzM30l1c2IherBB4ld1MNcenS48fz8tbt50OW4rVULA=="
},
"System.Reflection.Emit": { "System.Reflection.Emit": {
"type": "Transitive", "type": "Transitive",
"resolved": "4.7.0", "resolved": "4.7.0",
@@ -252,22 +237,6 @@
"resolved": "6.0.0", "resolved": "6.0.0",
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg==" "contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
}, },
"System.Security.Principal.Windows": {
"type": "Transitive",
"resolved": "4.5.0",
"contentHash": "U77HfRXlZlOeIXd//Yoj6Jnk8AXlbeisf1oq1os+hxOGVnuG+lGSfGqTwTZBoORFF6j/0q7HXIl8cqwQ9aUGqQ==",
"dependencies": {
"Microsoft.NETCore.Platforms": "2.0.0"
}
},
"System.ServiceModel.Primitives": {
"type": "Transitive",
"resolved": "4.5.3",
"contentHash": "Wc9Hgg4Cmqi416zvEgq2sW1YYCGuhwWzspDclJWlFZqY6EGhFUPZU+kVpl5z9kAgrSOQP7/Uiik+PtSQtmq+5A==",
"dependencies": {
"System.Private.ServiceModel": "4.5.3"
}
},
"System.Text.Encoding.CodePages": { "System.Text.Encoding.CodePages": {
"type": "Transitive", "type": "Transitive",
"resolved": "6.0.0", "resolved": "6.0.0",