Merge remote-tracking branch 'origin/master' into sdl_platform
This commit is contained in:
@@ -2043,6 +2043,7 @@ namespace Flax.Build.Bindings
|
||||
contents.Append(')').AppendLine();
|
||||
contents.Append(" {").AppendLine();
|
||||
contents.Append(" static MMethod* method = nullptr;").AppendLine();
|
||||
contents.AppendFormat(" if (!MCore::Ready) {{ MCore::OnManagedEventAfterShutdown(\"{0}.{1}\"); return; }}", classTypeNameManaged, eventInfo.Name).AppendLine();
|
||||
contents.AppendFormat(" if (!method) {{ method = {1}::TypeInitializer.GetClass()->GetMethod(\"Internal_{0}_Invoke\", {2}); CHECK(method); }}", eventInfo.Name, classTypeNameNative, paramsCount).AppendLine();
|
||||
contents.Append(" MObject* exception = nullptr;").AppendLine();
|
||||
if (paramsCount == 0)
|
||||
|
||||
@@ -217,9 +217,17 @@ namespace Flax.Build
|
||||
using RegistryKey sdkVersionsKey = baseKey.OpenSubKey($@"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\{arch}\sdk");
|
||||
using RegistryKey runtimeKey = baseKey.OpenSubKey(@$"SOFTWARE\WOW6432Node\dotnet\Setup\InstalledVersions\{arch}\sharedfx\Microsoft.NETCore.App");
|
||||
using RegistryKey hostKey = baseKey.OpenSubKey(@$"SOFTWARE\dotnet\Setup\InstalledVersions\{arch}\sharedhost");
|
||||
dotnetPath = (string)hostKey.GetValue("Path");
|
||||
dotnetPath = (string)hostKey?.GetValue("Path");
|
||||
dotnetSdkVersions = sdkVersionsKey?.GetValueNames() ?? Enumerable.Empty<string>();
|
||||
dotnetRuntimeVersions = runtimeKey?.GetValueNames() ?? Enumerable.Empty<string>();
|
||||
|
||||
if (string.IsNullOrEmpty(dotnetPath))
|
||||
{
|
||||
// The sharedhost registry key seems to be deprecated, assume the default installation location instead
|
||||
var defaultPath = Path.Combine(Path.GetPathRoot(Environment.SystemDirectory), "Program Files", "dotnet");
|
||||
if (File.Exists(Path.Combine(defaultPath, "dotnet.exe")))
|
||||
dotnetPath = defaultPath;
|
||||
}
|
||||
}
|
||||
#pragma warning restore CA1416
|
||||
break;
|
||||
|
||||
@@ -89,7 +89,11 @@ namespace Flax.Deps.Dependencies
|
||||
os = "windows";
|
||||
runtimeFlavor = "Mono";
|
||||
buildMonoAotCross = true;
|
||||
buildArgs = $" -subset mono+libs -cmakeargs \"-DDISABLE_JIT=1-DENABLE_PERFTRACING=0-DDISABLE_REFLECTION_EMIT=1-DDISABLE_EVENTPIPE=1-DDISABLE_COM=1-DDISABLE_PROFILER=1-DDISABLE_COMPONENTS=1\" /p:FeaturePerfTracing=false /p:FeatureManagedEtw=false /p:FeatureManagedEtwChannels=false /p:FeatureEtw=false /p:ApiCompatValidateAssemblies=false";
|
||||
var defines = "-D_GAMING_XBOX=1-DDISABLE_JIT=1-DENABLE_PERFTRACING=0-DDISABLE_REFLECTION_EMIT=1-DDISABLE_EVENTPIPE=1-DDISABLE_COM=1-DDISABLE_PROFILER=1-DDISABLE_COMPONENTS=1";
|
||||
defines += targetPlatform == TargetPlatform.XboxScarlett ? "-D_GAMING_XBOX_SCARLETT=1" : "-D_GAMING_XBOX_XBOXONE=1";
|
||||
defines += "-DDISABLE_EXECUTABLES=1-DDISABLE_SHARED_LIBS=1";
|
||||
buildArgs = $" -subset mono+libs -cmakeargs \"{defines}\" /p:FeaturePerfTracing=false /p:FeatureWin32Registry=false /p:FeatureCominteropApartmentSupport=false /p:FeatureManagedEtw=false /p:FeatureManagedEtwChannels=false /p:FeatureEtw=false /p:ApiCompatValidateAssemblies=false";
|
||||
envVars.Add("_GAMING_XBOX", "1");
|
||||
break;
|
||||
case TargetPlatform.Linux:
|
||||
os = "linux";
|
||||
@@ -237,15 +241,28 @@ namespace Flax.Deps.Dependencies
|
||||
switch (targetPlatform)
|
||||
{
|
||||
case TargetPlatform.Windows:
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
libs1 = new[]
|
||||
{
|
||||
"lib/coreclr.dll",
|
||||
"lib/coreclr.import.lib",
|
||||
};
|
||||
libs2 = new string[]
|
||||
libs2 = new[]
|
||||
{
|
||||
"System.Globalization.Native.dll",
|
||||
"System.IO.Compression.Native.dll",
|
||||
};
|
||||
break;
|
||||
case TargetPlatform.XboxOne:
|
||||
case TargetPlatform.XboxScarlett:
|
||||
libs1 = new[]
|
||||
{
|
||||
"lib/monosgen-2.0.lib",
|
||||
"lib/mono-profiler-aot.lib",
|
||||
};
|
||||
libs2 = new[]
|
||||
{
|
||||
"lib/System.Globalization.Native-Static.lib",
|
||||
"lib/System.IO.Compression.Native-Static.lib",
|
||||
};
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -13,6 +13,11 @@ namespace Flax.Build.Platforms
|
||||
/// <seealso cref="Flax.Build.Platforms.WindowsToolchainBase" />
|
||||
public abstract class GDKToolchain : WindowsToolchainBase
|
||||
{
|
||||
/// <summary>
|
||||
/// Enables OpenMP library as dynamic dependency.
|
||||
/// </summary>
|
||||
protected bool OpenMP = false;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the version of Xbox Services toolset.
|
||||
/// </summary>
|
||||
@@ -74,6 +79,12 @@ namespace Flax.Build.Platforms
|
||||
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vccorlib140.dll"));
|
||||
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vcruntime140.dll"));
|
||||
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vcruntime140_1.dll"));
|
||||
if (OpenMP)
|
||||
{
|
||||
redistToolsPath = Path.Combine(paths[0], "x64", "Microsoft.VC" + (int)crtToolset + ".OpenMP");
|
||||
redistToolsPath = Utilities.RemovePathRelativeParts(redistToolsPath);
|
||||
options.DependencyFiles.Add(Path.Combine(redistToolsPath, "vcomp140.dll"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user