diff --git a/Source/ThirdParty/nethost/nethost.Build.cs b/Source/ThirdParty/nethost/nethost.Build.cs index 9de3a8803..666aff56b 100644 --- a/Source/ThirdParty/nethost/nethost.Build.cs +++ b/Source/ThirdParty/nethost/nethost.Build.cs @@ -73,6 +73,9 @@ public class nethost : ThirdPartyModule case TargetPlatform.PS4: case TargetPlatform.PS5: options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "libmonosgen-2.0.a")); + options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "libSystem.Native.a")); + options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "libSystem.IO.Ports.Native.a")); + options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "libSystem.IO.Compression.Native.a")); break; case TargetPlatform.Android: options.PublicDefinitions.Add("USE_MONO_DYNAMIC_LIB"); diff --git a/Source/Tools/Flax.Build/Configuration.cs b/Source/Tools/Flax.Build/Configuration.cs index af7c05028..8fa17a235 100644 --- a/Source/Tools/Flax.Build/Configuration.cs +++ b/Source/Tools/Flax.Build/Configuration.cs @@ -256,8 +256,6 @@ namespace Flax.Build public static bool WithCSharp(NativeCpp.BuildOptions options) { - if (options.Platform.Target == TargetPlatform.PS5) - return false; // TODO: mono for ps5 return UseCSharp || options.Target.IsEditor; } diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs index 064962c35..e055fce38 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs @@ -230,8 +230,12 @@ namespace Flax.Deps.Dependencies // TODO: shared/Microsoft.NETCore.App//System.IO.Compression.Native.dll if (runtimeFlavor == "Mono") { + // TODO: implement automatic deployment based on the setup: // PS4 outputs mono into artifacts\obj\mono\PS4.x64.Release\out - // PS4 output AOT compiler into artifacts/obj/mono/PS4.x64.Release/cross/out/bin/mono-aot-cross.exe + // PS4 outputs native libs into artifacts\bin\native\net7.0-PS4-Release-x64\lib + // PS4 outputs System.Private.CoreLib lib into artifacts\bin\mono\PS4.x64.Release + // PS4 outputs C# libs into artifacts\bin\mono\PS4.x64.Release\cross\ps4-x64 + // PS4 outputs AOT compiler into artifacts\bin\mono\PS4.x64.Release\cross\ps4-x64 Utilities.DirectoryCopy(Path.Combine(unpackTemp, "runtimes", hostRuntimeName, "native"), Path.Combine(dstDotnet, "native"), true, true); Utilities.FileDelete(Path.Combine(dstDotnet, "native", privateCorelib)); } @@ -275,16 +279,13 @@ namespace Flax.Deps.Dependencies switch (platform) { case TargetPlatform.PS4: - { + case TargetPlatform.PS5: Build(options, platform, TargetArchitecture.x64); break; - } case TargetPlatform.Android: - { Build(options, platform, TargetArchitecture.ARM64); break; } - } } // Copy license