2015-11-17 12:10:19 -08:00
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.DotNet.Cli.Utils;
|
|
|
|
|
|
|
|
|
|
namespace Microsoft.DotNet.Tools.Compiler.Native
|
|
|
|
|
{
|
|
|
|
|
class WindowsCommon
|
|
|
|
|
{
|
|
|
|
|
internal static int SetVCVars()
|
|
|
|
|
{
|
|
|
|
|
// TODO: This is not working because it sets the environment variables in a child process
|
|
|
|
|
// For now get around this by using x86_amd64 cross tools
|
|
|
|
|
|
2015-11-17 13:02:05 -08:00
|
|
|
|
// var commonToolsPath = Environment.GetEnvironmentVariable("VS140COMNTOOLS");
|
2015-11-17 12:10:19 -08:00
|
|
|
|
|
2015-11-17 13:02:05 -08:00
|
|
|
|
// var scriptPath = Path.Combine(commonToolsPath, "..\\..\\VC\\vcvarsall.bat");
|
|
|
|
|
// var scriptArgs = "x86_amd64";
|
2015-11-17 12:10:19 -08:00
|
|
|
|
|
2015-11-17 13:02:05 -08:00
|
|
|
|
// var result = Command.Create(scriptPath, scriptArgs)
|
|
|
|
|
// .ForwardStdErr()
|
|
|
|
|
// .ForwardStdOut()
|
|
|
|
|
// .Execute();
|
2015-11-17 12:10:19 -08:00
|
|
|
|
|
2015-11-17 13:02:05 -08:00
|
|
|
|
// return result.ExitCode;
|
|
|
|
|
return 0;
|
2015-11-17 12:10:19 -08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|