diff --git a/Source/Editor/Cooker/Steps/DeployDataStep.cpp b/Source/Editor/Cooker/Steps/DeployDataStep.cpp index 7c888000f..ebb75e28a 100644 --- a/Source/Editor/Cooker/Steps/DeployDataStep.cpp +++ b/Source/Editor/Cooker/Steps/DeployDataStep.cpp @@ -337,6 +337,11 @@ bool DeployDataStep::Perform(CookingData& data) DEPLOY_NATIVE_FILE("libSystem.Net.Security.Native.dylib"); DEPLOY_NATIVE_FILE("libSystem.Security.Cryptography.Native.Apple.dylib"); break; + case BuildPlatform::XboxOne: + case BuildPlatform::XboxScarlett: + DEPLOY_NATIVE_FILE("System.IO.Compression.Native.dll"); + DEPLOY_NATIVE_FILE("System.Globalization.Native.dll"); + break; #undef DEPLOY_NATIVE_FILE default: ; } diff --git a/Source/ThirdParty/nethost/nethost.Build.cs b/Source/ThirdParty/nethost/nethost.Build.cs index e1082bb8c..d561eb68f 100644 --- a/Source/ThirdParty/nethost/nethost.Build.cs +++ b/Source/ThirdParty/nethost/nethost.Build.cs @@ -79,7 +79,6 @@ public class nethost : ThirdPartyModule case TargetPlatform.XboxScarlett: options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "monosgen-2.0.lib")); options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "mono-profiler-aot.lib")); - options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "System.Globalization.Native-Static.lib")); break; case TargetPlatform.Linux: options.OutputFiles.Add(Path.Combine(hostRuntime.Path, "libnethost.a")); diff --git a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs index 44c2940dc..35654e9af 100644 --- a/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs +++ b/Source/Tools/Flax.Build/Deps/Dependencies/nethost.cs @@ -94,7 +94,7 @@ namespace Flax.Deps.Dependencies buildMonoAotCross = true; 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-DDISABLE_EMBEDDED_PDB=1"; defines += targetPlatform == TargetPlatform.XboxScarlett ? "-D_GAMING_XBOX_SCARLETT=1" : "-D_GAMING_XBOX_XBOXONE=1"; - defines += "-DDISABLE_EXECUTABLES=1-DDISABLE_SHARED_LIBS=1"; + defines += "-DDISABLE_EXECUTABLES=1-DDISABLE_SHARED_LIBS=0"; 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"); envVars.Add(targetPlatform == TargetPlatform.XboxScarlett ? "_GAMING_XBOX_SCARLETT" : "_GAMING_XBOX_XBOXONE", "1"); @@ -273,8 +273,8 @@ namespace Flax.Deps.Dependencies }; libs2 = new[] { - "lib/System.Globalization.Native-Static.lib", - "lib/System.IO.Compression.Native-Static.lib", + "System.Globalization.Native.dll", + "System.IO.Compression.Native.dll", }; break; case TargetPlatform.PS5: @@ -347,6 +347,18 @@ namespace Flax.Deps.Dependencies SetupDirectory(dstDotnetLib, true); Utilities.FileCopy(Path.Combine(artifacts, "bin", "mono", $"{os}.{arch}.{configuration}", privateCoreLib), Path.Combine(dstDotnetLib, privateCoreLib)); Utilities.DirectoryCopy(Path.Combine(artifacts, "bin", "runtime", $"{framework}-{os}-{configuration}-{arch}"), dstDotnetLib, false, true, "*.dll"); + + switch (targetPlatform) + { + case TargetPlatform.XboxOne: + case TargetPlatform.XboxScarlett: + // Native shared libs are deployed to ThirdParty binaries folder + Utilities.FileDelete(Path.Combine(dstDotnetLib, "System.Globalization.Native.dll")); + Utilities.FileDelete(Path.Combine(dstDotnetLib, "System.IO.Compression.Native.dll")); + break; + default: + break; + } } } diff --git a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs index 5ce13dd18..5aee67306 100644 --- a/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs +++ b/Source/Tools/Flax.Build/Platforms/Windows/WindowsToolchainBase.cs @@ -446,8 +446,10 @@ namespace Flax.Build.Platforms { string binRootDir = Directory.GetParent(_resourceCompilerPath).FullName; var path = Environment.GetEnvironmentVariable("PATH"); - if (!string.IsNullOrEmpty(_resourceCompilerPath) && !path.Contains(binRootDir)) + if (path != null && !path.Contains(binRootDir)) Environment.SetEnvironmentVariable("PATH", path + ";" + binRootDir); + else if (path == null) + Environment.SetEnvironmentVariable("PATH", binRootDir); } }