8.2版本上传

This commit is contained in:
2025-06-12 18:00:06 +08:00
parent a10df85379
commit 6a881f2e8a
263 changed files with 9063 additions and 1338 deletions

View File

@@ -116,8 +116,8 @@ namespace MonoHook
static void SetupFlushICacheFunc()
{
string processorType = SystemInfo.processorType;
if (processorType.Contains("Intel") || processorType.Contains("AMD"))
string processorType = SystemInfo.processorType.ToLowerInvariant();
if (processorType.Contains("intel") || processorType.Contains("amd"))
return;
if (IntPtr.Size == 4)

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 9c0482f5e3f6dbf4a82a4c1dc7988d5e
guid: e84139b42a6164e4c93ce4df1be6dcfb
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -16,7 +16,11 @@ namespace MonoHook
static HookUtils()
{
jit_write_protect_supported = pthread_jit_write_protect_supported_np() != 0;
try
{
jit_write_protect_supported = pthread_jit_write_protect_supported_np() != 0;
}
catch { }
PropertyInfo p_SystemPageSize = typeof(Environment).GetProperty("SystemPageSize");
if (p_SystemPageSize == null)
@@ -35,6 +39,16 @@ namespace MonoHook
public static void MemCpy_Jit(void* pDst, byte[] src)
{
if (!jit_write_protect_supported)
{
fixed(void * pSrc = &src[0])
{
MemCpy(pDst, pSrc, src.Length);
}
return;
}
fixed(void * p = &src[0])
{
memcpy_jit(new IntPtr(pDst), new IntPtr(p), src.Length);

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 8ab765aec3653f0449c2ba805a5966a6
guid: efda6e010e5c6594081c4a62861d469f
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 7cf7966d2f4139f42a5504fb12299dc4
guid: d796fc01daee1964586621890988a5ae
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -12,7 +12,7 @@ using System.IO;
namespace HybridCLR.MonoHook
{
#if UNITY_2021_1_OR_NEWER
#if UNITY_2021_1_OR_NEWER && !UNITY_2023_1_OR_NEWER
[InitializeOnLoad]
public class CopyStrippedAOTAssembliesHook
{

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: aeea2b7e7523c9a4aa19be70f832bda2
guid: cf42c4f20b8a1b94baa04a1a5c6b8beb
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -12,7 +12,7 @@ using System.IO;
namespace HybridCLR.MonoHook
{
#if UNITY_2022
#if UNITY_2022 || UNITY_2023_1_OR_NEWER
[InitializeOnLoad]
public class GetIl2CppFolderHook
{

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 541e6130979493447825045c244c133c
guid: 96c2bc28db69e1644892219abef3d4b5
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -12,7 +12,7 @@ using System.IO;
namespace HybridCLR.MonoHook
{
#if UNITY_2021_1_OR_NEWER && UNITY_WEBGL
#if UNITY_2021_1_OR_NEWER && (UNITY_WEBGL || UNITY_WEIXINMINIGAME)
[InitializeOnLoad]
public class PatchScriptingAssembliesJsonHook
{
@@ -35,12 +35,29 @@ namespace HybridCLR.MonoHook
private static string BuildMainWindowTitle()
{
string tempJsonPath = $"{Application.dataPath}/../Library/PlayerDataCache/WebGL/Data/ScriptingAssemblies.json";
if (File.Exists(tempJsonPath))
var cacheDir = $"{Application.dataPath}/../Library/PlayerDataCache";
if (Directory.Exists(cacheDir))
{
var patcher = new PatchScriptingAssemblyList();
patcher.PathScriptingAssembilesFile(Path.GetDirectoryName(tempJsonPath));
foreach (var tempJsonPath in Directory.GetDirectories(cacheDir, "*", SearchOption.TopDirectoryOnly))
{
string dirName = Path.GetFileName(tempJsonPath);
#if UNITY_WEIXINMINIGAME
if (!dirName.Contains("WeixinMiniGame"))
{
continue;
}
#else
if (!dirName.Contains("WebGL"))
{
continue;
}
#endif
var patcher = new PatchScriptingAssemblyList();
patcher.PathScriptingAssembilesFile(tempJsonPath);
}
}
string newTitle = BuildMainWindowTitleProxy();
return newTitle;
}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ea52aac3bd5754841bff8c177a91a160
guid: cc89a9041ab48ac41975fbd1e00b9b98
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d5a77282b371549439907297e5f967d0
guid: 3c561c9729c367e4fbef63f4ec56f268
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 1d457aae59bb6a949b97887543318503
guid: bd0b8071cf434d6498160259e3829980
MonoImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: e0c9859301729b84f88491ed39122043
guid: 16b9dc031f67b4fe5ad79c230f75768c
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 0b61f42ce4a78754f949acd008581b29
guid: 56b28b5583a184c669dcb968d175544c
PluginImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: a88be91a9edddd249b1c076491e8cb11
guid: 69eeb734e262a0a4fbe0887249198f73
DefaultImporter:
externalObjects: {}
userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 76fbfe977abb84741b86eb67907b15e5
guid: 7adba4475cf0bdc4fa7995c0d748f480
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: cb117b25721641c45bf5ec77a09438f5
guid: e092a73910a69894daea44290d7292f6
PluginImporter:
externalObjects: {}
serializedVersion: 2

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 25a82d6fb527b6249b44af1fb31d6cdc
guid: 31f6a810e38e66f4c832b135770a04bb
folderAsset: yes
DefaultImporter:
externalObjects: {}

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: ca79f0e18c71509439472ab7a43208b3
guid: 4adb23596911347faa69537b900c9f5e
PluginImporter:
externalObjects: {}
serializedVersion: 2