mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
Warn about outdated wine
This commit is contained in:
2 files changed
+10
-4
No files matched your search
@@ -285,16 +285,12 @@ internal static class Il2CppInteropManager
|
||||
|
||||
private static void RunIl2CppInteropGenerator(List<AssemblyDefinition> sourceAssemblies)
|
||||
{
|
||||
// Wine doesn't seem to support parallelism properly
|
||||
var canRunParallel = !PlatformHelper.Is(Platform.Wine);
|
||||
|
||||
var opts = new GeneratorOptions
|
||||
{
|
||||
GameAssemblyPath = GameAssemblyPath,
|
||||
Source = sourceAssemblies,
|
||||
OutputDir = IL2CPPInteropAssemblyPath,
|
||||
UnityBaseLibsDir = Directory.Exists(UnityBaseLibsDirectory) ? UnityBaseLibsDirectory : null,
|
||||
Parallel = canRunParallel,
|
||||
ObfuscatedNamesRegex = !string.IsNullOrEmpty(ConfigUnhollowerDeobfuscationRegex.Value)
|
||||
? new Regex(ConfigUnhollowerDeobfuscationRegex.Value)
|
||||
: null,
|
||||
|
||||
@@ -8,6 +8,7 @@ using BepInEx.Preloader.Core.Logging;
|
||||
using BepInEx.Preloader.Core.Patching;
|
||||
using BepInEx.Preloader.RuntimeFixes;
|
||||
using BepInEx.Unity.Common;
|
||||
using MonoMod.Utils;
|
||||
|
||||
namespace BepInEx.Unity.IL2CPP;
|
||||
|
||||
@@ -51,6 +52,15 @@ public static class Preloader
|
||||
Logger.Log(LogLevel.Debug, $"Interop assembly directory: {Il2CppInteropManager.IL2CPPInteropAssemblyPath}");
|
||||
Logger.Log(LogLevel.Debug, $"BepInEx root path: {Paths.BepInExRootPath}");
|
||||
|
||||
if (PlatformHelper.Is(Platform.Wine) && !Environment.Is64BitProcess)
|
||||
{
|
||||
if (!NativeLibrary.TryGetExport(NativeLibrary.Load("ntdll"), "RtlRestoreContext", out var _))
|
||||
{
|
||||
Logger.Log(LogLevel.Warning,
|
||||
"Your wine version doesn't support CoreCLR properly, expect crashes! Upgrade to wine 7.16 or higher.");
|
||||
}
|
||||
}
|
||||
|
||||
NativeLibrary.SetDllImportResolver(typeof(Il2CppInterop.Runtime.IL2CPP).Assembly, DllImportResolver);
|
||||
|
||||
Il2CppInteropManager.Initialize();
|
||||
|
||||
Reference in new issue
Block a user