/// <summary> /// The entry point /// </summary> private static void Main(string[] args) { try { Log.clear(); // We parse the config file and the command-line... MakeItSoConfig config = MakeItSoConfig.Instance; config.initialize(args); if (config.ConvertSolution == false) { // Most likely because of a bad command-line, or /help reques t... return; } // We get the name of the .sln file to parse... string solutionFilename = config.SolutionFile; if (solutionFilename == "") { Log.log("No solution file found."); return; } // We find the Visual Studio version, and create a parser for it... Log.log("Parsing " + solutionFilename); int version = getSolutionVersion(solutionFilename); SolutionParserBase parser = null; switch (version) { case 10: // VS2008 parser = loadParser("SolutionParser_VS2008.dll"); break; case 11: // VS2010 parser = loadParser("SolutionParser_VS2010.dll"); break; default: throw new Exception("MakeItSo does not support this version of Visual Studio"); } parser.parse(solutionFilename); Log.log("Parsing succeeded."); // We make any changes to the project that are specified in // the MakeItSo.config file... parser.updateSolutionFromConfig(); // We create the makefile... Log.log("Creating makefile..."); MakefileBuilder.createMakefile(parser.ParsedSolution); Log.log("Creating makefile succeeded."); } catch (Exception ex) { Log.log("Fatal error: " + ex.Message); } }
/// <summary> /// Creates a makefile for the solution passed in. /// </summary> public static void createMakefile(SolutionInfo solution) { var builder = new MakefileBuilder(solution); //builder.copyProjectMakefiles(); }