Пример #1
0
        public static bool Build(bool isBldDebug, bool solver, bool isForced)
        {
            var      result = true;
            FileInfo msbuild, msbuild32 = null;

            result = SourceDownloader.GetMsbuild(out msbuild) &&
                     SourceDownloader.GetMsbuild(out msbuild32, true) &&
                     result;
            if (!result)
            {
                Program.WriteError("Could not build Formula, unable to find msbuild");
                return(false);
            }

            var config = isBldDebug ? ConfigDebug : ConfigRelease;

            foreach (var proj in Projects)
            {
                Program.WriteInfo("Building {0}: Config = {1}, Platform = {2}", proj.Item2, config, proj.Item3);
                string optionalArgs = solver ? "/p:SOLVER=SOLVER" : "/p:SOLVER=NOSOLVER";
                if (isForced)
                {
                    optionalArgs += " /t:rebuild";
                }
                result = BuildCSProj(proj.Item1 ? msbuild32 : msbuild, proj.Item2, config, proj.Item3, optionalArgs, proj.Item4) && result;
            }

            if (!result)
            {
                return(false);
            }

            result = DoMove(isBldDebug ? DebugMoveMap : ReleaseMoveMap) && result;
            if (solver)
            {
                result = DoMove(isBldDebug ? DebugZ3MoveMap : ReleaseZ3MoveMap) && result;
            }
            InstallVsix(isBldDebug ? CodeGeneratorDebug : CodeGeneratorRelease);
            return(result);
        }
Пример #2
0
        public static bool Build(bool isRebuildForced)
        {
            if (!isRebuildForced && Verify(outputs))
            {
                Program.WriteInfo("Gardens Point dependencies have already been built; skipping this build step.");
                return(true);
            }

            var           result = true;
            FileInfo      gppg, gplex;
            DirectoryInfo gplexSrc, gppgSrc;

            result = SourceDownloader.DownloadGardensPointBoot(out gppg, out gplex) && result;
            result = SourceDownloader.Download(SourceDownloader.DependencyKind.GPLEX, out gplexSrc) && result;
            result = SourceDownloader.Download(SourceDownloader.DependencyKind.GPPG, out gppgSrc) && result;
            if (!result)
            {
                Program.WriteError("Could not acquire Gardens Point dependencies");
                return(false);
            }

            FileInfo csc;

            result = SourceDownloader.GetCsc(out csc) && result;
            if (!result)
            {
                Program.WriteError("Could not find CSharp compiler");
                return(false);
            }

            FileInfo msbuild;

            result = SourceDownloader.GetMsbuild(out msbuild) && result;
            if (!result)
            {
                Program.WriteError("Could not find msbuild");
                return(false);
            }


            //// Next try to compile gplex
            result = GenerateSpecFiles(gplexSrc, gplexGenBat, gplexGenBatOut, csc, gplex, gppg) &&
                     UpgradeAndCompile(gplexSrc, gplexProj, msbuild, "v4.5") &&
                     DoMove(gplexSrc, gplexMoveMap) &&
                     result;
            if (!result)
            {
                Program.WriteError("Could not compile the gplex dependency");
                return(false);
            }

            //// Next try to compile gppg
            result = GenerateSpecFiles(gppgSrc, gppgGenBat, gppgGenBatOut, csc, gplex, gppg) &&
                     UpgradeAndCompile(gppgSrc, gppgProj, msbuild, "v4.5") &&
                     DoMove(gppgSrc, gppgMoveMap) &&
                     result;
            if (!result)
            {
                Program.WriteError("Could not compile the gppg dependency");
                return(false);
            }

            return(result);
        }