From 2c5091b3cd06b7454745b65338bd04150f17123e Mon Sep 17 00:00:00 2001 From: Maik Macho Date: Sun, 11 Nov 2018 19:39:54 +0100 Subject: [PATCH] Fix --base --- src/Enums.cs | 5 ----- src/Program.cs | 35 ++++++++++++++++++++++++++++++++++- src/XnaToFnaUtil.cs | 4 ++-- 3 files changed, 36 insertions(+), 8 deletions(-) diff --git a/src/Enums.cs b/src/Enums.cs index e884caf..c7f4e65 100644 --- a/src/Enums.cs +++ b/src/Enums.cs @@ -18,9 +18,4 @@ public enum MixedDepAction { Stub, Remove } - - public enum BaseConfig { - Minimal, - Linux - } } diff --git a/src/Program.cs b/src/Program.cs index 5161a77..9a76bcf 100644 --- a/src/Program.cs +++ b/src/Program.cs @@ -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 }, diff --git a/src/XnaToFnaUtil.cs b/src/XnaToFnaUtil.cs index 9d48143..6963014 100644 --- a/src/XnaToFnaUtil.cs +++ b/src/XnaToFnaUtil.cs @@ -80,8 +80,8 @@ public partial class XnaToFnaUtil : IDisposable { public List ExtractedXEX = new List(); 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;