public static bool IsTundraProject(Project project) { if (project == null) { return(false); } Console.Write(project.Name.ToString()); var vc_proj = project.Object as VCProject; if (null == vc_proj || (vc_proj.keyword != "MakefileProj" && vc_proj.keyword != "Win32Proj")) { return(false); } var activeConfig = project.ConfigurationManager.ActiveConfiguration; if (activeConfig != null) { var config = FindVCConfiguration(vc_proj, activeConfig); VCNMakeTool nmakeTool = GetNMakeTool(vc_proj, config); if (nmakeTool != null) { Match m = TundraBuildRegex.Match(nmakeTool.BuildCommandLine); return(m.Success); } } return(false); }
public static Match GetBuildCommandLine(Project project, Configuration config) { VCProject vcProject = project.Object as VCProject; VCConfiguration vcConfig = FindVCConfiguration(vcProject, config); var nmake = GetNMakeTool(vcProject, vcConfig); if (nmake != null) { string cmdline = nmake.BuildCommandLine; return(TundraBuildRegex.Match(cmdline)); } return(null); }