Beispiel #1
0
        public void Do(BuildScenario conf, int target, BuildLog log)
        {
            var path = conf.InterpolateString(Path, target);

            try
            {
                File.WriteAllText(path, UseInterpolation ? conf.InterpolateString(Content, target) : Content);
                log.Line("create file " + path + " use interpolatio: " + UseInterpolation, "add file action", "info");
            }
            catch { log.Line("dont create file " + path, "add file action", "error"); }
        }
        public void Do(BuildScenario conf, int target, BuildLog log)
        {
            var path   = conf.InterpolateString(PathFrom, target);
            var pathto = conf.InterpolateString(PathTo, target);

            log.Line("start copy files at path from: " + path + " to: " + pathto, "copy files", "info");
            System.Diagnostics.Process          process   = new System.Diagnostics.Process();
            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
            startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
            startInfo.FileName    = "cmd.exe";
            startInfo.Arguments   = "/C xcopy \"" + path + "\" \"" + pathto + "\" /c /i /s /e /t /y";
            process.StartInfo     = startInfo;
            process.Start();
            process.WaitForExit();
            log.Line("deleting success. exit code: " + process.ExitCode, "copy files", "info");
        }
Beispiel #3
0
 public void Do(BuildScenario conf, int target, BuildLog log)
 {
     log.Line("running cmd script: " + conf.InterpolateString(Script, target), "run cmd action", "info");
     System.Diagnostics.Process          process   = new System.Diagnostics.Process();
     System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
     startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
     startInfo.FileName    = "cmd.exe";
     startInfo.Arguments   = "/C " + conf.InterpolateString(Script, target);
     process.StartInfo     = startInfo;
     process.Start();
     if (WaitForExit)
     {
         log.Line("waiting process id: " + process.Id, "run cmd action", "info");
         process.WaitForExit();
         log.Line("process id: " + process.Id + " exit with code: " + process.ExitCode, "run cmd action", "info");
     }
 }
Beispiel #4
0
        public void Do(BuildScenario conf, int target, BuildLog log)
        {
            var path = conf.InterpolateString(Path, target);

            log.Line("start delete files at path: " + path, "delete files", "info");
            System.Diagnostics.Process          process   = new System.Diagnostics.Process();
            System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
            startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
            startInfo.FileName    = "cmd.exe";
            startInfo.Arguments   = "/C del /F /Q " + (Recursively ? "/S " : "") + path;
            process.StartInfo     = startInfo;
            process.Start();
            process.WaitForExit();
            log.Line("deleting success. exit code: " + process.ExitCode, "delete files", "info");
        }
Beispiel #5
0
        public void Do(BuildScenario conf, int target, BuildLog log)
        {
            var targetPath = conf.InterpolateString(Path, target);

            Directory.CreateDirectory(System.IO.Path.GetDirectoryName(targetPath));
            log.Line("building player to " + targetPath + ", target: " + Target.ToString() + ", options: " + Options.ToString(), "Build Action", "info");

            var targetBuildOption = new BuildPlayerOptions
            {
                target           = Target,
                scenes           = Scenes.ToArray(),
                options          = BuildOptions.Development,
                locationPathName = targetPath
            };


            PlayerSettings.SetScriptingDefineSymbolsForGroup(BuildTargetGroup.Standalone, DefinedSymbols);
            var res = BuildPipeline.BuildPlayer(targetBuildOption);

            log.Line("player build successful, errors: " + res, "Build Action", "info");
        }
Beispiel #6
0
        public void Do(BuildScenario conf, int target, BuildLog log)
        {
            var path = conf.InterpolateString(Path, target);

            Directory.CreateDirectory(path);
        }