Ejemplo n.º 1
0
        public BuildSystem(Actions Action, PlatformArchitectures PlatformArchitecture, ProjectBase.ProfileBase.BuildConfigurations BuildConfiguration)
        {
            ConsoleHelper.WriteInfo(EnvironmentHelper.ManagedRuntime + " under " + EnvironmentHelper.Platform + " is present");

            PlatformType = (PlatformArchitecture == PlatformArchitectures.x86 ? ProjectBase.ProfileBase.PlatformTypes.x86 : ProjectBase.ProfileBase.PlatformTypes.x64);
            BuildSystem.BuildConfiguration = BuildConfiguration;

            compiler.ErrorRaised += OnError;
        }
Ejemplo n.º 2
0
        public bool Build(string ProjectPath, ProjectBase.ProfileBase.BuildConfigurations BuildConfiguration, ProjectBase.ProfileBase.PlatformTypes PlatformType)
        {
            process.Build(ProjectPath, BuildConfiguration, PlatformType);

            return(CheckResult());
        }
Ejemplo n.º 3
0
 public override void Rebuild(string ProjectPath, ProjectBase.ProfileBase.BuildConfigurations BuildConfiguration, ProjectBase.ProfileBase.PlatformTypes PlatformType)
 {
 }
Ejemplo n.º 4
0
 public override void Build(string ProjectPath, ProjectBase.ProfileBase.BuildConfigurations BuildConfiguration, ProjectBase.ProfileBase.PlatformTypes PlatformType)
 {
     //base.Start("\"" + FilePath + "\" /t:build /p:configuration=" + BuildSystem.BuildConfiguration.ToString().ToLower());
 }
Ejemplo n.º 5
0
 public override void Rebuild(string ProjectPath, ProjectBase.ProfileBase.BuildConfigurations BuildConfiguration, ProjectBase.ProfileBase.PlatformTypes PlatformType)
 {
     Start(string.Format("\"{0}\" /t:clean;build /p:configuration={1} /p:platform={2}", ProjectPath, BuildConfiguration.ToString().ToLower(), PlatformType.ToString()));
 }
Ejemplo n.º 6
0
        // naming for different configurations
        //clean and rebuild
        //find installed tool version

        static int Main(string[] Args)
        {
            EnvironmentHelper.Initialize();

            ArgumentParser arguments = ArgumentParser.Parse(Args);

            if (arguments.Contains("Action"))
            {
                BuildSystem.Actions action = arguments.Get <BuildSystem.Actions>("Action");

                if (action == BuildSystem.Actions.BuildProjectFile)
                {
                    if (EngineProjectFileCreator.Create())
                    {
                        return(0);
                    }
#if DEBUG
                    Console.Read();
#endif
                    return(1);
                }
                else if (arguments.Contains("Architecture"))
                {
                    BuildSystem.PlatformArchitectures architecture = arguments.Get <BuildSystem.PlatformArchitectures>("Architecture");

                    if (arguments.Contains("Configuration"))
                    {
                        ProjectBase.ProfileBase.BuildConfigurations buildConfiguration = arguments.Get <ProjectBase.ProfileBase.BuildConfigurations>("Configuration");

                        BuildSystem builder = new BuildSystem(action, architecture, buildConfiguration);

                        switch (action)
                        {
                        case BuildSystem.Actions.BuildEngine:
                            if (builder.Build())
                            {
                                return(0);
                            }
                            break;

                        case BuildSystem.Actions.RebuildEngine:
                            if (builder.Rebuild())
                            {
                                return(0);
                            }
                            break;

                        case BuildSystem.Actions.CleanEngine:
                            if (builder.Clean())
                            {
                                return(0);
                            }
                            break;
                        }

#if DEBUG
                        Console.Read();
#endif
                        return(1);
                    }
                }
            }

            ConsoleHelper.WriteError("Parameters should be like -Action {Param} -Architecture {Param} -Configuration {Param}");
#if DEBUG
            Console.Read();
#endif
            return(1);
        }
Ejemplo n.º 7
0
 public abstract void Build(string ProjectPath, ProjectBase.ProfileBase.BuildConfigurations BuildConfiguration, ProjectBase.ProfileBase.PlatformTypes PlatformType);
Ejemplo n.º 8
0
 public static string GetConfigurationModePreprocessor(ProjectBase.ProfileBase.BuildConfigurations Configuration)
 {
     return(Configuration.ToString().ToUpper() + "_MODE");
 }