diff --git a/Demos/GuessG3/GuessBootGen3.Cosmos b/Demos/GuessG3/GuessBootGen3.Cosmos index 9a2d122fd1..6f4018658e 100644 --- a/Demos/GuessG3/GuessBootGen3.Cosmos +++ b/Demos/GuessG3/GuessBootGen3.Cosmos @@ -3,7 +3,7 @@ net462 - True + X86G3 elf False Source diff --git a/source/Cosmos.Build.MSBuild/Cosmos.targets b/source/Cosmos.Build.MSBuild/Cosmos.targets index 7132895d96..eb4eba5de5 100644 --- a/source/Cosmos.Build.MSBuild/Cosmos.targets +++ b/source/Cosmos.Build.MSBuild/Cosmos.targets @@ -18,14 +18,14 @@ $(CosmosDir)\Kernel - + - + @@ -48,7 +48,7 @@ - + diff --git a/source/Cosmos.Build.MSBuild/IL2CPU.cs b/source/Cosmos.Build.MSBuild/IL2CPU.cs index a9c855922b..c1bafb4367 100644 --- a/source/Cosmos.Build.MSBuild/IL2CPU.cs +++ b/source/Cosmos.Build.MSBuild/IL2CPU.cs @@ -9,9 +9,7 @@ namespace Cosmos.Build.MSBuild { public class IL2CPU : BaseToolTask { - // protected CompilerEngine mTask = new CompilerEngine(); - - public bool UseGen3Kernel { get; set; } + public string KernelPkg { get; set; } [Required] public string CosmosBuildDir { get; set; } @@ -80,10 +78,9 @@ public override bool Execute() try { - //TODO: Add AdditionalReferences and AdditionalSearchDirs here and to log messages below. Dictionary args = new Dictionary { - {"UseGen3Kernel", Convert.ToString(UseGen3Kernel)}, + {"KernelPkg", Convert.ToString(KernelPkg)}, {"DebugEnabled", Convert.ToString(DebugEnabled)}, {"StackCorruptionDetectionEnabled", Convert.ToString(StackCorruptionDetectionEnabled)}, {"StackCorruptionDetectionLevel", Convert.ToString(StackCorruptionDetectionLevel)}, diff --git a/source/Cosmos.IL2CPU/CompilerEngine.cs b/source/Cosmos.IL2CPU/CompilerEngine.cs index 526b1e3427..a3202d44b4 100644 --- a/source/Cosmos.IL2CPU/CompilerEngine.cs +++ b/source/Cosmos.IL2CPU/CompilerEngine.cs @@ -20,7 +20,14 @@ public class CompilerEngine { public Action OnLogException; protected static Action mStaticLog = null; - public static bool UseGen3Kernel { get; set; } + public static string KernelPkg { get; set; } + public static bool UseGen3Kernel + { + get + { + return KernelPkg == "X86G3"; + } + } public string DebugMode { get; set; } public string TraceAssemblies { get; set; } public byte DebugCom { get; set; } diff --git a/source/Cosmos.IL2CPU/Program.cs b/source/Cosmos.IL2CPU/Program.cs index 325919b0c8..421080ad92 100644 --- a/source/Cosmos.IL2CPU/Program.cs +++ b/source/Cosmos.IL2CPU/Program.cs @@ -45,8 +45,8 @@ public static int Run(string[] args, Action logMessage, Action l var xEngine = new CompilerEngine(); CompilerEngine.UseGen3Kernel = false; - if (CmdOptions.ContainsKey("UseGen3Kernel".ToLower())) { - CompilerEngine.UseGen3Kernel = Convert.ToBoolean(CmdOptions["UseGen3Kernel".ToLower()]); + if (CmdOptions.ContainsKey("KernelPkg".ToLower())) { + CompilerEngine.KernelPkg = Convert.ToBoolean(CmdOptions["KernelPkg".ToLower()]); } xEngine.DebugEnabled = Convert.ToBoolean(CmdOptions["DebugEnabled".ToLower()]);