diff --git a/build.ps1 b/build.ps1 index 4da82c78..537b26af 100644 --- a/build.ps1 +++ b/build.ps1 @@ -73,7 +73,7 @@ Remove-Item $Path/../UnityExplorer.BepInEx.IL2CPP.zip -ErrorAction SilentlyConti dotnet build src/UnityExplorer.sln -c Release_BIE_CoreCLR $Path = "Release/UnityExplorer.BepInEx.IL2CPP.CoreCLR" # ILRepack -lib/ILRepack.exe /target:library /lib:lib/net472 /lib:lib/net6/ /lib:lib/interop/ /lib:$Path /internalize /out:$Path/UnityExplorer.BIE.IL2CPP.CoreCLR.dll $Path/UnityExplorer.BIE.IL2CPP.CoreCLR.dll $Path/mcs.dll $Path/Tomlet.dll +lib/ILRepack.exe /target:library /lib:lib/net472/build423~577 /lib:lib/net6/ /lib:lib/interop/ /lib:$Path /internalize /out:$Path/UnityExplorer.BIE.IL2CPP.CoreCLR.dll $Path/UnityExplorer.BIE.IL2CPP.CoreCLR.dll $Path/mcs.dll $Path/Tomlet.dll # (cleanup and move files) Remove-Item $Path/Tomlet.dll Remove-Item $Path/mcs.dll @@ -90,6 +90,27 @@ Move-Item -Path $Path/UniverseLib.IL2CPP.Interop.dll -Destination $Path/plugins/ Remove-Item $Path/../UnityExplorer.BepInEx.IL2CPP.CoreCLR.zip -ErrorAction SilentlyContinue 7z a $Path/../UnityExplorer.BepInEx.IL2CPP.CoreCLR.zip .\$Path\* +# ----------- BepInEx Unity IL2CPP CoreCLR ----------- +dotnet build src/UnityExplorer.sln -c Release_BIE_Unity_Cpp +$Path = "Release/UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR" +# ILRepack +lib/ILRepack.exe /target:library /lib:lib/net472/build647+ /lib:lib/net6/ /lib:lib/interop/ /lib:$Path /internalize /out:$Path/UnityExplorer.BIE.Unity.IL2CPP.CoreCLR.dll $Path/UnityExplorer.BIE.Unity.IL2CPP.CoreCLR.dll $Path/mcs.dll $Path/Tomlet.dll +# (cleanup and move files) +Remove-Item $Path/Tomlet.dll +Remove-Item $Path/mcs.dll +Remove-Item $Path/Iced.dll +Remove-Item $Path/Il2CppInterop.Common.dll +Remove-Item $Path/Il2CppInterop.Runtime.dll +Remove-Item $Path/Microsoft.Extensions.Logging.Abstractions.dll +Remove-Item $Path/UnityExplorer.BIE.Unity.IL2CPP.CoreCLR.deps.json +New-Item -Path "$Path" -Name "plugins" -ItemType "directory" -Force +New-Item -Path "$Path" -Name "plugins/sinai-dev-UnityExplorer" -ItemType "directory" -Force +Move-Item -Path $Path/UnityExplorer.BIE.Unity.IL2CPP.CoreCLR.dll -Destination $Path/plugins/sinai-dev-UnityExplorer -Force +Move-Item -Path $Path/UniverseLib.IL2CPP.Interop.dll -Destination $Path/plugins/sinai-dev-UnityExplorer -Force +# (create zip archive) +Remove-Item $Path/../UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR.zip -ErrorAction SilentlyContinue +7z a $Path/../UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR.zip .\$Path\* + # ----------- BepInEx 5 Mono ----------- dotnet build src/UnityExplorer.sln -c Release_BIE5_Mono $Path = "Release/UnityExplorer.BepInEx5.Mono" diff --git a/lib/net472/BepInEx.Core.dll b/lib/net472/build423~577/BepInEx.Core.dll similarity index 100% rename from lib/net472/BepInEx.Core.dll rename to lib/net472/build423~577/BepInEx.Core.dll diff --git a/lib/net472/BepInEx.IL2CPP.dll b/lib/net472/build423~577/BepInEx.IL2CPP.dll similarity index 100% rename from lib/net472/BepInEx.IL2CPP.dll rename to lib/net472/build423~577/BepInEx.IL2CPP.dll diff --git a/lib/net472/build647+/BepInEx.Core.dll b/lib/net472/build647+/BepInEx.Core.dll new file mode 100644 index 00000000..431e266e Binary files /dev/null and b/lib/net472/build647+/BepInEx.Core.dll differ diff --git a/lib/net472/build647+/BepInEx.Unity.Common.dll b/lib/net472/build647+/BepInEx.Unity.Common.dll new file mode 100644 index 00000000..63306152 Binary files /dev/null and b/lib/net472/build647+/BepInEx.Unity.Common.dll differ diff --git a/lib/net472/build647+/BepInEx.Unity.IL2CPP.dll b/lib/net472/build647+/BepInEx.Unity.IL2CPP.dll new file mode 100644 index 00000000..e1c5da83 Binary files /dev/null and b/lib/net472/build647+/BepInEx.Unity.IL2CPP.dll differ diff --git a/src/Loader/BepInEx/ExplorerBepInPlugin.cs b/src/Loader/BepInEx/ExplorerBepInPlugin.cs index ab9ad330..13794f79 100644 --- a/src/Loader/BepInEx/ExplorerBepInPlugin.cs +++ b/src/Loader/BepInEx/ExplorerBepInPlugin.cs @@ -5,8 +5,12 @@ using UnityExplorer.Config; using UnityExplorer.Loader.BIE; #if CPP +#if BIPUNITY +using BepInEx.Unity.IL2CPP; +#else using BepInEx.IL2CPP; #endif +#endif namespace UnityExplorer { diff --git a/src/UnityExplorer.csproj b/src/UnityExplorer.csproj index aa7594a2..c8a730f0 100644 --- a/src/UnityExplorer.csproj +++ b/src/UnityExplorer.csproj @@ -11,7 +11,7 @@ none UnityExplorer 10.0 - BIE_Cpp;BIE_Cpp_CoreCLR;BIE5_Mono;BIE6_Mono;ML_Cpp_net6;ML_Cpp_net472;ML_Mono;STANDALONE_Mono;STANDALONE_Cpp + BIE_Cpp;BIE_Cpp_CoreCLR;BIE_Unity_Cpp_CoreCLR;BIE5_Mono;BIE6_Mono;ML_Cpp_net6;ML_Cpp_net472;ML_Mono;STANDALONE_Mono;STANDALONE_Cpp @@ -49,6 +49,13 @@ CPP,BIE,BIE6,INTEROP UnityExplorer.BIE.IL2CPP.CoreCLR + + + net6 + ..\Release\UnityExplorer.BepInEx.Unity.IL2CPP.CoreCLR\ + CPP,BIE,BIE6,BIPUNITY,INTEROP + UnityExplorer.BIE.Unity.IL2CPP.CoreCLR + net35 @@ -88,7 +95,7 @@ - + @@ -148,14 +155,24 @@ - ..\lib\net472\BepInEx.Core.dll + ..\lib\net472\build423~577\BepInEx.Core.dll False - ..\lib\net472\BepInEx.IL2CPP.dll + ..\lib\net472\build423~577\BepInEx.IL2CPP.dll False + + + ..\lib\net472\build647+\BepInEx.Core.dll + False + + + ..\lib\net472\build647+\BepInEx.Unity.IL2CPP.dll + False + + @@ -211,7 +228,7 @@ - + ..\lib\interop\Il2Cppmscorlib.dll False diff --git a/src/UnityExplorer.sln b/src/UnityExplorer.sln index ef2e7e66..28682954 100644 --- a/src/UnityExplorer.sln +++ b/src/UnityExplorer.sln @@ -7,8 +7,9 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "UnityExplorer", "UnityExplo EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution - Release_BIE_Cpp|Any CPU = Release_BIE_Cpp|Any CPU Release_BIE_CoreCLR|Any CPU = Release_BIE_CoreCLR|Any CPU + Release_BIE_Cpp|Any CPU = Release_BIE_Cpp|Any CPU + Release_BIE_Unity_Cpp|Any CPU = Release_BIE_Unity_Cpp|Any CPU Release_BIE5_Mono|Any CPU = Release_BIE5_Mono|Any CPU Release_BIE6_Mono|Any CPU = Release_BIE6_Mono|Any CPU Release_ML_Cpp_net472|Any CPU = Release_ML_Cpp_net472|Any CPU @@ -18,10 +19,12 @@ Global Release_STANDALONE_Mono|Any CPU = Release_STANDALONE_Mono|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.ActiveCfg = BIE_Cpp|Any CPU - {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.Build.0 = BIE_Cpp|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_CoreCLR|Any CPU.ActiveCfg = BIE_Cpp_CoreCLR|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_CoreCLR|Any CPU.Build.0 = BIE_Cpp_CoreCLR|Any CPU + {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.ActiveCfg = BIE_Cpp|Any CPU + {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Cpp|Any CPU.Build.0 = BIE_Cpp|Any CPU + {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Unity_Cpp|Any CPU.ActiveCfg = BIE_Unity_Cpp_CoreCLR|Any CPU + {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE_Unity_Cpp|Any CPU.Build.0 = BIE_Unity_Cpp_CoreCLR|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE5_Mono|Any CPU.ActiveCfg = BIE5_Mono|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE5_Mono|Any CPU.Build.0 = BIE5_Mono|Any CPU {B21DBDE3-5D6F-4726-93AB-CC3CC68BAE7D}.Release_BIE6_Mono|Any CPU.ActiveCfg = BIE6_Mono|Any CPU