修复了macos arm64版本可能导致的lwjgl natives匹配错误#5990
Conversation
|
/gemini reivew |
There was a problem hiding this comment.
Code Review
This pull request enhances the native library patching mechanism to support ARM64 architectures on macOS and Windows, particularly for legacy LWJGL versions. It introduces a hasLegacyLwjglNatives check and a fallback replacement strategy using library classifiers. Additionally, several LWJGL 3.3.1 native mappings for macOS ARM64 were added to the configuration. Feedback was provided regarding redundant logging in the library replacement logic that could lead to duplicate output.
|
把 LWJGL 直接提升到这么高的版本真的能保持兼容性吗? |
cleaned repeated log when native patcher is triggered
本次修改并没有对当前版本的native patcher触发做过大修改,因为在arm64环境下,遇到没有系统架构标识的legacy classifier, 原逻辑会默认当做x86处理,所以这次修改仅为arm64环境下新增了legacy classifier的检测,且只对macos arm64做了特别处理。在classifier不是legacy的情况下, 1.19+版本仍会按照原逻辑执行。 |
问题描述:
在macos arm64版本下,导入整合包时,某些Forge/MultiMC导出的manifests会使用LWJGL natives的已经legacy的classifier,如natives-macos。而由于HMCL会将1.19+版本的arm64自动跳过patch, 所以该classifier会继续保持,从而导致下载的LWJGL与系统版本不匹配并路径错误导致找不到。
修复方式
对于legacy的classifier做了检测,已经legacy的classifier会做patch