Esempio n. 1
0
 static void Build(E.Engine engine, string dir, string name, string version)
 {
     dir = IO.Path.Combine(dir, name);
     Create(dir, name, version);
     if (!engine.BuildProjectFile(IO.Path.Combine(dir, name + ".csproj")))
     {
         throw new S.Exception("build failed");
     }
 }
Esempio n. 2
0
        static void Build(E.Engine engine, string dir, string name, string version, string outDir)
        {
            dir = IO.Path.Combine(dir, name);
            Create(dir, name, version);
            if (!engine.BuildProjectFile(IO.Path.Combine(dir, name + ".csproj")))
            {
                throw new S.Exception("build failed");
            }
            var path  = IO.Path.Combine(dir, "bin\\Debug");
            var files = IO.Directory.GetFiles(path);

            // copy all files.
            foreach (var file in files)
            {
                var outFile = IO.Path.Combine(outDir, IO.Path.GetFileName(file));
                IO.File.Copy(file, outFile, true);
            }
        }
Esempio n. 3
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();
                {
                    // 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();
            }
        }
Esempio n. 4
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();
     }
 }