Merge branch 'macos-flex-build-fixes' of https://github.com/wackoisgod/FlaxEngine into wackoisgod-macos-flex-build-fixes

This commit is contained in:
Wojtek Figat
2023-09-18 11:49:43 +02:00
2 changed files with 12 additions and 0 deletions

View File

@@ -207,6 +207,8 @@ namespace Flax.Build
case TargetPlatform.Mac:
{
#if USE_NETCORE
dotnetPath = Path.Combine(dotnetSdk.RootPath, "dotnet");
cscPath = Path.Combine(dotnetSdk.RootPath, $"sdk/{dotnetSdk.VersionName}/Roslyn/bincore/csc.dll");
referenceAssemblies = Path.Combine(dotnetSdk.RootPath, $"packs/Microsoft.NETCore.App.Ref/{dotnetSdk.RuntimeVersionName}/ref/net{runtimeVersionShort}/");
referenceAnalyzers = Path.Combine(dotnetSdk.RootPath, $"packs/Microsoft.NETCore.App.Ref/{dotnetSdk.RuntimeVersionName}/analyzers/dotnet/cs/");

View File

@@ -212,6 +212,16 @@ namespace Flax.Build
ridFallback = "";
if (string.IsNullOrEmpty(dotnetPath))
dotnetPath = "/usr/local/share/dotnet/";
// So there is not a real great way to do this but if the first thing in this list is x64
// then lets assume we are building for it and thus should using that rid and that dotnet path
if (architecture == TargetArchitecture.ARM64 && (Configuration.BuildArchitectures != null && Configuration.BuildArchitectures[0] == TargetArchitecture.x64))
{
rid = $"osx-x64";
dotnetPath = Path.Combine(dotnetPath, "x64");
architecture = TargetArchitecture.x64;
}
break;
}
default: throw new InvalidPlatformException(platform);