feat(termux): launch 侧同样改写 arm64 natives;真机跑通 MC 1.20.4
- Library::linux_arm64_native_name 收敛改写规则,install 与 launch 共用 - presenter/CLI 的 classpath 组装:1.19+ 的独立 natives 条目按 arm64 坐标 找文件并进 classpath;≤1.18 的 natives 表条目仍归 natives::collect - 真机验证:ull install 1.20.4(740MB)→ glibc Temurin 21 + arm64 natives + softpipe GL,MC 主菜单在 termux-x11 中渲染(窗口 854x480) - 已知非致命:narrator flite 缺失、LWJGL JNI 版本告警、oshi cpuVendor NPE
This commit is contained in:
1 parent
0e7ae44923
commit
23c2abebc2
4 files changed
+62
-11
No files matched your search
@@ -159,10 +159,8 @@ struct Arm64Native {
|
||||
|
||||
/// Linux arm64:把 `org.lwjgl:<module>:<version>:natives-linux` 改写成 arm64。
|
||||
fn linux_arm64_native_entry(library: &Library, env: &Environment) -> Option<Arm64Native> {
|
||||
if env.os != "linux" || env.arch != "arm64" || !library.name.starts_with("org.lwjgl:") {
|
||||
return None;
|
||||
}
|
||||
let base = library.name.strip_suffix(":natives-linux")?;
|
||||
let name = library.linux_arm64_native_name(env)?;
|
||||
let base = name.strip_suffix(":natives-linux-arm64")?;
|
||||
let mut parts = base.split(':');
|
||||
let group = parts.next()?;
|
||||
let artifact = parts.next()?;
|
||||
@@ -179,7 +177,7 @@ fn linux_arm64_native_entry(library: &Library, env: &Environment) -> Option<Arm6
|
||||
relative.to_string_lossy().replace('\\', "/")
|
||||
);
|
||||
Some(Arm64Native {
|
||||
name: format!("{base}:natives-linux-arm64"),
|
||||
name,
|
||||
relative,
|
||||
url,
|
||||
})
|
||||
|
||||
@@ -200,6 +200,19 @@ impl Library {
|
||||
self.name.starts_with("org.lwjgl:")
|
||||
}
|
||||
|
||||
/// 现代清单(1.19+)把 natives 作为独立库条目:Linux arm64 上把
|
||||
/// `org.lwjgl:<module>:<ver>:natives-linux` 改写成 `...:natives-linux-arm64`。
|
||||
///
|
||||
/// 返回 None 表示不适用(非 Linux/arm64、非 LWJGL3、或不是 natives 条目)。
|
||||
#[must_use]
|
||||
pub fn linux_arm64_native_name(&self, env: &Environment) -> Option<String> {
|
||||
if env.os != "linux" || env.arch != "arm64" || !self.is_lwjgl3() {
|
||||
return None;
|
||||
}
|
||||
let base = self.name.strip_suffix(":natives-linux")?;
|
||||
Some(format!("{base}:natives-linux-arm64"))
|
||||
}
|
||||
|
||||
/// natives 构件下载信息(按分类器查 `downloads.classifiers`)。
|
||||
pub fn native_artifact(&self, classifier: &str) -> Option<&DownloadInfo> {
|
||||
self.downloads.as_ref()?.classifiers.get(classifier)
|
||||
|
||||
Reference in new issue
Block a user