mirror of
https://github.com/BepInEx/BepInEx.git
synced 2026-10-20 01:46:13 +00:00
ConfigDumpDummyAssemblies
This commit is contained in:
1 file changed
+16
@@ -44,6 +44,11 @@ namespace BepInEx.IL2CPP
|
||||
.AppendLine("Cpp2IL - Experimental, may provide better results than Il2CppDumper. Required for use with BepInEx.MelonLoader.Loader.")
|
||||
.ToString());
|
||||
|
||||
private static readonly ConfigEntry<bool> ConfigDumpDummyAssemblies = ConfigFile.CoreConfig.Bind(
|
||||
"IL2CPP", "DumpDummyAssemblies",
|
||||
false,
|
||||
"If enabled, BepInEx will save dummy assemblies generated by an il2cpp dumper into BepInEx/dummy.");
|
||||
|
||||
private static ManualLogSource Il2cppDumperLogger = null;
|
||||
|
||||
public static string GameAssemblyPath => Path.Combine(Paths.GameRootPath, "GameAssembly.dll");
|
||||
@@ -245,6 +250,17 @@ namespace BepInEx.IL2CPP
|
||||
stopwatch.Stop();
|
||||
listener.DoDumperLog("Total time: " + stopwatch.Elapsed, LogLevel.Info);
|
||||
|
||||
if (ConfigDumpDummyAssemblies.Value)
|
||||
{
|
||||
var dummyPath = Path.Combine(Paths.BepInExRootPath, "dummy");
|
||||
Directory.CreateDirectory(dummyPath);
|
||||
|
||||
foreach (var assemblyDefinition in sourceAssemblies)
|
||||
{
|
||||
assemblyDefinition.Write(Path.Combine(dummyPath, assemblyDefinition.Name.Name + ".dll"));
|
||||
}
|
||||
}
|
||||
|
||||
var unhollowerOptions = new UnhollowerOptions
|
||||
{
|
||||
GameAssemblyPath = GameAssemblyPath,
|
||||
|
||||
Reference in new issue
Block a user