5 Commits
Author SHA1 Message Date
crazytuzi a148dc95dc Fixed Mono.embeddedframework.zip 2025-12-27 19:32:33 +08:00
crazytuzi 01765a0c26 Fixed Mono.embeddedframework.zip 2025-08-12 23:22:46 +08:00
crazytuzi b585703d67 Fixed EngineInstalled 2024-06-01 15:34:15 +08:00
crazytuzi 9817cfcae4 Fixed macOS Compile Error 2024-05-26 20:38:27 +08:00
crazytuzi 86deb6b260 v7.0.19 2024-05-25 17:27:24 +08:00
1885 changed files with 5613 additions and 0 deletions

No files matched your search

+260
View File
@@ -0,0 +1,260 @@
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=7",
"DOTNET_MINOR_VERSION=0",
"DOTNET_PATCH_VERSION=19"
});
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-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"));
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"));
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,
"libicudata.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libicui18n.a"));
PublicAdditionalLibraries.Add(Path.Combine(PlatformLibraryPath,
"libicuuc.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;
}
}
+29
View File
@@ -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>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loaded 100 of 1885 files, more files were not shown because too many files have changed in this diff. Show more