Multi-arch patching support #14
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces multi-arch patching support, so unsupported architectures can have their libraries swapped with fixed versions. Initially implements support only for macOS arm64 (M1), but is easily extensible for more. The PR also brings some changes to the docs and tooling to allow new contributors to get started more easily. The allow/block list approach for lwjgl has also been replaced with a generic algorithm that will find the newest variant with all required native libraries.
The M1 libs come from ManyMC's meta: https://github.com/MinecraftMachina/meta-multimc-arm64/blob/5723d4fd60e4ef7ed6c78f1fef29f01c4ad0ecca/org.lwjgl3/3.3.1.json
Check out the generated meta here: https://github.com/ViRb3/meta-polymc. For some reason, the "auto choose lwjgl variant" commit ends up replacing the suggested lwjgl version for 1.14 pre-release: https://github.com/ViRb3/meta-polymc/commit/b1e9f22837f2e3b7963d36c600d7e04c6719bd0a, but this may be okay. Should investigate. This PR won't work with the launcher yet, since rules with
os
architecture suffix are not supported yet. Something like PolyMC/PolyMC#514 is necessary.The general idea is to replace all necessary libs using rules that have an architecture suffix on the
os
property: