mirror of
https://github.com/danbulant/Cosmos
synced 2026-06-11 18:51:41 +00:00
This commit is contained in:
parent
a62ea86934
commit
fd41bedd22
2 changed files with 12 additions and 9 deletions
|
|
@ -65,7 +65,7 @@
|
|||
<Project>{1F0EDE86-F6D4-4355-9A97-10E90457770C}</Project>
|
||||
<Name>Cosmos.Compiler.Builder</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\IL2CPU.PostAssembler\IL2CPU.PostAssembler.csproj">
|
||||
<ProjectReference Include="..\..\..\IL2CPU.PostAssembler\IL2CPU.PostAssembler.csproj">
|
||||
<Project>{304961B0-EC78-4809-9121-24F4655E2638}</Project>
|
||||
<Name>IL2CPU.PostAssembler</Name>
|
||||
</ProjectReference>
|
||||
|
|
|
|||
|
|
@ -25,16 +25,16 @@ namespace CompilerTester
|
|||
{
|
||||
try
|
||||
{
|
||||
var xBasePath = Path.GetDirectoryName(typeof(Program).Assembly.Location);
|
||||
var xCompileHelper = new CompilerHelper();
|
||||
var xBasePath = BuildOptions.Load().BuildPath;
|
||||
var xCompileHelper = new CompilerHelper(); //Todo push ICompilerOptions into CompilerHelper
|
||||
|
||||
xCompileHelper.GetCacheStateFile += new Func<Assembly, string>(delegate(Assembly aAssembly)
|
||||
{
|
||||
return Path.Combine(xBasePath, "out\\" + aAssembly.GetName().Name + ".cachestate");
|
||||
return Path.Combine(xBasePath, aAssembly.GetName().Name + ".cachestate");
|
||||
});
|
||||
xCompileHelper.GetChecksumFile += new Func<Assembly, string>(delegate(Assembly aAssembly)
|
||||
{
|
||||
return Path.Combine(xBasePath, "out\\" + aAssembly.GetName().Name + ".checksum");
|
||||
return Path.Combine(xBasePath, aAssembly.GetName().Name + ".checksum");
|
||||
});
|
||||
xCompileHelper.GetOpCodeMap += new Func<Indy.IL2CPU.IL.OpCodeMap>(delegate { return new X86OpCodeMap(); });
|
||||
xCompileHelper.SkipList.Add(typeof(Builder).Assembly);
|
||||
|
|
@ -45,15 +45,18 @@ namespace CompilerTester
|
|||
});
|
||||
xCompileHelper.SaveAssembler += new Action<Assembly, Indy.IL2CPU.Assembler.Assembler>(delegate(Assembly aAssembly, Indy.IL2CPU.Assembler.Assembler aAssembler)
|
||||
{
|
||||
using (var xOut = new StreamWriter(Path.Combine(xBasePath, "out\\" + aAssembly.GetName().Name + ".out"), false))
|
||||
using (var xOut = new StreamWriter(Path.Combine(xBasePath, aAssembly.GetName().Name + ".out"), false))
|
||||
{
|
||||
aAssembler.FlushText(xOut);
|
||||
}
|
||||
});
|
||||
xCompileHelper.DebugLog += delegate(LogSeverityEnum aSeverity, string aMessage) { Console.WriteLine("{0}: {1}", aSeverity, aMessage); };
|
||||
xCompileHelper.Plugs.Add(Path.Combine(Path.Combine(xBasePath, "Plugs"), "Cosmos.Kernel.Plugs.dll"));
|
||||
xCompileHelper.Plugs.Add(Path.Combine(Path.Combine(xBasePath, "Plugs"), "Cosmos.Hardware.Plugs.dll"));
|
||||
xCompileHelper.Plugs.Add(Path.Combine(Path.Combine(xBasePath, "Plugs"), "Cosmos.Sys.Plugs.dll"));
|
||||
|
||||
|
||||
string PlugPath = Path.Combine(Path.Combine(xBasePath, "Tools"), "Plugs");
|
||||
xCompileHelper.Plugs.Add(Path.Combine(PlugPath, "Cosmos.Kernel.Plugs.dll"));
|
||||
xCompileHelper.Plugs.Add(Path.Combine(PlugPath, "Cosmos.Hardware.Plugs.dll"));
|
||||
xCompileHelper.Plugs.Add(Path.Combine(PlugPath, "Cosmos.Sys.Plugs.dll"));
|
||||
xCompileHelper.CompileExe(typeof(MatthijsTest.Program).Assembly);
|
||||
}
|
||||
catch (Exception E)
|
||||
|
|
|
|||
Loading…
Reference in a new issue