Beispiel #1
0
        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);
        }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        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);
        }
Beispiel #4
0
        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;
        }
Beispiel #5
0
        public bool Build(ProjectBase.ProfileBase ProjectProfile)
        {
            process.Build(ProjectProfile);

            return(CheckResult());
        }
Beispiel #6
0
 public override void Build(ProjectBase.ProfileBase ProjectProfile)
 {
     //XmlDocument xml = new XmlDocument ();
     //xml.Load (FilePath);
 }
Beispiel #7
0
 public abstract void Build(ProjectBase.ProfileBase ProjectProfile);