Skip to content

Commit

Permalink
Update Cpp2IL_StrippedCodeRegSupport.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
HerpDerpinstine committed Jul 20, 2024
1 parent 759ba03 commit 4517592
Showing 1 changed file with 12 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,7 @@ internal override bool Setup()

internal override bool OnProcess()
{
bool wasSuccess = Generate(FilePath,
Destination.Replace(".tmp", ""),
removePatchReferences: true,
upgradeMSCORLIB: true);
bool wasSuccess = Generate(FilePath, Destination.Replace(".tmp", ""));

if (File.Exists(FilePath))
File.Delete(FilePath);
Expand All @@ -85,17 +82,7 @@ internal override void Save()

private static bool Generate(
string pathIn,
string pathOut,
ReadingMode readingMode = ReadingMode.Deferred,
bool missingDependencyThrow = false,
bool logVerboseEnabled = false,
bool cleanupEnabled = false,
bool publicEverything = false,
bool preventInline = false,
bool strict = false,
bool removePatchReferences = false,
bool upgradeMSCORLIB = false,
bool gacEnabled = false)
string pathOut)
{
bool success = false;
CustomMonoModder mm = null;
Expand All @@ -106,16 +93,16 @@ private static bool Generate(
mm = new CustomMonoModder();
mm.InputPath = pathIn;
mm.OutputPath = pathOut;
mm.ReadingMode = readingMode;
mm.MissingDependencyThrow = missingDependencyThrow;
mm.LogVerboseEnabled = logVerboseEnabled;
mm.CleanupEnabled = cleanupEnabled;
mm.PreventInline = preventInline;
mm.Strict = strict;
mm.PublicEverything = publicEverything;
mm.RemovePatchReferences = removePatchReferences;
mm.UpgradeMSCORLIB = upgradeMSCORLIB;
mm.GACEnabled = gacEnabled;
mm.ReadingMode = ReadingMode.Deferred;
mm.MissingDependencyThrow = false;
mm.LogVerboseEnabled = false;
mm.CleanupEnabled = false;
mm.PreventInline = false;
mm.Strict = false;
mm.PublicEverything = false;
mm.RemovePatchReferences = true;
mm.UpgradeMSCORLIB = true;
mm.GACEnabled = false;

// Add MelonLoader/Managed as a reference
mm.DependencyDirs.Add(MelonEnvironment.MelonManagedDirectory);
Expand Down

0 comments on commit 4517592

Please sign in to comment.