File tree Expand file tree Collapse file tree
Runtimes/Unity/BepInEx.Unity.IL2CPP Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -285,16 +285,12 @@ private static List<AssemblyDefinition> RunCpp2Il()
285285
286286 private static void RunIl2CppInteropGenerator ( List < AssemblyDefinition > sourceAssemblies )
287287 {
288- // Wine doesn't seem to support parallelism properly
289- var canRunParallel = ! PlatformHelper . Is ( Platform . Wine ) ;
290-
291288 var opts = new GeneratorOptions
292289 {
293290 GameAssemblyPath = GameAssemblyPath ,
294291 Source = sourceAssemblies ,
295292 OutputDir = IL2CPPInteropAssemblyPath ,
296293 UnityBaseLibsDir = Directory . Exists ( UnityBaseLibsDirectory ) ? UnityBaseLibsDirectory : null ,
297- Parallel = canRunParallel ,
298294 ObfuscatedNamesRegex = ! string . IsNullOrEmpty ( ConfigUnhollowerDeobfuscationRegex . Value )
299295 ? new Regex ( ConfigUnhollowerDeobfuscationRegex . Value )
300296 : null ,
Original file line number Diff line number Diff line change 88using BepInEx . Preloader . Core . Patching ;
99using BepInEx . Preloader . RuntimeFixes ;
1010using BepInEx . Unity . Common ;
11+ using MonoMod . Utils ;
1112
1213namespace BepInEx . Unity . IL2CPP ;
1314
@@ -51,6 +52,15 @@ public static void Run()
5152 Logger . Log ( LogLevel . Debug , $ "Interop assembly directory: { Il2CppInteropManager . IL2CPPInteropAssemblyPath } ") ;
5253 Logger . Log ( LogLevel . Debug , $ "BepInEx root path: { Paths . BepInExRootPath } ") ;
5354
55+ if ( PlatformHelper . Is ( Platform . Wine ) && ! Environment . Is64BitProcess )
56+ {
57+ if ( ! NativeLibrary . TryGetExport ( NativeLibrary . Load ( "ntdll" ) , "RtlRestoreContext" , out var _ ) )
58+ {
59+ Logger . Log ( LogLevel . Warning ,
60+ "Your wine version doesn't support CoreCLR properly, expect crashes! Upgrade to wine 7.16 or higher." ) ;
61+ }
62+ }
63+
5464 NativeLibrary . SetDllImportResolver ( typeof ( Il2CppInterop . Runtime . IL2CPP ) . Assembly , DllImportResolver ) ;
5565
5666 Il2CppInteropManager . Initialize ( ) ;
You can’t perform that action at this time.
0 commit comments