Skip to content

Commit 2eff1de

Browse files
committed
Update Flatpak manifest
Signed-off-by: Dallas Strouse <[email protected]>
1 parent aaf1726 commit 2eff1de

9 files changed

+222
-24
lines changed

Diff for: .gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,6 @@
1919
[submodule "libraries/cmark"]
2020
path = libraries/cmark
2121
url = https://github.com/commonmark/cmark.git
22+
[submodule "flatpak/shared-modules"]
23+
path = flatpak/shared-modules
24+
url = https://github.com/flathub/shared-modules.git

Diff for: flatpak/libdecor.json

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"name": "libdecor",
3+
"buildsystem": "meson",
4+
"config-opts": [
5+
"-Ddemo=false"
6+
],
7+
"sources": [
8+
{
9+
"type": "git",
10+
"url": "https://gitlab.freedesktop.org/libdecor/libdecor.git",
11+
"commit": "73260393a97291c887e1074ab7f318e031be0ac6"
12+
},
13+
{
14+
"type": "patch",
15+
"path": "patches/weird_libdecor.patch"
16+
}
17+
],
18+
"cleanup": [
19+
"/include",
20+
"/lib/pkgconfig"
21+
]
22+
}

Diff for: flatpak/org.prismlauncher.PrismLauncher.yml

+93-22
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,6 @@ sdk: org.kde.Sdk
55
sdk-extensions:
66
- org.freedesktop.Sdk.Extension.openjdk17
77
- org.freedesktop.Sdk.Extension.openjdk8
8-
add-extensions:
9-
com.valvesoftware.Steam.Utility.gamescope:
10-
version: stable
11-
add-ld-path: lib
12-
no-autodownload: true
13-
autodelete: false
14-
directory: utils/gamescope
158

169
command: prismlauncher
1710
finish-args:
@@ -26,21 +19,31 @@ finish-args:
2619
# Mod drag&drop
2720
- --filesystem=xdg-download:ro
2821

22+
cleanup:
23+
- /lib/libGLU*
24+
2925
modules:
26+
# Might be needed by some Controller mods (see https://github.com/isXander/Controlify/issues/31)
27+
- shared-modules/libusb/libusb.json
28+
29+
# Needed for proper Wayland support
30+
- libdecor.json
31+
3032
- name: prismlauncher
3133
buildsystem: cmake-ninja
34+
builddir: true
3235
config-opts:
3336
- -DLauncher_BUILD_PLATFORM=flatpak
34-
- -DCMAKE_BUILD_TYPE=Debug
37+
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
3538
- -DLauncher_QT_VERSION_MAJOR=5
3639
build-options:
3740
env:
3841
JAVA_HOME: /usr/lib/sdk/openjdk17/jvm/openjdk-17
3942
JAVA_COMPILER: /usr/lib/sdk/openjdk17/jvm/openjdk-17/bin/javac
4043
sources:
41-
- type: dir
42-
path: ../
43-
builddir: true
44+
- type: dir
45+
path: ../
46+
4447
- name: openjdk
4548
buildsystem: simple
4649
build-commands:
@@ -49,14 +52,45 @@ modules:
4952
- mv /app/jre /app/jdk/17
5053
- /usr/lib/sdk/openjdk8/install.sh
5154
- mv /app/jre /app/jdk/8
52-
cleanup: [/jre]
55+
cleanup:
56+
- /jre
57+
58+
- name: glfw
59+
buildsystem: cmake-ninja
60+
config-opts:
61+
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
62+
- -DBUILD_SHARED_LIBS:BOOL=ON
63+
- -DGLFW_USE_WAYLAND=ON
64+
sources:
65+
- type: git
66+
url: https://github.com/glfw/glfw.git
67+
commit: 3fa2360720eeba1964df3c0ecf4b5df8648a8e52
68+
- type: patch
69+
path: patches/0003-Don-t-crash-on-calls-to-focus-or-icon.patch
70+
- type: patch
71+
path: patches/0005-Add-warning-about-being-an-unofficial-patch.patch
72+
- type: patch
73+
path: patches/0007-Platform-Prefer-Wayland-over-X11.patch
74+
cleanup:
75+
- /include
76+
- /lib/cmake
77+
- /lib/pkgconfig
78+
5379
- name: xrandr
5480
buildsystem: autotools
5581
sources:
5682
- type: archive
57-
url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.1.tar.xz
58-
sha256: 7bc76daf9d72f8aff885efad04ce06b90488a1a169d118dea8a2b661832e8762
59-
cleanup: [/share/man, /bin/xkeystone]
83+
url: https://xorg.freedesktop.org/archive/individual/app/xrandr-1.5.2.tar.xz
84+
sha256: c8bee4790d9058bacc4b6246456c58021db58a87ddda1a9d0139bf5f18f1f240
85+
x-checker-data:
86+
type: anitya
87+
project-id: 14957
88+
stable-only: true
89+
url-template: https://xorg.freedesktop.org/archive/individual/app/xrandr-$version.tar.xz
90+
cleanup:
91+
- /share/man
92+
- /bin/xkeystone
93+
6094
- name: gamemode
6195
buildsystem: meson
6296
config-opts:
@@ -67,19 +101,56 @@ modules:
67101
# post-install is running inside the build dir, we need it from the source though
68102
- install -Dm755 ../data/gamemoderun -t /app/bin
69103
sources:
70-
- type: git
71-
url: https://github.com/FeralInteractive/gamemode
72-
tag: "1.7"
73-
commit: 4dc99dff76218718763a6b07fc1900fa6d1dafd9
104+
- type: archive
105+
archive-type: tar-gzip
106+
url: https://api.github.com/repos/FeralInteractive/gamemode/tarball/1.7
107+
sha256: 57ce73ba605d1cf12f8d13725006a895182308d93eba0f69f285648449641803
108+
x-checker-data:
109+
type: json
110+
url: https://api.github.com/repos/FeralInteractive/gamemode/releases/latest
111+
version-query: .tag_name
112+
url-query: .tarball_url
113+
timestamp-query: .published_at
114+
cleanup:
115+
- /include
116+
- /lib/pkgconfig
117+
- /lib/libgamemodeauto.a
118+
119+
- name: glxinfo
120+
buildsystem: meson
121+
config-opts:
122+
- --bindir=/app/mesa-demos
123+
- -Degl=disabled
124+
- -Dglut=disabled
125+
- -Dosmesa=disabled
126+
- -Dvulkan=disabled
127+
- -Dwayland=disabled
128+
post-install:
129+
- mv -v /app/mesa-demos/glxinfo /app/bin
130+
sources:
131+
- type: archive
132+
url: https://archive.mesa3d.org/demos/mesa-demos-9.0.0.tar.xz
133+
sha256: 3046a3d26a7b051af7ebdd257a5f23bfeb160cad6ed952329cdff1e9f1ed496b
134+
x-checker-data:
135+
type: anitya
136+
project-id: 16781
137+
stable-only: true
138+
url-template: https://archive.mesa3d.org/demos/mesa-demos-$version.tar.xz
139+
cleanup:
140+
- /include
141+
- /mesa-demos
142+
- /share
143+
modules:
144+
- shared-modules/glu/glu-9.json
145+
74146
- name: enhance
75147
buildsystem: simple
76148
build-commands:
77-
- mkdir -p /app/utils/gamescope
78149
- install -Dm755 prime-run /app/bin/prime-run
79150
- mv /app/bin/prismlauncher /app/bin/prismrun
80151
- install -Dm755 prismlauncher /app/bin/prismlauncher
81152
sources:
82153
- type: file
83-
path: ../flatpak/prime-run
154+
path: prime-run
84155
- type: file
85-
path: ../flatpak/prismlauncher
156+
path: prismlauncher
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
diff --git a/src/wl_window.c b/src/wl_window.c
2+
index 52d3b9eb..4ac4eb5d 100644
3+
--- a/src/wl_window.c
4+
+++ b/src/wl_window.c
5+
@@ -2117,8 +2117,7 @@ void _glfwSetWindowTitleWayland(_GLFWwindow* window, const char* title)
6+
void _glfwSetWindowIconWayland(_GLFWwindow* window,
7+
int count, const GLFWimage* images)
8+
{
9+
- _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
10+
- "Wayland: The platform does not support setting the window icon");
11+
+ fprintf(stderr, "!!! Ignoring Error: Wayland: The platform does not support setting the window icon\n");
12+
}
13+
14+
void _glfwGetWindowPosWayland(_GLFWwindow* window, int* xpos, int* ypos)
15+
@@ -2361,8 +2360,7 @@ void _glfwRequestWindowAttentionWayland(_GLFWwindow* window)
16+
17+
void _glfwFocusWindowWayland(_GLFWwindow* window)
18+
{
19+
- _glfwInputError(GLFW_FEATURE_UNAVAILABLE,
20+
- "Wayland: The platform does not support setting the input focus");
21+
+ fprintf(stderr, "!!! Ignoring Error: Wayland: The platform does not support setting the input focus\n");
22+
}
23+
24+
void _glfwSetWindowMonitorWayland(_GLFWwindow* window,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
diff --git a/src/init.c b/src/init.c
2+
index 06dbb3f2..a7c6da86 100644
3+
--- a/src/init.c
4+
+++ b/src/init.c
5+
@@ -449,6 +449,12 @@ GLFWAPI int glfwInit(void)
6+
_glfw.initialized = GLFW_TRUE;
7+
8+
glfwDefaultWindowHints();
9+
+
10+
+ fprintf(stderr, "!!! Patched GLFW from https://github.com/Admicos/minecraft-wayland\n"
11+
+ "!!! If any issues with the window, or some issues with rendering, occur, "
12+
+ "first try with the built-in GLFW, and if that solves the issue, report there first.\n"
13+
+ "!!! Use outside Minecraft is untested, and things might break.\n");
14+
+
15+
return GLFW_TRUE;
16+
}
17+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
diff --git a/src/platform.c b/src/platform.c
2+
index c5966ae7..3e7442f9 100644
3+
--- a/src/platform.c
4+
+++ b/src/platform.c
5+
@@ -49,12 +49,12 @@ static const struct
6+
#if defined(_GLFW_COCOA)
7+
{ GLFW_PLATFORM_COCOA, _glfwConnectCocoa },
8+
#endif
9+
-#if defined(_GLFW_X11)
10+
- { GLFW_PLATFORM_X11, _glfwConnectX11 },
11+
-#endif
12+
#if defined(_GLFW_WAYLAND)
13+
{ GLFW_PLATFORM_WAYLAND, _glfwConnectWayland },
14+
#endif
15+
+#if defined(_GLFW_X11)
16+
+ { GLFW_PLATFORM_X11, _glfwConnectX11 },
17+
+#endif
18+
};
19+
20+
GLFWbool _glfwSelectPlatform(int desiredID, _GLFWplatform* platform)

Diff for: flatpak/patches/weird_libdecor.patch

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
diff --git a/src/libdecor.c b/src/libdecor.c
2+
index a9c1106..1aa38b3 100644
3+
--- a/src/libdecor.c
4+
+++ b/src/libdecor.c
5+
@@ -1391,22 +1391,32 @@ calculate_priority(const struct libdecor_plugin_description *plugin_description)
6+
static bool
7+
check_symbol_conflicts(const struct libdecor_plugin_description *plugin_description)
8+
{
9+
+ bool ret = true;
10+
char * const *symbol;
11+
+ void* main_prog = dlopen(NULL, RTLD_LAZY);
12+
+ if (!main_prog) {
13+
+ fprintf(stderr, "Plugin \"%s\" couldn't check conflicting symbols: \"%s\".\n",
14+
+ plugin_description->description, dlerror());
15+
+ return false;
16+
+ }
17+
+
18+
19+
symbol = plugin_description->conflicting_symbols;
20+
while (*symbol) {
21+
dlerror();
22+
- dlsym (RTLD_DEFAULT, *symbol);
23+
+ dlsym (main_prog, *symbol);
24+
if (!dlerror()) {
25+
fprintf(stderr, "Plugin \"%s\" uses conflicting symbol \"%s\".\n",
26+
plugin_description->description, *symbol);
27+
- return false;
28+
+ ret = false;
29+
+ break;
30+
}
31+
32+
symbol++;
33+
}
34+
35+
- return true;
36+
+ dlclose(main_prog);
37+
+ return ret;
38+
}
39+
40+
static struct plugin_loader *

Diff for: flatpak/prismlauncher

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ for i in {0..9}; do
55
test -S "$XDG_RUNTIME_DIR"/discord-ipc-"$i" || ln -sf {app/com.discordapp.Discord,"$XDG_RUNTIME_DIR"}/discord-ipc-"$i";
66
done
77

8-
export PATH="${PATH}${PATH:+:}/app/utils/gamescope/bin:/usr/lib/extensions/vulkan/MangoHud/bin"
9-
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH}${LD_LIBRARY_PATH:+:}/usr/lib/extensions/vulkan/MangoHud/\$LIB/"
8+
export PATH="${PATH}${PATH:+:}/usr/lib/extensions/vulkan/gamescope/bin:/usr/lib/extensions/vulkan/MangoHud/bin"
9+
export VK_LAYER_PATH="/usr/lib/extensions/vulkan/share/vulkan/implicit_layer.d/"
1010

1111
exec /app/bin/prismrun "$@"

Diff for: flatpak/shared-modules

Submodule shared-modules added at 45094ca

0 commit comments

Comments
 (0)