示例#1
0
        private void LocaliseLinkerPath()
        {
            var compilerPath = "";

            if (ExecPath.Contains("link.exe") || ExecPath.Contains("lib.exe"))
            {
                var compilerPathComponents = ExecPath.Replace('\\', '/').Split('/');
                var startIndex             = Array.FindIndex(compilerPathComponents, row => row == "VC");
                if (startIndex > 0)
                {
                    Type         = CompilerTypes.Msvc;
                    compilerPath = "$VSBasePath$";
                    for (var i = startIndex + 1; i < compilerPathComponents.Length; ++i)
                    {
                        compilerPath += "/" + compilerPathComponents[i];
                    }
                }
                ExecPath = compilerPath;
            }
            else if (ExecPath.Contains("orbis-snarl.exe"))
            {
                Type = CompilerTypes.OrbisSnarl;
            }
            else if (ExecPath.Contains("orbis-clang.exe"))
            {
                Type = CompilerTypes.OrbisClang;
            }
        }
示例#2
0
        private void LocaliseCompilerPath()
        {
            var compilerPath = "";

            if (ExecPath.Contains("cl.exe"))
            {
                var compilerPathComponents = ExecPath.Replace('\\', '/').Split('/');
                var startIndex             = Array.FindIndex(compilerPathComponents, row => row == "VC");
                if (startIndex > 0)
                {
                    Type         = CompilerTypes.Msvc;
                    compilerPath = "$VSBasePath$";
                    for (int i = startIndex + 1; i < compilerPathComponents.Length; ++i)
                    {
                        compilerPath += "/" + compilerPathComponents[i];
                    }
                }
                ExecPath = compilerPath;
            }
            else if (ExecPath.Contains("rc.exe"))
            {
                Type = CompilerTypes.Rc;
                var compilerPathComponents = ExecPath.Replace('\\', '/').Split('/');
                compilerPath = "$WindowsSDKBasePath$";
                var startIndex = Array.FindIndex(compilerPathComponents, row => row == "8.1");
                if (startIndex > 0)
                {
                    for (var i = startIndex + 1; i < compilerPathComponents.Length; ++i)
                    {
                        compilerPath += "/" + compilerPathComponents[i];
                    }
                }
                ExecPath = compilerPath;
            }
            else if (ExecPath.Contains("orbis-clang.exe"))
            {
                Type = CompilerTypes.OrbisClang;
            }
        }