net9 + basic splash
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
@@ -29,11 +29,11 @@
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
|
||||
<PackageReference Include="System.Management" Version="8.0.0" />
|
||||
<PackageReference Include="System.Diagnostics.PerformanceCounter" Version="9.0.0" />
|
||||
<PackageReference Include="System.Management" Version="9.0.0" />
|
||||
<PackageReference Include="System.Private.ServiceModel" Version="4.10.3" />
|
||||
<PackageReference Include="Torch.SixLabors.ImageSharp" Version="1.0.0-beta6" />
|
||||
<PackageReference Include="Velopack" Version="0.0.630-g9c52e40" />
|
||||
<PackageReference Include="Velopack" Version="0.0.942" />
|
||||
<PackageReference Include="Microsoft.Windows.CsWin32" Version="0.3.106">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
|
@@ -3,6 +3,7 @@ using System.Runtime.CompilerServices;
|
||||
using CringeBootstrap.Abstractions;
|
||||
using CringeLauncher.Utils;
|
||||
using CringePlugins.Loader;
|
||||
using CringePlugins.Render;
|
||||
using CringePlugins.Splash;
|
||||
using HarmonyLib;
|
||||
using NLog;
|
||||
@@ -108,7 +109,7 @@ public class Launcher : ICorePlugin
|
||||
InitRender();
|
||||
|
||||
_renderComponent = new();
|
||||
_renderComponent.Start(new(), InitEarlyWindow, MyVideoSettingsManager.Initialize(), MyPerGameSettings.MaxFrameRate);
|
||||
_renderComponent.Start(new(), () => InitEarlyWindow(splash), MyVideoSettingsManager.Initialize(), MyPerGameSettings.MaxFrameRate);
|
||||
_renderComponent.RenderThread.BeforeDraw += MyFpsManager.Update;
|
||||
|
||||
// this technically should wait for render thread init, but who cares
|
||||
@@ -132,10 +133,12 @@ public class Launcher : ICorePlugin
|
||||
|
||||
public void Run() => _game?.Run();
|
||||
|
||||
private IVRageWindow InitEarlyWindow()
|
||||
private IVRageWindow InitEarlyWindow(Splash splash)
|
||||
{
|
||||
ImGuiHandler.Instance = new();
|
||||
|
||||
RenderHandler.Current.RegisterComponent(splash);
|
||||
|
||||
MyVRage.Platform.Windows.CreateWindow("Cringe Launcher", MyPerGameSettings.GameIcon, null);
|
||||
|
||||
MyVRage.Platform.Windows.Window.OnExit += MySandboxGame.ExitThreadSafe;
|
||||
|
@@ -4,17 +4,17 @@ using VRage.Scripting;
|
||||
|
||||
namespace CringeLauncher.Patches;
|
||||
|
||||
[HarmonyPatch]
|
||||
[HarmonyPatch(typeof(MyScriptWhitelist.MyWhitelistBatch), nameof(MyScriptWhitelist.MyWhitelistBatch.AllowMembers))]
|
||||
public static class WhitelistAllowPatch
|
||||
{
|
||||
private static MethodInfo TargetMethod()
|
||||
{
|
||||
return AccessTools.Method(AccessTools.Inner(typeof(MyScriptWhitelist), "MyWhitelistBatch"), "AllowMembers");
|
||||
}
|
||||
|
||||
private static void Prefix(ref MemberInfo[] members)
|
||||
{
|
||||
if (members.Any(b => b is null))
|
||||
members = members.Where(b => b is { }).ToArray();
|
||||
}
|
||||
|
||||
private static Exception? Finalizer(Exception __exception)
|
||||
{
|
||||
return __exception is MyWhitelistException ? null : __exception;
|
||||
}
|
||||
}
|
25
CringeLauncher/Patches/WhitelistTypeResolutionPatch.cs
Normal file
25
CringeLauncher/Patches/WhitelistTypeResolutionPatch.cs
Normal file
@@ -0,0 +1,25 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection.Emit;
|
||||
using HarmonyLib;
|
||||
using VRage.Scripting;
|
||||
|
||||
namespace CringeLauncher.Patches;
|
||||
|
||||
[HarmonyPatch(typeof(MyScriptWhitelist.Batch), nameof(MyScriptWhitelist.Batch.ResolveTypeSymbol))]
|
||||
public static class WhitelistTypeResolutionPatch
|
||||
{
|
||||
private static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions)
|
||||
{
|
||||
var call = CodeInstruction.CallClosure((MyWhitelistException ex) =>
|
||||
{
|
||||
Debug.WriteLine(ex);
|
||||
});
|
||||
|
||||
return instructions.Manipulator(i => i.opcode == OpCodes.Throw,
|
||||
i =>
|
||||
{
|
||||
i.opcode = call.opcode;
|
||||
i.operand = call.operand;
|
||||
});
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0-windows10.0.19041": {
|
||||
"net9.0-windows10.0.19041": {
|
||||
"Basic.Reference.Assemblies.Net80": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.7.9, )",
|
||||
@@ -79,20 +79,20 @@
|
||||
},
|
||||
"System.Diagnostics.PerformanceCounter": {
|
||||
"type": "Direct",
|
||||
"requested": "[8.0.0, )",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "lX6DXxtJqVGWw7N/QmVoiCyVQ+Q/Xp+jVXPr3gLK1jJExSn1qmAjJQeb8gnOYeeBTG3E3PmG1nu92eYj/TEjpg==",
|
||||
"requested": "[9.0.0, )",
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "1SSqHtWZUdAC0j0UCw2ZWV4iOWB7nPZFkseqPsjdaypVu7ue1xsUJMobXkpHEDFNTrL0DpOdT7k6qDfqmFkQ6g==",
|
||||
"dependencies": {
|
||||
"System.Configuration.ConfigurationManager": "8.0.0"
|
||||
"System.Configuration.ConfigurationManager": "9.0.0"
|
||||
}
|
||||
},
|
||||
"System.Management": {
|
||||
"type": "Direct",
|
||||
"requested": "[8.0.0, )",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "jrK22i5LRzxZCfGb+tGmke2VH7oE0DvcDlJ1HAKYU8cPmD8XnpUT0bYn2Gy98GEhGjtfbR/sxKTVb+dE770pfA==",
|
||||
"requested": "[9.0.0, )",
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "bVh4xAMI5grY5GZoklKcMBLirhC8Lqzp63Ft3zXJacwGAlLyFdF4k0qz4pnKIlO6HyL2Z4zqmHm9UkzEo6FFsA==",
|
||||
"dependencies": {
|
||||
"System.CodeDom": "8.0.0"
|
||||
"System.CodeDom": "9.0.0"
|
||||
}
|
||||
},
|
||||
"System.Private.ServiceModel": {
|
||||
@@ -121,12 +121,12 @@
|
||||
},
|
||||
"Velopack": {
|
||||
"type": "Direct",
|
||||
"requested": "[0.0.630-g9c52e40, )",
|
||||
"resolved": "0.0.630-g9c52e40",
|
||||
"contentHash": "4xNKtV+vyZPdlaQMNeen7p3WqGoq7CkVVkneywod1kTM3zKphQQwxo6KESGxsolwImXM8cZk4E1Zu64SYbaJhQ==",
|
||||
"requested": "[0.0.942, )",
|
||||
"resolved": "0.0.942",
|
||||
"contentHash": "reyKfQK/d4WeFHjd9gi1tsWFh9X5JGGQ+PkvKFd9jKx5HocrFYF0bj1K8PgIk2GZezoadapFT36Fvv8/gCD5rA==",
|
||||
"dependencies": {
|
||||
"Microsoft.Extensions.Logging.Abstractions": "8.0.0",
|
||||
"NuGet.Versioning": "6.10.1"
|
||||
"NuGet.Versioning": "6.12.1"
|
||||
}
|
||||
},
|
||||
"ImGui.NET.DirectX": {
|
||||
@@ -211,47 +211,47 @@
|
||||
},
|
||||
"MonoMod.Backports": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.0",
|
||||
"contentHash": "GUAjCrCZEddqHKHFA7Lh61PgTzoKY7gfBShFe0hQe0p8iynHhBK3TWGyRi+QIw/PGfaRPwx6c33CPGFURBVM6g==",
|
||||
"resolved": "1.1.2-daily.24.11.24.120.1",
|
||||
"contentHash": "LUH6Zvx+1M/WxLYv38i/CrWtIYbBg7bOSA2FRTLpilKOaaC4RdeUi060oTQRjrpZ+ZEIbRMBx0c799Uoryugrw==",
|
||||
"dependencies": {
|
||||
"MonoMod.ILHelpers": "1.0.1"
|
||||
"MonoMod.ILHelpers": "1.1.0-daily.24.11.24.120.1"
|
||||
}
|
||||
},
|
||||
"MonoMod.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.0",
|
||||
"contentHash": "Ks8RntZGVcktr2QF/AovTEbuOkrgXz6omjrvT5LRveOIQJuy+IFuEQPBVWu+cSKVIoZD5XkpRFvlVrItgPIrXw==",
|
||||
"resolved": "1.2.1-daily.24.11.24.120.1",
|
||||
"contentHash": "290eD12uM89ITcQ/7QuRUCpOdofG7E04mBk6CIIcSxnV/cuBLatTZoF8/YvI8o+ESljhD8Vx6Giji/5eZeMYoA==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.5",
|
||||
"MonoMod.Backports": "1.1.0",
|
||||
"MonoMod.ILHelpers": "1.0.1",
|
||||
"MonoMod.Utils": "25.0.4"
|
||||
"MonoMod.Backports": "1.1.2-daily.24.11.24.120.1",
|
||||
"MonoMod.ILHelpers": "1.1.0-daily.24.11.24.120.1",
|
||||
"MonoMod.Utils": "25.0.7-daily.24.11.24.120.1"
|
||||
}
|
||||
},
|
||||
"MonoMod.ILHelpers": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.0.1",
|
||||
"contentHash": "6djj/Hz+/eTomo1H/sJEJNxBz2ZdhXjvH0MOmyU2xRtbjaIfBQuyVV0zNUbJhMY/8qoWrz7WXfskfFhdaY0afA=="
|
||||
"resolved": "1.1.0-daily.24.11.24.120.1",
|
||||
"contentHash": "81kWbDUDiE/xA9WbYF/5U5RjLDemhnjQULIMm/7UDNQontJVFcGUFKHOtr7KOCXw+MkZK832pOC7cX3YBTKyKw=="
|
||||
},
|
||||
"MonoMod.Utils": {
|
||||
"type": "Transitive",
|
||||
"resolved": "25.0.4",
|
||||
"contentHash": "cB94MaZtFD9u4clYEFTwM4jGXnJnzXsxYF3yBpMZKHhXOas66tMF2frbdYte023i0MH4C5iRJbDjxHmA4x5VgA==",
|
||||
"resolved": "25.0.7-daily.24.11.24.120.1",
|
||||
"contentHash": "K36oN5h57PQJJsTcqvVEQah3HNU5RbhF+M9Ln3zTkYcsRq9t8i3UlFfA1qIl7LFxxDHWl8LNytb6QV0VJ27Ggw==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.5",
|
||||
"MonoMod.Backports": "1.1.0",
|
||||
"MonoMod.ILHelpers": "1.0.1"
|
||||
"MonoMod.Backports": "1.1.2-daily.24.11.24.120.1",
|
||||
"MonoMod.ILHelpers": "1.1.0-daily.24.11.24.120.1"
|
||||
}
|
||||
},
|
||||
"NuGet.Frameworks": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.11.1",
|
||||
"contentHash": "plTZ3ariSWQVsFn2mk83SsdmSg1VpgIMTSZpP/eSE/NNQF02p+M9ItxAYeUZBMX+cQ2nFkSwxQRJ0/fkaV9Hbg=="
|
||||
"resolved": "6.12.1",
|
||||
"contentHash": "kPaRD5RJC0ByUg+yGX6bDz5XHMI7OYmQwP8kbtef+vZ+csj/VDb5Bwas4ChxwhoAbI8lEvwP5/3aViQPpgNBow=="
|
||||
},
|
||||
"NuGet.Versioning": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.11.1",
|
||||
"contentHash": "YNn3BB71F+guJW42TbAhGcMh3gpyqFMZcPVD9pm5vcvGivTALtRely/VCPWQQ6JQ5PfwIrjPaJMO7VnqyeK3rg=="
|
||||
"resolved": "6.12.1",
|
||||
"contentHash": "fJ6rFYANDnohFsdpaY79FvrJxI6murmoOxXz6nZlf819F48+IBKMnAIg3oIBRtZq5y498ObMtKnro5IitvizUg=="
|
||||
},
|
||||
"protobuf-net": {
|
||||
"type": "Transitive",
|
||||
@@ -278,8 +278,8 @@
|
||||
},
|
||||
"System.CodeDom": {
|
||||
"type": "Transitive",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "WTlRjL6KWIMr/pAaq3rYqh0TJlzpouaQ/W1eelssHgtlwHAH25jXTkUphTYx9HaIIf7XA6qs/0+YhtLEQRkJ+Q=="
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "oTE5IfuMoET8yaZP/vdvy9xO47guAv/rOhe4DODuFBN3ySprcQOlXqO3j+e/H/YpKKR5sglrxRaZ2HYOhNJrqA=="
|
||||
},
|
||||
"System.Collections.Immutable": {
|
||||
"type": "Transitive",
|
||||
@@ -288,17 +288,17 @@
|
||||
},
|
||||
"System.Configuration.ConfigurationManager": {
|
||||
"type": "Transitive",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "JlYi9XVvIREURRUlGMr1F6vOFLk7YSY4p1vHo4kX3tQ0AGrjqlRWHDi66ImHhy6qwXBG3BJ6Y1QlYQ+Qz6Xgww==",
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "PdkuMrwDhXoKFo/JxISIi9E8L+QGn9Iquj2OKDWHB6Y/HnUOuBouF7uS3R4Hw3FoNmwwMo6hWgazQdyHIIs27A==",
|
||||
"dependencies": {
|
||||
"System.Diagnostics.EventLog": "8.0.0",
|
||||
"System.Security.Cryptography.ProtectedData": "8.0.0"
|
||||
"System.Diagnostics.EventLog": "9.0.0",
|
||||
"System.Security.Cryptography.ProtectedData": "9.0.0"
|
||||
}
|
||||
},
|
||||
"System.Diagnostics.EventLog": {
|
||||
"type": "Transitive",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "fdYxcRjQqTTacKId/2IECojlDSFvp7LP5N78+0z/xH7v/Tuw5ZAxu23Y6PTCRinqyu2ePx+Gn1098NC6jM6d+A=="
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "qd01+AqPhbAG14KtdtIqFk+cxHQFZ/oqRSCoxU1F+Q6Kv0cl726sl7RzU9yLFGd4BUOKdN4XojXF0pQf/R6YeA=="
|
||||
},
|
||||
"System.Formats.Asn1": {
|
||||
"type": "Transitive",
|
||||
@@ -351,8 +351,8 @@
|
||||
},
|
||||
"System.Security.Cryptography.ProtectedData": {
|
||||
"type": "Transitive",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "+TUFINV2q2ifyXauQXRwy4CiBhqvDEDZeVJU7qfxya4aRYOKzVBpN+4acx25VcPB9ywUN6C0n8drWl110PhZEg=="
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "CJW+x/F6fmRQ7N6K8paasTw9PDZp4t7G76UjGNlSDgoHPF0h08vTzLYbLZpOLEJSg35d5wy2jCXGo84EN05DpQ=="
|
||||
},
|
||||
"System.Security.Cryptography.Xml": {
|
||||
"type": "Transitive",
|
||||
@@ -389,6 +389,7 @@
|
||||
"dependencies": {
|
||||
"ImGui.NET.DirectX": "[1.91.0.1, )",
|
||||
"Lib.Harmony.Thin": "[2.3.3, )",
|
||||
"MonoMod.Core": "[1.2.1-daily.24.11.24.120.1, )",
|
||||
"NLog": "[5.3.4, )",
|
||||
"NuGet": "[1.0.0, )",
|
||||
"SharedCringe": "[1.0.0, )",
|
||||
@@ -399,8 +400,8 @@
|
||||
"nuget": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"NuGet.Frameworks": "[6.11.1, )",
|
||||
"NuGet.Versioning": "[6.11.1, )",
|
||||
"NuGet.Frameworks": "[6.12.1, )",
|
||||
"NuGet.Versioning": "[6.12.1, )",
|
||||
"System.Linq.Async": "[6.0.1, )"
|
||||
}
|
||||
},
|
||||
@@ -413,7 +414,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"net8.0-windows10.0.19041/win-x64": {
|
||||
"net9.0-windows10.0.19041/win-x64": {
|
||||
"Steamworks.NET": {
|
||||
"type": "Direct",
|
||||
"requested": "[20.1.0, )",
|
||||
@@ -422,20 +423,20 @@
|
||||
},
|
||||
"System.Diagnostics.PerformanceCounter": {
|
||||
"type": "Direct",
|
||||
"requested": "[8.0.0, )",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "lX6DXxtJqVGWw7N/QmVoiCyVQ+Q/Xp+jVXPr3gLK1jJExSn1qmAjJQeb8gnOYeeBTG3E3PmG1nu92eYj/TEjpg==",
|
||||
"requested": "[9.0.0, )",
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "1SSqHtWZUdAC0j0UCw2ZWV4iOWB7nPZFkseqPsjdaypVu7ue1xsUJMobXkpHEDFNTrL0DpOdT7k6qDfqmFkQ6g==",
|
||||
"dependencies": {
|
||||
"System.Configuration.ConfigurationManager": "8.0.0"
|
||||
"System.Configuration.ConfigurationManager": "9.0.0"
|
||||
}
|
||||
},
|
||||
"System.Management": {
|
||||
"type": "Direct",
|
||||
"requested": "[8.0.0, )",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "jrK22i5LRzxZCfGb+tGmke2VH7oE0DvcDlJ1HAKYU8cPmD8XnpUT0bYn2Gy98GEhGjtfbR/sxKTVb+dE770pfA==",
|
||||
"requested": "[9.0.0, )",
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "bVh4xAMI5grY5GZoklKcMBLirhC8Lqzp63Ft3zXJacwGAlLyFdF4k0qz4pnKIlO6HyL2Z4zqmHm9UkzEo6FFsA==",
|
||||
"dependencies": {
|
||||
"System.CodeDom": "8.0.0"
|
||||
"System.CodeDom": "9.0.0"
|
||||
}
|
||||
},
|
||||
"ImGui.NET.DirectX": {
|
||||
@@ -450,8 +451,8 @@
|
||||
},
|
||||
"System.Diagnostics.EventLog": {
|
||||
"type": "Transitive",
|
||||
"resolved": "8.0.0",
|
||||
"contentHash": "fdYxcRjQqTTacKId/2IECojlDSFvp7LP5N78+0z/xH7v/Tuw5ZAxu23Y6PTCRinqyu2ePx+Gn1098NC6jM6d+A=="
|
||||
"resolved": "9.0.0",
|
||||
"contentHash": "qd01+AqPhbAG14KtdtIqFk+cxHQFZ/oqRSCoxU1F+Q6Kv0cl726sl7RzU9yLFGd4BUOKdN4XojXF0pQf/R6YeA=="
|
||||
},
|
||||
"System.Security.AccessControl": {
|
||||
"type": "Transitive",
|
||||
|
Reference in New Issue
Block a user