net9 + basic splash
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0": {},
|
||||
"net8.0/win-x64": {}
|
||||
"net9.0": {},
|
||||
"net9.0/win-x64": {}
|
||||
}
|
||||
}
|
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net8.0-windows10.0.19041.0</TargetFramework>
|
||||
<TargetFramework>net9.0-windows10.0.19041.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
@@ -14,9 +14,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Gameloop.Vdf" Version="0.6.2" />
|
||||
<PackageReference Include="NLog.Schema" Version="5.3.4" />
|
||||
<PackageReference Include="Velopack" Version="0.0.630-g9c52e40" />
|
||||
<PackageReference Include="Velopack" Version="0.0.942" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@@ -25,6 +25,10 @@ public class GameDirectoryAssemblyLoadContext : AssemblyLoadContext, ICoreLoadCo
|
||||
|
||||
AddOverride(name, file);
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
// fucking microsoft broke the standard in net9
|
||||
}
|
||||
catch (BadImageFormatException)
|
||||
{
|
||||
// if we are trying to load native image
|
||||
|
@@ -1,7 +1,6 @@
|
||||
using System.Diagnostics;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Loader;
|
||||
using System.Web;
|
||||
using CringeBootstrap;
|
||||
using CringeBootstrap.Abstractions;
|
||||
using Velopack;
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
@@ -24,6 +24,7 @@
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Basic.Reference.Assemblies.Net80" Version="1.7.9" PrivateAssets="all" />
|
||||
<PackageReference Include="Basic.Reference.Assemblies.Net80Windows" Version="1.7.9" PrivateAssets="all" />
|
||||
<PackageReference Include="MonoMod.Core" Version="1.2.1-daily.24.11.24.120.1" />
|
||||
<PackageReference Include="NLog" Version="5.3.4" />
|
||||
<PackageReference Include="Lib.Harmony.Thin" Version="2.3.3" />
|
||||
<PackageReference Include="ImGui.NET.DirectX" Version="1.91.0.1" />
|
||||
|
@@ -1,14 +1,20 @@
|
||||
using NLog;
|
||||
using System.Numerics;
|
||||
using CringePlugins.Abstractions;
|
||||
using ImGuiNET;
|
||||
using NLog;
|
||||
|
||||
using static ImGuiNET.ImGui;
|
||||
|
||||
namespace CringePlugins.Splash;
|
||||
|
||||
public class Splash : ISplashProgress
|
||||
public class Splash : ISplashProgress, IRenderComponent
|
||||
{
|
||||
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private readonly List<ILoadingStage> _loadingStages = [];
|
||||
|
||||
private ProgressInfo? _lastInfo;
|
||||
private bool _done;
|
||||
|
||||
public void Report(ProgressInfo value)
|
||||
{
|
||||
@@ -33,6 +39,8 @@ public class Splash : ISplashProgress
|
||||
}
|
||||
|
||||
public void ExecuteLoadingStages()
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var loadingStage in _loadingStages)
|
||||
{
|
||||
@@ -41,4 +49,32 @@ public class Splash : ISplashProgress
|
||||
_lastInfo = null;
|
||||
}
|
||||
}
|
||||
finally
|
||||
{
|
||||
_done = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void OnFrame()
|
||||
{
|
||||
if (_done) return;
|
||||
|
||||
SetNextWindowPos(GetMainViewport().GetCenter(), ImGuiCond.Always, new(.5f, .5f));
|
||||
SetNextWindowSize(new(400, GetFrameHeightWithSpacing()), ImGuiCond.Always);
|
||||
Begin("Splash", ImGuiWindowFlags.NoDecoration | ImGuiWindowFlags.NoInputs);
|
||||
|
||||
var sizeArg = new Vector2(GetWindowWidth() - GetStyle().WindowPadding.X * 2, 0);
|
||||
if (_lastInfo is null)
|
||||
{
|
||||
const string text = "Loading...";
|
||||
var size = CalcTextSize(text);
|
||||
|
||||
SetCursorPosX((GetWindowWidth() - size.X) * .5f);
|
||||
Text(text);
|
||||
}
|
||||
else
|
||||
ProgressBar((_lastInfo as PercentProgressInfo)?.Percent ?? 0, sizeArg, _lastInfo.Text);
|
||||
|
||||
End();
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0-windows7.0": {
|
||||
"net9.0-windows7.0": {
|
||||
"Basic.Reference.Assemblies.Net80": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.7.9, )",
|
||||
@@ -53,6 +53,18 @@
|
||||
"System.Text.Json": "8.0.1"
|
||||
}
|
||||
},
|
||||
"MonoMod.Core": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.2.1-daily.24.11.24.120.1, )",
|
||||
"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.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"
|
||||
}
|
||||
},
|
||||
"NLog": {
|
||||
"type": "Direct",
|
||||
"requested": "[5.3.4, )",
|
||||
@@ -96,47 +108,36 @@
|
||||
},
|
||||
"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.Core": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.1.0",
|
||||
"contentHash": "Ks8RntZGVcktr2QF/AovTEbuOkrgXz6omjrvT5LRveOIQJuy+IFuEQPBVWu+cSKVIoZD5XkpRFvlVrItgPIrXw==",
|
||||
"dependencies": {
|
||||
"Mono.Cecil": "0.11.5",
|
||||
"MonoMod.Backports": "1.1.0",
|
||||
"MonoMod.ILHelpers": "1.0.1",
|
||||
"MonoMod.Utils": "25.0.4"
|
||||
"MonoMod.ILHelpers": "1.1.0-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",
|
||||
@@ -203,8 +204,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, )"
|
||||
}
|
||||
},
|
||||
@@ -217,7 +218,7 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"net8.0-windows7.0/win-x64": {
|
||||
"net9.0-windows7.0/win-x64": {
|
||||
"ImGui.NET.DirectX": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.91.0.1, )",
|
||||
|
@@ -2,5 +2,6 @@
|
||||
<configuration>
|
||||
<packageSources>
|
||||
<add key="zznty" value="https://ng.zznty.ru/v3/index.json" protocolVersion="3" />
|
||||
<add key="MonoMod DevBuilds" value="bin/" />
|
||||
</packageSources>
|
||||
</configuration>
|
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
@@ -9,8 +9,8 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NuGet.Frameworks" Version="6.11.1" />
|
||||
<PackageReference Include="NuGet.Versioning" Version="6.11.1" />
|
||||
<PackageReference Include="NuGet.Frameworks" Version="6.12.1" />
|
||||
<PackageReference Include="NuGet.Versioning" Version="6.12.1" />
|
||||
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
|
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0": {
|
||||
"net9.0": {
|
||||
"NuGet.Frameworks": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.11.1, )",
|
||||
"resolved": "6.11.1",
|
||||
"contentHash": "plTZ3ariSWQVsFn2mk83SsdmSg1VpgIMTSZpP/eSE/NNQF02p+M9ItxAYeUZBMX+cQ2nFkSwxQRJ0/fkaV9Hbg=="
|
||||
"requested": "[6.12.1, )",
|
||||
"resolved": "6.12.1",
|
||||
"contentHash": "kPaRD5RJC0ByUg+yGX6bDz5XHMI7OYmQwP8kbtef+vZ+csj/VDb5Bwas4ChxwhoAbI8lEvwP5/3aViQPpgNBow=="
|
||||
},
|
||||
"NuGet.Versioning": {
|
||||
"type": "Direct",
|
||||
"requested": "[6.11.1, )",
|
||||
"resolved": "6.11.1",
|
||||
"contentHash": "YNn3BB71F+guJW42TbAhGcMh3gpyqFMZcPVD9pm5vcvGivTALtRely/VCPWQQ6JQ5PfwIrjPaJMO7VnqyeK3rg=="
|
||||
"requested": "[6.12.1, )",
|
||||
"resolved": "6.12.1",
|
||||
"contentHash": "fJ6rFYANDnohFsdpaY79FvrJxI6murmoOxXz6nZlf819F48+IBKMnAIg3oIBRtZq5y498ObMtKnro5IitvizUg=="
|
||||
},
|
||||
"System.Linq.Async": {
|
||||
"type": "Direct",
|
||||
@@ -29,6 +29,6 @@
|
||||
"contentHash": "UcSjPsst+DfAdJGVDsu346FX0ci0ah+lw3WRtn18NUwEqRt70HaOQ7lI72vy3+1LxtqI3T5GWwV39rQSrCzAeg=="
|
||||
}
|
||||
},
|
||||
"net8.0/win-x64": {}
|
||||
"net9.0/win-x64": {}
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0</TargetFramework>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0": {
|
||||
"net9.0": {
|
||||
"NLog": {
|
||||
"type": "Direct",
|
||||
"requested": "[5.3.4, )",
|
||||
@@ -11,8 +11,8 @@
|
||||
"SpaceEngineersDedicated.ReferenceAssemblies": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.*, )",
|
||||
"resolved": "1.205.24",
|
||||
"contentHash": "cgzWJWflVITp+fY5OPgffcoJ08KL5YHMQrMwaDAkUxfRwPgTzU8qOADsrMqq25vXsEbznU1DzNWwTPviYYi7UA==",
|
||||
"resolved": "1.205.26",
|
||||
"contentHash": "kQSFCLgi0nFUhLvXlp9D2w4cTnXtEIctWtNlK+Vw4FAofws60rwR6Kil9YBNlaDyoo19dcyNt3bs4G9VculcIA==",
|
||||
"dependencies": {
|
||||
"SharpDX": "4.2.0-keen-cringe",
|
||||
"protobuf-net": "1.0.0"
|
||||
@@ -32,6 +32,6 @@
|
||||
"type": "Project"
|
||||
}
|
||||
},
|
||||
"net8.0/win-x64": {}
|
||||
"net9.0/win-x64": {}
|
||||
}
|
||||
}
|
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net8.0-windows</TargetFramework>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="CringePlugins">
|
||||
<HintPath>..\CringePlugins\bin\Debug\net8.0-windows\win-x64\CringePlugins.dll</HintPath>
|
||||
<HintPath>..\CringePlugins\bin\$(Configuration)\$(TargetFramework)\$(RuntimeIdentifier)\CringePlugins.dll</HintPath>
|
||||
<Private>false</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"version": 1,
|
||||
"dependencies": {
|
||||
"net8.0-windows7.0": {
|
||||
"net9.0-windows7.0": {
|
||||
"ImGui.NET.DirectX": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.91.0.1, )",
|
||||
@@ -22,28 +22,13 @@
|
||||
"SpaceEngineersDedicated.ReferenceAssemblies": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.*, )",
|
||||
"resolved": "1.205.24",
|
||||
"contentHash": "cgzWJWflVITp+fY5OPgffcoJ08KL5YHMQrMwaDAkUxfRwPgTzU8qOADsrMqq25vXsEbznU1DzNWwTPviYYi7UA==",
|
||||
"resolved": "1.205.26",
|
||||
"contentHash": "kQSFCLgi0nFUhLvXlp9D2w4cTnXtEIctWtNlK+Vw4FAofws60rwR6Kil9YBNlaDyoo19dcyNt3bs4G9VculcIA==",
|
||||
"dependencies": {
|
||||
"SharpDX": "4.2.0-keen-cringe",
|
||||
"protobuf-net": "1.0.0"
|
||||
}
|
||||
},
|
||||
"dnlib": {
|
||||
"type": "Transitive",
|
||||
"resolved": "4.4.0",
|
||||
"contentHash": "cKHI720q+zfEEvzklWVGt6B0TH3AibAyJbpUJl4U6KvTP13tycfnqJpkGHRZ/oQ45BTIoIxIwltHIJVDN+iCqQ=="
|
||||
},
|
||||
"NuGet.Frameworks": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.11.1",
|
||||
"contentHash": "plTZ3ariSWQVsFn2mk83SsdmSg1VpgIMTSZpP/eSE/NNQF02p+M9ItxAYeUZBMX+cQ2nFkSwxQRJ0/fkaV9Hbg=="
|
||||
},
|
||||
"NuGet.Versioning": {
|
||||
"type": "Transitive",
|
||||
"resolved": "6.11.1",
|
||||
"contentHash": "YNn3BB71F+guJW42TbAhGcMh3gpyqFMZcPVD9pm5vcvGivTALtRely/VCPWQQ6JQ5PfwIrjPaJMO7VnqyeK3rg=="
|
||||
},
|
||||
"protobuf-net": {
|
||||
"type": "Transitive",
|
||||
"resolved": "1.0.0",
|
||||
@@ -68,37 +53,9 @@
|
||||
"type": "Transitive",
|
||||
"resolved": "6.0.0",
|
||||
"contentHash": "/iUeP3tq1S0XdNNoMz5C9twLSrM/TH+qElHkXWaPvuNOt+99G75NrV0OS2EqHx5wMN7popYjpc8oTjC1y16DLg=="
|
||||
},
|
||||
"cringebootstrap.abstractions": {
|
||||
"type": "Project"
|
||||
},
|
||||
"cringeplugins": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"NLog": "[5.3.4, )",
|
||||
"NuGet": "[1.0.0, )",
|
||||
"SharedCringe": "[1.0.0, )",
|
||||
"SpaceEngineersDedicated.ReferenceAssemblies": "[1.*, )",
|
||||
"dnlib": "[4.4.0, )"
|
||||
}
|
||||
},
|
||||
"nuget": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"NuGet.Frameworks": "[6.11.1, )",
|
||||
"NuGet.Versioning": "[6.11.1, )"
|
||||
}
|
||||
},
|
||||
"sharedcringe": {
|
||||
"type": "Project",
|
||||
"dependencies": {
|
||||
"CringeBootstrap.Abstractions": "[1.0.0, )",
|
||||
"NLog": "[5.3.4, )",
|
||||
"SpaceEngineersDedicated.ReferenceAssemblies": "[1.*, )"
|
||||
}
|
||||
}
|
||||
},
|
||||
"net8.0-windows7.0/win-x64": {
|
||||
"net9.0-windows7.0/win-x64": {
|
||||
"ImGui.NET.DirectX": {
|
||||
"type": "Direct",
|
||||
"requested": "[1.91.0.1, )",
|
||||
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "8.0.0",
|
||||
"version": "9.0.0",
|
||||
"rollForward": "latestFeature",
|
||||
"allowPrerelease": false
|
||||
}
|
||||
|
Reference in New Issue
Block a user