static void Main(string[] args) { // If true, outputs C++/CLI wrapper, // if false, outputs C wrapper with C# code. bool cppCliMode = false; var project = WrapperProject.FromFile("bullet3.xml"); if (!project.VerifyFiles()) { Console.ReadKey(); return; } project.ReadCpp(); var parser = new BulletParser(project); parser.Parse(); Console.WriteLine("Parsing complete"); CWriter cWriter = new CWriter(parser); //project.CProjectPath = "c_temp"; cWriter.Output(); DotNetWriter dotNetWriter; if (cppCliMode) { dotNetWriter = new CppCliWriter(parser); } else { dotNetWriter = new PInvokeWriter(parser); var extensionsWriter = new ExtensionsWriter(parser); extensionsWriter.Output(); } dotNetWriter.Output(); OutputSolution(TargetVS.VS2008, parser); OutputSolution(TargetVS.VS2010, parser); OutputSolution(TargetVS.VS2012, parser); OutputSolution(TargetVS.VS2013, parser); OutputSolution(TargetVS.VS2015, parser); //project.Save(); CMakeWriter cmake = new CMakeWriter(parser); cmake.Output(); Console.Write("Press any key to continue..."); Console.ReadKey(); }
static void Main(string[] args) { // If true, outputs C++/CLI wrapper, // if false, outputs C wrapper with C# code. bool cppCliMode = false; var project = WrapperProject.FromFile("bullet3.xml"); if (!project.VerifyFiles()) { Console.ReadKey(); return; } project.ReadCpp(); var parser = new BulletParser(project); parser.Parse(); Console.WriteLine("Parsing complete"); CWriter cWriter = new CWriter(parser); //project.CProjectPath = "c_temp"; cWriter.Output(); DotNetWriter dotNetWriter; if (cppCliMode) { dotNetWriter = new CppCliWriter(parser); } else { dotNetWriter = new PInvokeWriter(parser); var extensionsWriter = new ExtensionsWriter(parser); extensionsWriter.Output(); } dotNetWriter.Output(); OutputSolution(TargetVS.VS2008, parser); OutputSolution(TargetVS.VS2010, parser); OutputSolution(TargetVS.VS2012, parser); OutputSolution(TargetVS.VS2013, parser); OutputSolution(TargetVS.VS2015, parser); //project.Save(); CMakeWriter cmake = new CMakeWriter(parser); cmake.Output(); Console.Write("Press any key to continue..."); Console.ReadKey(); }