flathub / com.mojang.Minecraft

https://flathub.org/apps/details/com.mojang.Minecraft
34 stars 13 forks source link

Experimental native Wayland Support #85

Closed vchernin closed 3 years ago

vchernin commented 3 years ago

Adds native Wayland support thanks to the work that's gathered here. Nothing is changed by default, a user specifically has to opt in by adding a JVM flag in the launcher. Should work in 1.13+, including 1.17 (see picture).

This is done so the GLFW patches can be tested. The goal is not to have to ship a patched GLFW, but to help get them upstreamed.

Fixes #84

Minecraft in Native Wayland

To use:

  1. Install with flatpak install --user https://dl.flathub.org/build-repo/50928/com.mojang.Minecraft.flatpakref
    • Or git clone my repo and then flatpak-builder --user --install build-dir com.mojang.Minecraft.json
  2. Within the Minecraft launcher’s "Installations" menu, hover over an installation and click the 3 dots. Click edit, and then open advanced options near the bottom. Append -Dorg.lwjgl.glfw.libname=/home/<user>/.local/share/flatpak/app/com.mojang.Minecraft/current/active/files/lib/libglfw.so to your JVM arguments.
    • Ensure to replace <user> with your username, and to leave a space in between arguments. Fedora Silverblue users should add /var at the beginning. If you install without --user the GLFW directory will be different, so adding the JVM argument will stop Java from launching.
  3. Click play!

Issues:

Patch Info:

The Flatpak uses the patches gathered here (libdecoration branch), which were originally from the following GLFW changes: Patch Original PR/Commit Purpose
0001 PR Add libdecoration support to get CSD on GNOME
0002 PR Fixes freeze caused by race condition
0003 Commit Don't crash on window focus or icons
0004 Commit Fixes broken Mutter (GNOME) OpenGL screenshots

Todo:

vchernin commented 3 years ago

bot, build

flathubbot commented 3 years ago

Queued test build for com.mojang.Minecraft.

flathubbot commented 3 years ago

Started test build 52190

flathubbot commented 3 years ago

Build 52190 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50191/com.mojang.Minecraft.flatpakref
flathubbot commented 3 years ago

Started test build 52197

flathubbot commented 3 years ago

Build 52197 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50196/com.mojang.Minecraft.flatpakref
flathubbot commented 3 years ago

Started test build 52198

flathubbot commented 3 years ago

Build 52198 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50197/com.mojang.Minecraft.flatpakref
flathubbot commented 3 years ago

Started test build 52254

flathubbot commented 3 years ago

Build 52254 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50252/com.mojang.Minecraft.flatpakref
vchernin commented 3 years ago

bot, build

flathubbot commented 3 years ago

Queued test build for com.mojang.Minecraft.

flathubbot commented 3 years ago

Started test build 52968

flathubbot commented 3 years ago

Build 52968 successful To test this build, install it from the testing repository:

flatpak install --user https://dl.flathub.org/build-repo/50928/com.mojang.Minecraft.flatpakref
AsciiWolf commented 3 years ago

Please, rebase this PR against the latest json file from master. Your current one has a lot of changes that are different in the current master. Thanks!

vchernin commented 3 years ago

Latest PR https://github.com/flathub/com.mojang.Minecraft/pull/96

flathubbot commented 3 years ago

Started test build 54018

flathubbot commented 3 years ago

Build 54018 failed