From 6a9c64c2a11d9de2f37ea669ef0d28aeaef11f93 Mon Sep 17 00:00:00 2001 From: sinaioutlander <49360850+sinaioutlander@users.noreply.github.com> Date: Sun, 4 Oct 2020 20:48:08 +1100 Subject: [PATCH] Update README for new build process --- README.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index af85cf6..ac30ed6 100644 --- a/README.md +++ b/README.md @@ -147,7 +147,7 @@ public class MenuClass_CursorUpdate ## Building -If you'd like to build this yourself, everything you need (other than MelonLoader and/or BepInEx) is included with this repository. +If you'd like to build this yourself, you will need to have installed BepInEx and/or MelonLoader for at least one Unity game. If you want to build all 6 versions, you will need at least one Il2Cpp and one Mono game, with BepInEx and MelonLoader installed for both. 1. Install MelonLoader or BepInEx for your game. 2. Open the `src\Explorer.csproj` file in a text editor. @@ -155,7 +155,35 @@ If you'd like to build this yourself, everything you need (other than MelonLoade 4. Open the `src\Explorer.sln` project. 5. Select `Solution 'Explorer' (1 of 1 project)` in the Solution Explorer panel, and set the Active config property to the version you want to build, then build it. 5. The DLLs are built to the `Release\` folder in the root of the repository. -6. [ILRepack](https://github.com/gluck/il-repack) is used to merge `lib\mcs.dll` and the release dll, this step is optional. If you don't merge them, you will need to put `mcs.dll` in the folder with the mod when you install it. + +[ILRepack](https://github.com/gluck/il-repack) is used to merge `lib\mcs.dll` and the release dll. Download the ILRepack nuget package and take the `ILRepack.exe` file from it. + +Put `ILRepack.exe` in the `Release\` folder, then create a `merge.bat` file like so: + +```batch +:: Set GameFolder to the full path of the game you have installed MelonLoader and/or BepInEx for. +SET GameFolder="..." + +:: Only include the lines for the version(s) you are building. + +:: MelonLoader Il2CPP: +ILRepack.exe /lib:"%GameFolder%\MelonLoader" /lib:"%GameFolder%\MelonLoader\Managed" /out:"Explorer.MelonLoader.Il2Cpp\Explorer.dll" "Explorer.MelonLoader.Il2Cpp\Explorer.dll" "..\lib\mcs.dll" + +:: MelonLoader Mono +ILRepack.exe /lib:"..\lib" /lib:"%GameFolder%\MelonLoader" /out:"Explorer.MelonLoader.Mono\Explorer.dll" "Explorer.MelonLoader.Mono\Explorer.dll" "..\lib\mcs.dll" + +:: MelonLoader Mono .NET35 +ILRepack.exe /lib:"..\lib" /lib:"%GameFolder%\MelonLoader" /out:"Explorer.MelonLoader.Mono.NET35\Explorer.dll" "Explorer.MelonLoader.Mono.NET35\Explorer.dll" "..\lib\mcs.NET35.dll" + +:: BepInEx Il2Cpp +ILRepack.exe /lib:"%GameFolder%\BepInEx\core" /lib:"%GameFolder%\BepInEx\unhollowed" /out:"Explorer.BepInEx.Il2Cpp\Explorer.dll" "Explorer.BepInEx.Il2Cpp\Explorer.dll" "..\lib\mcs.dll" + +:: BepInEx Mono +ILRepack.exe /lib:"..\lib" /lib:"%GameFolder%\BepInEx\core" /out:"Explorer.BepInEx.Mono\Explorer.dll" "Explorer.BepInEx.Mono\Explorer.dll" "..\lib\mcs.dll" + +:: BepInEx Mono .NET35 +ILRepack.exe /lib:"..\lib" /lib:"%GameFolder%\BepInEx\core" /out:"Explorer.BepInEx.Mono.NET35\Explorer.dll" "Explorer.BepInEx.Mono.NET35\Explorer.dll" "..\lib\mcs.NET35.dll" +``` ## Credits