This repository uses LWJG from #431.
If you are affected by #8, use this version of the repo instead of the normal one!
Thanks to their work!
with the build versions of er2off used here
You will now be able to run Minecraft 1.20.2+ on FreeBSD.
And Minecraft will be able to recognize multiple cpu cores!(for me, only 1.20.2 now, you maybe want Check the link above)
We will mostly be following the OpenBSD build instructions at https://prismlauncher.org/wiki/development/build-instructions/#openbsd.
- Install Dependencies:
sudo pkg install qt5 qt6 cmake kf5-extra-cmake-modules openjdk8 openjdk17 lwjgl glfw git
- Clone the repo:
git clone --recursive https://github.com/PrismLauncher/PrismLauncher.git
andcd PrismLauncher
- Configure environment:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr/local" -DCMAKE_PREFIX_PATH=/usr/local/lib/qt5/cmake -DENABLE_LTO=ON
- Actually build Prism Launcher:
cd build
andsudo make -j$(nproc) install
For FreeBSD 13.2+ or other version:
Try installing `games/lwjgl3` from ports first, if that doesn't work, follow this:
Before we get started, you might want to check this.
-
Download lwjgl3.tar.gz and extract it somewhere.
-
Go to the folder you extracted,
make install clean
-
If the build succeeds, you should be able to find the built files in the following path:
/usr/local/lib/lwjgl3
/usr/local/share/java/classes/lwjgl3
This should be correct for FreeBSD 13.2, But if not, open
minecraft-runtime
in a text editor, modify it:LWJGL_JLP_OVRD
LWJGL_OVRD
LWJGL_OGL_OVRD
LWJGL_OAL_OVRD
LWJGL_GLFW_OVRD
LWJGL_STB_OVRD
LWJGL_JEM_OVRD
- Go to Settings (either Global or Instance), then go in the Java section.
- Set Java Runtime/Tick and set Java Installation to the location of the minecraft-runtime script from the
make install
step above this one. - Click Test, if you did everything correctly, it should say that the Test succeeded.
Alternative Solution:
Qutoed from #8:@Gamer100Dev's solution worked for me.
Yes, I'm on FreeBSD 14.0 RELEASE
To be clearer, git clone https://github.com/LWGJL/lwjgl3.
-
Download https://github.com/pog5/minecraft-freebsd/blob/main/lwjgl3.tar.gz
-
Extract the tar.gz file
-
Copy the "Makefile" from the extracted tar.gz file into where you cloned lwjgl3; overwriting the original
-
Run this command inside of the lwjgl3 dir that you cloned:
/usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant all && /usr/local/bin/cmake -E env JAVACMD=/usr/local/openjdk17/bin/java JAVA8_HOME=/usr/local/openjdk8 ant release -Dbuild.offline=yes -Djavadoc.skip=yes
-
Run:
# mkdir /usr/local/share/java/classes/lwjgl3 /usr/local/lib/lwjgl3
-
Run:
# find /PATH/TO/GIT/lwjgl3 -name "*.so" -exec cp {} /usr/local/lib/lwjgl3/ \;
-
Run:
find /PATH/TO/GIT/lwjgl3 -name "*.jar" -exec cp {} /usr/local/share/java/classes/lwjgl3/ \;
-
Install minecraft-client & openjdk17-jre:
# pkg install minecraft-client openjdk17-jre
-
Overwrite the original minecraft-runtime file with the one from the extracted tar:
# cp /PATH/TO/EXTRACTED/TAR/lwjgl3/minecraft-runtime /usr/loca/share/minecraft-client/minecraft-runtime
-
In PrismLauncher, go to
Settings
>Java
and set "Java Path" to:/usr/local/share/minecraft-client/minecraft-runtime
You need to add -Dorg.lwjgl.librarypath=/usr/local/lib/lwjgl
as a additional flag (Thanks to @er2off on Discord for this info.)