/// <summary> /// Run a tool with the given file name and command line. /// </summary> /// <param name="toolFile">The tool's file name.</param> /// <param name="commandLine">The command line.</param> /// <returns>An List<string> of output strings.</returns> public static List <string> RunTool(string toolFile, string commandLine) { // The returnCode variable doesn't get used but it must be created to pass as an argument int returnCode; return(ToolUtility.RunTool(toolFile, commandLine, out returnCode)); }
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); }
public SwcTool Help() { this.Output = ToolUtility.RunTool("swc.exe", "-?"); this.Errors = ToolUtility.GetErrors(this.Output, String.Empty, String.Empty); return(this); }