Ejemplo n.º 1
0
        public SwcTool Compile(IEnumerable <string> sourceFiles, string outputPath)
        {
            StringBuilder cmdline = new StringBuilder();

            cmdline.AppendFormat("-out {0}", outputPath);

            if (!String.IsNullOrEmpty(this.architecture))
            {
                cmdline.AppendFormat(" -arch {0}", this.architecture);
            }

            if (!String.IsNullOrEmpty(this.language))
            {
                cmdline.AppendFormat(" -lang {0}", this.language);
            }

            if (!String.IsNullOrEmpty(this.type))
            {
                cmdline.AppendFormat(" -type {0}", this.type);
            }

            if (!String.IsNullOrEmpty(this.searchPath))
            {
                cmdline.AppendFormat(" -sp {0}", this.searchPath);
            }

            foreach (string sourceFile in sourceFiles)
            {
                cmdline.AppendFormat(" {0}", sourceFile);
            }

            this.CommandLine = cmdline.ToString();
            this.Output      = ToolUtility.RunTool("swc.exe", this.CommandLine);
            this.Errors      = ToolUtility.GetErrors(this.Output, String.Empty, String.Empty);
            return(this);
        }
Ejemplo n.º 2
0
 public SwcTool Help()
 {
     this.Output = ToolUtility.RunTool("swc.exe", "-?");
     this.Errors = ToolUtility.GetErrors(this.Output, String.Empty, String.Empty);
     return(this);
 }