public override void Build(ProjectBase.ProfileBase ProjectProfile) { string projPath = ProjectProfile.IntermediatePath + ProjectProfile.AssemblyName; MSBuildProjectGenerator projectGenerator = null; if (ProjectProfile is CPPProject.Profile) { MicrosoftVCProjectGenerator generator = new MicrosoftVCProjectGenerator(); projectGenerator = generator; generator.ToolsVersion = Info.ToolsVersion; projPath += ".vcxproj"; } else if (ProjectProfile is CSProject.Profile) { projectGenerator = new MicrosoftCSProjectGenerator(); projPath += ".csproj"; } File.WriteAllText(projPath, projectGenerator.Generate(ProjectProfile.Project, false)); Build(projPath, ProjectProfile.BuildConfiguration, ProjectProfile.PlatformType); }
private string GetOutputType(ProjectBase.ProfileBase Profile) { string type = ""; switch (Profile.OutputType) { case ProjectBase.ProfileBase.OutputTypes.Application: type = "Application"; break; case ProjectBase.ProfileBase.OutputTypes.DynamicLinkLibrary: type = "DynamicLibrary"; break; case ProjectBase.ProfileBase.OutputTypes.StaticLinkLibrary: type = "StaticLibrary"; break; case ProjectBase.ProfileBase.OutputTypes.Makefile: type = "Makefile"; break; } return(type); }
private string GetOutputType(ProjectBase.ProfileBase Profile) { string type = ""; switch (Profile.OutputType) { case ProjectBase.ProfileBase.OutputTypes.Application: type = "Exe"; break; case ProjectBase.ProfileBase.OutputTypes.DynamicLinkLibrary: type = "Library"; break; default: throw new Exception("[" + Profile.OutputType + "] doesn't supported by [" + GetType().Name + "]"); } return(type); }
private void BuildProjectFile(ProjectBase.ProfileBase ProjectProfile) { if (compiler.Build(ProjectProfile)) { if (SelectedRule.LibraryUseType == BuildRules.LibraryUseTypes.Executable) { CopyAllFilesToFinalPath(BinariesPath, EnvironmentHelper.ExecutableExtentions); } else if (SelectedRule.LibraryUseType == BuildRules.LibraryUseTypes.DynamicLibrary) { CopyAllFilesToFinalPath(BinariesPath, EnvironmentHelper.DynamicLibraryExtentions); } state = States.Built; return; } ConsoleHelper.WriteError("Building " + BuildRule.ModuleName + " failed"); state = States.Failed; }
public bool Build(ProjectBase.ProfileBase ProjectProfile) { process.Build(ProjectProfile); return(CheckResult()); }
public override void Build(ProjectBase.ProfileBase ProjectProfile) { //XmlDocument xml = new XmlDocument (); //xml.Load (FilePath); }
public abstract void Build(ProjectBase.ProfileBase ProjectProfile);