Merge remote-tracking branch 'origin/master' into 1.12
# Conflicts: # Source/Editor/GUI/Dialogs/ColorPickerDialog.cs # Source/Editor/GUI/Dialogs/ColorSelector.cs
This commit is contained in:
@@ -4,7 +4,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Xml;
|
||||
using Flax.Build.Graph;
|
||||
@@ -26,6 +25,11 @@ namespace Flax.Build.Platforms
|
||||
/// </summary>
|
||||
protected readonly string _vcToolPath;
|
||||
|
||||
/// <summary>
|
||||
/// The VC tools version.
|
||||
/// </summary>
|
||||
protected readonly string _vcToolVersion;
|
||||
|
||||
/// <summary>
|
||||
/// The compiler path.
|
||||
/// </summary>
|
||||
@@ -147,6 +151,21 @@ namespace Flax.Build.Platforms
|
||||
_libToolPath = Path.Combine(_vcToolPath, "lib.exe");
|
||||
_xdcmakePath = Path.Combine(_vcToolPath, "xdcmake.exe");
|
||||
|
||||
// Find 'MSVC\XX.YY.ZZ\bin' to get version
|
||||
_vcToolVersion = string.Empty;
|
||||
var pathParts = _vcToolPath.Split('\\');
|
||||
if (pathParts.Length >= 3)
|
||||
{
|
||||
for (int i = 3; i < pathParts.Length; i++)
|
||||
{
|
||||
if (pathParts[i] == "bin" && pathParts[i - 2] == "MSVC")
|
||||
{
|
||||
_vcToolVersion = pathParts[i - 1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Add Visual C++ toolset include and library paths
|
||||
var vcToolChainDir = toolsets[Toolset];
|
||||
SystemIncludePaths.Add(Path.Combine(vcToolChainDir, "include"));
|
||||
@@ -370,7 +389,7 @@ namespace Flax.Build.Platforms
|
||||
public override void LogInfo()
|
||||
{
|
||||
var sdkPath = WindowsPlatformBase.GetSDKs()[SDK];
|
||||
Log.Info(string.Format("Using Windows Toolset {0} ({1})", Toolset, sdkPath));
|
||||
Log.Info(string.Format("Using Windows Toolset {0}, {2} ({1})", Toolset, sdkPath, _vcToolVersion));
|
||||
Log.Info(string.Format("Using Windows SDK {0} ({1})", WindowsPlatformBase.GetSDKVersion(SDK), _vcToolPath));
|
||||
}
|
||||
|
||||
@@ -673,8 +692,9 @@ namespace Flax.Build.Platforms
|
||||
var pchSourceFile = Path.Combine(options.IntermediateFolder, Path.ChangeExtension(pchFilName, "cpp"));
|
||||
var contents = Bindings.BindingsGenerator.GetStringBuilder();
|
||||
contents.AppendLine("// This code was auto-generated. Do not modify it.");
|
||||
// TODO: write compiler version to properly rebuild pch on Visual Studio updates
|
||||
contents.Append("// Compiler: ").AppendLine(_compilerPath);
|
||||
contents.Append("// Toolchain: ").AppendLine(_vcToolVersion);
|
||||
contents.Append("// CppVersion: ").AppendLine(compileEnvironment.CppVersion.ToString());
|
||||
contents.Append("#include \"").Append(pchSource).AppendLine("\"");
|
||||
Utilities.WriteFileIfChanged(pchSourceFile, contents.ToString());
|
||||
Bindings.BindingsGenerator.PutStringBuilder(contents);
|
||||
|
||||
Reference in New Issue
Block a user