Beispiel #1
0
        static void Main(string[] args)
        {
            // binary folder.
            var version  = Version3 + "." + Revision();
            var fileName = "linqtoxsd." + version + "-bin";
            var dirName  = fileName;

            try
            {
                IO.Directory.Delete(dirName, true);
            }
            catch (IO.DirectoryNotFoundException)
            {
            }
            IO.Directory.CreateDirectory(dirName);
            {
                // var engine = new E.Engine();
                var engine = new BE.ProjectCollection();
                {
                    // Instantiate a new FileLogger to generate build log
                    var logger = new E.FileLogger();
                    // Set the logfile parameter to indicate the log destination
                    logger.Parameters = @"logfile=build.log";
                    engine.RegisterLogger(logger);
                }
                Build(engine, "..\\..\\..", XObjects, version, dirName);
                Build(engine, "..\\..\\..\\XObjects", XOTask, version, dirName);
                Build(engine, "..\\..\\..\\XObjects", Cmdline, version, dirName);
                engine.UnregisterAllLoggers();
            }
            // zipping:
            var zipFile = fileName + ".zip";

            IO.File.Delete(zipFile);
            {
                var zipProcess = new SD.ProcessStartInfo(
                    "\"c:\\program files\\7-Zip\\7z.exe\"",
                    "a " +
                    zipFile + " " +
                    dirName);
                zipProcess.UseShellExecute = false;
                var process = SD.Process.Start(zipProcess);
                process.WaitForExit();
            }
        }
Beispiel #2
0
 static void Main(string[] args)
 {
     var version = Version3 + "." + Revision();
     {
         var engine = new E.Engine();
         {
             // Instantiate a new FileLogger to generate build log
             var logger = new E.FileLogger();
             // Set the logfile parameter to indicate the log destination
             logger.Parameters = @"logfile=build.log";
             engine.RegisterLogger(logger);
         }
         Build(engine, "../../..", XObjects, version);
         Build(engine, "../../../XObjects", XOTask, version);
         Build(engine, "../../../XObjects", Cmdline, version);
         engine.UnregisterAllLoggers();
     }
     var fileName = "linqtoxsd." + version + "-bin";
     var dirName = IO.Path.Combine(binDir, fileName);
     try
     {
         IO.Directory.Delete(dirName, true);
     }
     catch (IO.DirectoryNotFoundException)
     {
     }
     IO.Directory.Move(IO.Path.Combine(binDir, "Debug"), dirName);
     var zipFile = fileName + ".zip";
     IO.File.Delete(zipFile);
     {
         var zipProcess = new SD.ProcessStartInfo(
             "\"c:\\program files\\7-Zip\\7z.exe\"",
             "a " +
             zipFile + " " +
             dirName);
         zipProcess.UseShellExecute = false;
         var process = SD.Process.Start(zipProcess);
         process.WaitForExit();
     }
 }