macOS 旧版本 natives 和 JVM 参数缺失

Open
#3,869 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
csharp, java
Domain
desktop

Research direction

Start at PCL.Core/Platform/PlatformCapabilities.cs around line 32, which the issue links, to see how platform natives are detected, then follow the code that extracts native libraries so .jnilib files are unpacked alongside .dll and .so. The second half is the JVM argument builder: find where arguments.jvm and osx rules are merged and where -XstartOnFirstThread would be injected for versions without arguments.jvm. Both parts need verification on macOS with a pre-1.13 version; done means LWJGL2 natives extract and the game launches without UnsatisfiedLinkError or a main-thread failure.

Written by the indexing model from the issue text.

Description

​.jnilib​ 没有被解压,LWJGL2 的 macOS natives 常见文件名是 liblwjgl.jnilib、libjinput-osx.jnilib。Minecraft 1.12.2 及以下会因此 UnsatisfiedLinkError,Windows .dll 和 Linux .so 正常。

https://github.com/PCL-Community/PCL-CE/blob/fdf5e5530b8b5becc4227f9d588235bfd0f5045a/PCL.Core/Platform/PlatformCapabilities.cs#L32


旧版本没有 ​-XstartOnFirstThread​,现代 Mojang JSON 会在 osx 规则里自带这个参数,但 1.13 以前的版本通常没有 arguments.jvm。macOS 上 LWJGL 和 GLFW 要求主线程,旧版本可能在窗口创建阶段失败。

均需实测。

Dominant language
C#
Stars
4.3k
Forks
148
Avg merge
1d 6h
Merged PRs (30d)
64

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PCL-Community/PCL-CE

All issues in PCL-Community/PCL-CE

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.