Update README for new build process

This commit is contained in:
sinaioutlander 2020-10-04 20:48:08 +11:00
parent 54deecd312
commit 6a9c64c2a1

View File

@ -147,7 +147,7 @@ public class MenuClass_CursorUpdate
## Building ## 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. 1. Install MelonLoader or BepInEx for your game.
2. Open the `src\Explorer.csproj` file in a text editor. 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. 4. Open the `src\Explorer.sln` project.
5. Select `Solution 'Explorer' (1 of 1 project)` in the Solution Explorer panel, and set the <b>Active config</b> property to the version you want to build, then build it. 5. Select `Solution 'Explorer' (1 of 1 project)` in the Solution Explorer panel, and set the <b>Active config</b> 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. 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 ## Credits