public ICompiler SetCompiler(string compiler, string workdir, System.Collections.Generic.Dictionary<string,string> envs )
{
if (string.IsNullOrEmpty(compiler)) throw new ArgumentNullException("compiler");
if (string.IsNullOrEmpty(workdir)) throw new ArgumentNullException("workdir");
environment = envs;
workingdir = workdir;
compilerPath = System.IO.Path.GetFullPath(compiler);
try
{
Connect();
}
catch (CClashServerNotReadyException)
{
var c = new Compiler() { CompilerExe = compiler };
c.SetWorkingDirectory(workdir);
c.SetEnvironment(envs);
return c;
}
return null;
}