Skip to content

Commit

Permalink
Fix --base
Browse files Browse the repository at this point in the history
  • Loading branch information
0x0ade committed Nov 11, 2018
1 parent a4d7920 commit 2c5091b
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/Enums.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,4 @@ public enum MixedDepAction {
Stub,
Remove
}

public enum BaseConfig {
Minimal,
Linux
}
}
35 changes: 34 additions & 1 deletion src/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,40 @@ public static void Main(string[] args) {
OptionSet options = new OptionSet {
{ "h|help", "Show this message and exit.", v => showHelp = v != null },
{ "v|version", "Show the version and exit.", v => showVersion = v != null },
{ "defaults=", "Choose between multiple default configs:\nminimal, linux", (bool v) => relinkOnly = v },
{ "base=", "Choose between multiple default configs:\ndefault, minimal, forms", v => {
switch (v.ToLowerInvariant()) {
case "default":
xtf.HookCompat = true;
xtf.HookHacks = true;
xtf.HookEntryPoint = false;
xtf.HookLocks = false;
xtf.FixOldMonoXML = false;
xtf.HookBinaryFormatter = true;
xtf.HookReflection = true;
break;

case "minimal":
xtf.HookCompat = false;
xtf.HookHacks = false;
xtf.HookEntryPoint = false;
xtf.HookLocks = false;
xtf.FixOldMonoXML = false;
xtf.HookBinaryFormatter = false;
xtf.HookReflection = false;
break;

case "forms":
xtf.HookCompat = true;
xtf.HookHacks = false;
xtf.HookEntryPoint = true;
xtf.HookLocks = false;
xtf.FixOldMonoXML = false;
xtf.HookBinaryFormatter = false;
xtf.HookReflection = false;
break;
}
} },

{ "relinkonly=", "Only read and write the assemblies listed.", (bool v) => relinkOnly = v },

{ "hook-compat=", "Toggle Forms and P/Invoke compatibility hooks.", (bool v) => xtf.HookCompat = v },
Expand Down
4 changes: 2 additions & 2 deletions src/XnaToFnaUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@ public partial class XnaToFnaUtil : IDisposable {
public List<string> ExtractedXEX = new List<string>();

public bool HookCompat = true;
public bool HookHacks = false;
public bool HookEntryPoint = false;
public bool HookHacks = true;
public bool HookEntryPoint = true;
public bool HookLocks = false;
public bool FixOldMonoXML = false;
public bool HookBinaryFormatter = true;
Expand Down

0 comments on commit 2c5091b

Please # to comment.