diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-18 22:51:14 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-05-18 22:51:15 +0200 |
commit | f66e0fa0e8cdd39ca9561f72759377db468f94b7 (patch) | |
tree | 0faeebb056d05f6891453586942b4b62ac6f8d7c | |
parent | b2878dca1d129dbd76c60881df22c2e65c7ae26c (diff) | |
download | PrismLauncher-f66e0fa0e8cdd39ca9561f72759377db468f94b7.tar.gz PrismLauncher-f66e0fa0e8cdd39ca9561f72759377db468f94b7.tar.bz2 PrismLauncher-f66e0fa0e8cdd39ca9561f72759377db468f94b7.zip |
fix: support split natives
Mojang introduced a new structure for natives, notably for LWJGL.
Now instead of using the `natives` structure of the version format, Mojang
chose to create a seperate library entry for each platform, which uses
the `rules` structure to specify the platform. These new split natives
carry the same groupId and artifactId, as the main library, but have an
additional classifier, like `natives-linux`.
When comparing GradleSpecifiers we don't look at the classifier, so when
the launcher sees an artifact called `org.lwjgl:lwjgl:3.3.1` and right
after that an artifact called `org.lwjgl:lwjgl:3.3.1:natives-linux`, it
will treat it as "already added" and forget it.
This change will include the classifier in that comparison.
-rw-r--r-- | launcher/minecraft/GradleSpecifier.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/launcher/minecraft/GradleSpecifier.h b/launcher/minecraft/GradleSpecifier.h index 60e0a726..d9bb0207 100644 --- a/launcher/minecraft/GradleSpecifier.h +++ b/launcher/minecraft/GradleSpecifier.h @@ -124,7 +124,7 @@ struct GradleSpecifier } bool matchName(const GradleSpecifier & other) const { - return other.artifactId() == artifactId() && other.groupId() == groupId(); + return other.artifactId() == artifactId() && other.groupId() == groupId() && other.classifier() == classifier(); } bool operator==(const GradleSpecifier & other) const { |