v9.0.11
crazytuzi 8 months ago
parent 26b25ce02f
commit 0a7331fb2b
  1. 272
      Mono.Build.cs
  2. 29
      lib/Debug/Android/Mono_APL.xml
  3. BIN
      lib/Debug/Android/libSystem.Native.so
  4. BIN
      lib/Debug/Android/libmono-component-debugger-static.a
  5. BIN
      lib/Debug/Android/libmono-component-debugger-stub-static.a
  6. BIN
      lib/Debug/Android/libmono-component-diagnostics_tracing-static.a
  7. BIN
      lib/Debug/Android/libmono-component-diagnostics_tracing-stub-static.a
  8. BIN
      lib/Debug/Android/libmono-component-hot_reload-static.a
  9. BIN
      lib/Debug/Android/libmono-component-hot_reload-stub-static.a
  10. BIN
      lib/Debug/Android/libmono-component-marshal-ilgen-static.a
  11. BIN
      lib/Debug/Android/libmono-component-marshal-ilgen-stub-static.a
  12. BIN
      lib/Debug/Android/libmonosgen-2.0.a
  13. BIN
      lib/Debug/Android/libmonosgen-2.0.so
  14. BIN
      lib/Debug/Android/net/Microsoft.CSharp.dll
  15. BIN
      lib/Debug/Android/net/Microsoft.VisualBasic.Core.dll
  16. BIN
      lib/Debug/Android/net/Microsoft.VisualBasic.dll
  17. BIN
      lib/Debug/Android/net/Microsoft.Win32.Primitives.dll
  18. BIN
      lib/Debug/Android/net/Microsoft.Win32.Registry.dll
  19. BIN
      lib/Debug/Android/net/System.AppContext.dll
  20. BIN
      lib/Debug/Android/net/System.Buffers.dll
  21. BIN
      lib/Debug/Android/net/System.Collections.Concurrent.dll
  22. BIN
      lib/Debug/Android/net/System.Collections.Immutable.dll
  23. BIN
      lib/Debug/Android/net/System.Collections.NonGeneric.dll
  24. BIN
      lib/Debug/Android/net/System.Collections.Specialized.dll
  25. BIN
      lib/Debug/Android/net/System.Collections.dll
  26. BIN
      lib/Debug/Android/net/System.ComponentModel.Annotations.dll
  27. BIN
      lib/Debug/Android/net/System.ComponentModel.DataAnnotations.dll
  28. BIN
      lib/Debug/Android/net/System.ComponentModel.EventBasedAsync.dll
  29. BIN
      lib/Debug/Android/net/System.ComponentModel.Primitives.dll
  30. BIN
      lib/Debug/Android/net/System.ComponentModel.TypeConverter.dll
  31. BIN
      lib/Debug/Android/net/System.ComponentModel.dll
  32. BIN
      lib/Debug/Android/net/System.Configuration.dll
  33. BIN
      lib/Debug/Android/net/System.Console.dll
  34. BIN
      lib/Debug/Android/net/System.Core.dll
  35. BIN
      lib/Debug/Android/net/System.Data.Common.dll
  36. BIN
      lib/Debug/Android/net/System.Data.DataSetExtensions.dll
  37. BIN
      lib/Debug/Android/net/System.Data.dll
  38. BIN
      lib/Debug/Android/net/System.Diagnostics.Contracts.dll
  39. BIN
      lib/Debug/Android/net/System.Diagnostics.Debug.dll
  40. BIN
      lib/Debug/Android/net/System.Diagnostics.DiagnosticSource.dll
  41. BIN
      lib/Debug/Android/net/System.Diagnostics.FileVersionInfo.dll
  42. BIN
      lib/Debug/Android/net/System.Diagnostics.Process.dll
  43. BIN
      lib/Debug/Android/net/System.Diagnostics.StackTrace.dll
  44. BIN
      lib/Debug/Android/net/System.Diagnostics.TextWriterTraceListener.dll
  45. BIN
      lib/Debug/Android/net/System.Diagnostics.Tools.dll
  46. BIN
      lib/Debug/Android/net/System.Diagnostics.TraceSource.dll
  47. BIN
      lib/Debug/Android/net/System.Diagnostics.Tracing.dll
  48. BIN
      lib/Debug/Android/net/System.Drawing.Primitives.dll
  49. BIN
      lib/Debug/Android/net/System.Drawing.dll
  50. BIN
      lib/Debug/Android/net/System.Dynamic.Runtime.dll
  51. BIN
      lib/Debug/Android/net/System.Formats.Asn1.dll
  52. BIN
      lib/Debug/Android/net/System.Formats.Tar.dll
  53. BIN
      lib/Debug/Android/net/System.Globalization.Calendars.dll
  54. BIN
      lib/Debug/Android/net/System.Globalization.Extensions.dll
  55. BIN
      lib/Debug/Android/net/System.Globalization.dll
  56. BIN
      lib/Debug/Android/net/System.IO.Compression.Brotli.dll
  57. BIN
      lib/Debug/Android/net/System.IO.Compression.FileSystem.dll
  58. BIN
      lib/Debug/Android/net/System.IO.Compression.ZipFile.dll
  59. BIN
      lib/Debug/Android/net/System.IO.Compression.dll
  60. BIN
      lib/Debug/Android/net/System.IO.FileSystem.AccessControl.dll
  61. BIN
      lib/Debug/Android/net/System.IO.FileSystem.DriveInfo.dll
  62. BIN
      lib/Debug/Android/net/System.IO.FileSystem.Primitives.dll
  63. BIN
      lib/Debug/Android/net/System.IO.FileSystem.Watcher.dll
  64. BIN
      lib/Debug/Android/net/System.IO.FileSystem.dll
  65. BIN
      lib/Debug/Android/net/System.IO.IsolatedStorage.dll
  66. BIN
      lib/Debug/Android/net/System.IO.MemoryMappedFiles.dll
  67. BIN
      lib/Debug/Android/net/System.IO.Pipelines.dll
  68. BIN
      lib/Debug/Android/net/System.IO.Pipes.AccessControl.dll
  69. BIN
      lib/Debug/Android/net/System.IO.Pipes.dll
  70. BIN
      lib/Debug/Android/net/System.IO.UnmanagedMemoryStream.dll
  71. BIN
      lib/Debug/Android/net/System.IO.dll
  72. BIN
      lib/Debug/Android/net/System.Linq.Expressions.dll
  73. BIN
      lib/Debug/Android/net/System.Linq.Parallel.dll
  74. BIN
      lib/Debug/Android/net/System.Linq.Queryable.dll
  75. BIN
      lib/Debug/Android/net/System.Linq.dll
  76. BIN
      lib/Debug/Android/net/System.Memory.dll
  77. BIN
      lib/Debug/Android/net/System.Net.Http.Json.dll
  78. BIN
      lib/Debug/Android/net/System.Net.Http.dll
  79. BIN
      lib/Debug/Android/net/System.Net.HttpListener.dll
  80. BIN
      lib/Debug/Android/net/System.Net.Mail.dll
  81. BIN
      lib/Debug/Android/net/System.Net.NameResolution.dll
  82. BIN
      lib/Debug/Android/net/System.Net.NetworkInformation.dll
  83. BIN
      lib/Debug/Android/net/System.Net.Ping.dll
  84. BIN
      lib/Debug/Android/net/System.Net.Primitives.dll
  85. BIN
      lib/Debug/Android/net/System.Net.Quic.dll
  86. BIN
      lib/Debug/Android/net/System.Net.Requests.dll
  87. BIN
      lib/Debug/Android/net/System.Net.Security.dll
  88. BIN
      lib/Debug/Android/net/System.Net.ServicePoint.dll
  89. BIN
      lib/Debug/Android/net/System.Net.Sockets.dll
  90. BIN
      lib/Debug/Android/net/System.Net.WebClient.dll
  91. BIN
      lib/Debug/Android/net/System.Net.WebHeaderCollection.dll
  92. BIN
      lib/Debug/Android/net/System.Net.WebProxy.dll
  93. BIN
      lib/Debug/Android/net/System.Net.WebSockets.Client.dll
  94. BIN
      lib/Debug/Android/net/System.Net.WebSockets.dll
  95. BIN
      lib/Debug/Android/net/System.Net.dll
  96. BIN
      lib/Debug/Android/net/System.Numerics.Vectors.dll
  97. BIN
      lib/Debug/Android/net/System.Numerics.dll
  98. BIN
      lib/Debug/Android/net/System.ObjectModel.dll
  99. BIN
      lib/Debug/Android/net/System.Private.CoreLib.dll
  100. BIN
      lib/Debug/Android/net/System.Private.DataContractSerialization.dll
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,272 @@
using System.Collections.Generic;
using System.IO;
using UnrealBuildTool;
public class Mono : ModuleRules
{
public Mono(ReadOnlyTargetRules Target) : base(Target)
{
Type = ModuleType.External;
PublicDefinitions.AddRange(new string[]
{
"DOTNET_MAJOR_VERSION=9",
"DOTNET_MINOR_VERSION=0",
"DOTNET_PATCH_VERSION=11"
});
var bIsDebug = Target.Configuration == UnrealTargetConfiguration.Debug ||
Target.Configuration == UnrealTargetConfiguration.DebugGame;
var MonoConfiguration = bIsDebug ? "Debug" : "Release";
PublicDefinitions.Add($"MONO_CONFIGURATION=TEXT(\"{MonoConfiguration}\")");
PublicIncludePaths.Add(Path.Combine(ModuleDirectory, "src"));
var LibraryPath = Path.Combine(ModuleDirectory, "lib", MonoConfiguration);
if (Target.Platform == UnrealTargetPlatform.Win64)
{
var PlatformLibraryPath = Path.Combine(LibraryPath, Target.Platform.ToString());
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"coreclr.import.lib"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"mono-component-debugger-static.lib"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"mono-component-diagnostics_tracing-static.lib"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"mono-component-hot_reload-static.lib"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"mono-component-marshal-ilgen-static.lib"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"mono-profiler-aot.lib"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"monosgen-2.0.lib"));
if (!Target.bBuildEditor && bIsDebug)
{
PublicSystemLibraries.Add("msvcrtd.lib");
}
RuntimeDependencies.Add(
Target.bIsEngineInstalled ? "$(BinaryOutputDir)/coreclr.dll" : "$(TargetOutputDir)/coreclr.dll",
Path.Combine(PlatformLibraryPath, "coreclr.dll"));
var Files = GetFiles(Path.Combine(PlatformLibraryPath, "net"));
foreach (var File in Files)
{
var ModuleLastDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
var DestPath = File.Substring(ModuleLastDirectory.Length + 1,
File.Length - ModuleLastDirectory.Length - 1);
RuntimeDependencies.Add("$(BinaryOutputDir)/" + DestPath, File);
}
}
else if (Target.Platform == UnrealTargetPlatform.Android)
{
var PlatformLibraryPath = Path.Combine(LibraryPath, Target.Platform.ToString());
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmonosgen-2.0.a"));
var Files = GetFiles(Path.Combine(PlatformLibraryPath, "net"));
foreach (var File in Files)
{
var ModuleLastDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
var DestPath = File.Substring(ModuleLastDirectory.Length + 1,
File.Length - ModuleLastDirectory.Length - 1);
RuntimeDependencies.Add("$(BinaryOutputDir)/" + DestPath, File);
}
var APLName = "Mono_APL.xml";
var RelativeAPLPath = Utils.MakePathRelativeTo(Path.Combine(LibraryPath, "Android"),
Target.RelativeEnginePath);
AdditionalPropertiesForReceipt.Add("AndroidPlugin", Path.Combine(RelativeAPLPath, APLName));
}
else if (Target.Platform == UnrealTargetPlatform.Linux || Target.Platform == UnrealTargetPlatform.LinuxArm64)
{
var PlatformLibraryPath = Path.Combine(LibraryPath,
Target.Platform == UnrealTargetPlatform.Linux ? "Linux_x86_64" : "Linux_aarch64");
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmonosgen-2.0.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-debugger-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-diagnostics_tracing-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-hot_reload-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-marshal-ilgen-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libSystem.Globalization.Native.a"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libcoreclr.so",
Path.Combine(PlatformLibraryPath, "libcoreclr.so"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.Native.so",
Path.Combine(PlatformLibraryPath, "libSystem.Native.so"));
var Files = GetFiles(Path.Combine(PlatformLibraryPath, "net"));
foreach (var File in Files)
{
var ModuleLastDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
var DestPath = File.Substring(ModuleLastDirectory.Length + 1,
File.Length - ModuleLastDirectory.Length - 1);
RuntimeDependencies.Add("$(BinaryOutputDir)/" + DestPath, File);
}
}
else if (Target.Platform == UnrealTargetPlatform.Mac)
{
var PlatformLibraryPath = Path.Combine(LibraryPath,
#if UE_5_2_OR_LATER
Target.Architecture.bIsX64
#else
Target.Architecture == "x86_64" || Target.Architecture == "x64"
#endif
? "macOS_x86_64"
: "macOS_arm64");
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmonosgen-2.0.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-debugger-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-diagnostics_tracing-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-hot_reload-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-marshal-ilgen-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libSystem.Globalization.Native.a"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libcoreclr.dylib",
Path.Combine(PlatformLibraryPath, "libcoreclr.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.Native.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.Native.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.IO.Compression.Native.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.IO.Compression.Native.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.Security.Cryptography.Native.Apple.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.Security.Cryptography.Native.Apple.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.Security.Cryptography.Native.OpenSsl.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.Security.Cryptography.Native.OpenSsl.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.Net.Security.Native.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.Net.Security.Native.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.Globalization.Native.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.Globalization.Native.dylib"));
RuntimeDependencies.Add("$(BinaryOutputDir)/libSystem.IO.Ports.Native.dylib",
Path.Combine(PlatformLibraryPath, "libSystem.IO.Ports.Native.dylib"));
var Files = GetFiles(Path.Combine(PlatformLibraryPath, "net"));
foreach (var File in Files)
{
var ModuleLastDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
var DestPath = File.Substring(ModuleLastDirectory.Length + 1,
File.Length - ModuleLastDirectory.Length - 1);
RuntimeDependencies.Add("$(BinaryOutputDir)/" + DestPath, File);
}
}
else if (Target.Platform == UnrealTargetPlatform.IOS)
{
var PlatformLibraryPath = Path.Combine(LibraryPath, Target.Platform.ToString());
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"System.Private.CoreLib.dll.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmonosgen-2.0.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-debugger-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-diagnostics_tracing-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-hot_reload-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libmono-component-marshal-ilgen-static.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libSystem.Globalization.Native.a"));
PublicAdditionalFrameworks.Add(
new Framework(
"Mono",
Path.Combine(PlatformLibraryPath, "Mono.embeddedframework.zip"),
null,
true
)
);
var Files = GetFiles(Path.Combine(PlatformLibraryPath, "net"));
foreach (var File in Files)
{
var ModuleLastDirectory = Path.GetFullPath(Path.Combine(ModuleDirectory, ".."));
var DestPath = File.Substring(ModuleLastDirectory.Length + 1,
File.Length - ModuleLastDirectory.Length - 1);
RuntimeDependencies.Add("$(BinaryOutputDir)/" + DestPath, File);
}
}
}
private static IEnumerable<string> GetFiles(string InDirectory, string InPattern = "*.*")
{
var Files = new List<string>();
foreach (var File in Directory.GetFiles(InDirectory, InPattern))
{
Files.Add(File);
}
foreach (var File in Directory.GetDirectories(InDirectory))
{
Files.AddRange(GetFiles(File, InPattern));
}
return Files;
}
}

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<!--Plugin additions-->
<root xmlns:android="http://schemas.android.com/apk/res/android">
<!-- init section is always evaluated once per architecture -->
<init>
<log text="Mono APL init"/>
</init>
<!-- optional files or directories to copy to Intermediate/Android/APK -->
<resourceCopies>
<log text="libmonosgen-2.0 APL copying files for $S(Architecture)/"/>
<copyFile src="$S(PluginDir)/libmonosgen-2.0.so"
dst="$S(BuildDir)/libs/arm64-v8a/libmonosgen-2.0.so"/>
</resourceCopies>
<resourceCopies>
<log text="libSystem.Native APL copying files for $S(Architecture)/"/>
<copyFile src="$S(PluginDir)/libSystem.Native.so"
dst="$S(BuildDir)/libs/arm64-v8a/libSystem.Native.so"/>
</resourceCopies>
<soLoadLibrary>
<log text="libmonosgen-2.0 APL adding loadLibrary references"/>
<loadLibrary name="libmonosgen-2.0" failmsg="libmonosgen-2.0 not loaded and required!"/>
</soLoadLibrary>
<soLoadLibrary>
<log text="libSystem.Native APL adding loadLibrary references"/>
<loadLibrary name="libSystem.Native" failmsg="libSystem.Native not loaded and required!"/>
</soLoadLibrary>
</root>

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save