ports/games/prismlauncher/files/patch-launcher_minecraft_MinecraftInstance.cpp
Alexander Vereeken cfd09d6e9d games/prismlauncher: New port: Minecraft launcher with ability to manage multiple instances
A custom launcher for Minecraft that allows you to easily manage
multiple installations of Minecraft at once. (Fork of MultiMC)

https://prismlauncher.org

Differential Revision:	https://reviews.freebsd.org/D44661
2024-09-09 21:00:06 +03:00

20 lines
737 B
C++

# Patch taken from er2off: https://github.com/er2off/freebsd-ports
--- launcher/minecraft/MinecraftInstance.cpp.orig 2023-11-27 12:44:40 UTC
+++ launcher/minecraft/MinecraftInstance.cpp
@@ -305,7 +305,16 @@ QString MinecraftInstance::getNativePath() const
QString MinecraftInstance::getNativePath() const
{
+#ifdef Q_OS_FREEBSD
+ Version instance_ver{ getPackProfile()->getComponentVersion("net.minecraft") };
+ QDir natives_dir;
+ if (instance_ver < Version("1.13.0"))
+ natives_dir = QDir("/usr/local/lib/lwjgl/");
+ else
+ natives_dir = QDir("/usr/local/lib/lwjgl3/");
+#else
QDir natives_dir(FS::PathCombine(instanceRoot(), "natives/"));
+#endif
return natives_dir.absolutePath();
}