-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
addpkg(x11/luanti{-common,-server}): moved from TUR #22387
base: master
Are you sure you want to change the base?
Conversation
|
|
a64d4b8
to
8f58635
Compare
According to previous build log https://github.com/termux/termux-packages/actions/runs/12031431167/job/33540963447#step:6:1054 those bundled dependencies were gmp, jsoncpp and luajit. |
8f58635
to
a612a8b
Compare
@Biswa96 Thank you for explaining about the dependencies, I did not notice those and I had a hard time getting the other dependencies marked correctly, so it is very helpful and now I have added those dependencies in the On the other hand, I checked the total size of the installation, and it does not seem to me to be way too large, but "too large" is very relative for each person, so it would be interesting to know what others think about it.
I do see now that AUR's I see that how it's done in termux-packages/packages/openjdk-17/openjdk-17-x.subpackage.sh Lines 10 to 11 in 2704499
|
I want the benchmarks, but they are not enabled by default, and neither is the server, I did not realize these things at first, so I will try creating subpackages like this:
and I'll update this with how that goes. I am not sure if the package is suited to splitting in termux-packages, but it makes sense to try it and check what happens. EDIT: it turns out the benchmarks are built into the main binary, so they can't be a subpackage. three packages probably makes the most sense. |
a612a8b
to
a9f058f
Compare
28f1a61
to
f697f13
Compare
# When cross-compiling assume the user doesn't want to run the executable anyway, | ||
# otherwise place it in <source dir>/bin/ since Luanti can only run from there. | ||
-if(NOT CMAKE_CROSSCOMPILING) | ||
+if(NOT THIS_IS_FOR_SURFACEFLINGER_IN_OWOKITTYS_OPINION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one patch line raises several questions.
All of them some variation of "what?"
- What are we actually patching here?
- What compelled you to choose that as the variable name?
- What does this have to do with SurfaceFlinger?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better name for this change would be "DISABLING_THIS_BECAUSE_IT_IS_FOR_BUILDING_AN_APK" , and the idea of "SurfaceFlinger" originates from the fact that .apk
files that launch ANativeWindow activities cannot be executed on devices where the program named /system/bin/surfaceflinger
is not running in the background.
On the other hand, unlike the preexisting build of Minetest that can be found on the F-Droid store, which is a .apk
file, this build targets X11 and therefore it can run connected to the X11 server from the package tigervnc
inside termux-docker which is an environment where /system/bin/surfaceflinger
is not present (as long as in that situation, a package like libopensles-standalone
is also installed).
I will work on renaming this variable now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomJo2000 to explain an answer to your question "What are we actually patching here?" in a way that is hopefully complete, precise and does not leave out any details:
Normally, Luanti does not set the EXECUTABLE_OUTPUT_PATH
variable when cross-compiling is detected, because the person who wrote that section assumed/knew that they do not officially cross-compile for any platforms that require EXECUTABLE_OUTPUT_PATH
.
Later on elsewhere in their CMakeLists.txt
, they have this logic: "if not ANDROID
... then if UNIX
... then create a symlink in the EXECUTABLE_OUTPUT_PATH
". A different patch, 0003-bionic-libc-x11-wsi-opengl-es-2.patch
, replaces the ANDROID
variable there to force this codepath, but the reason this patch is not combined into that patch is because this patch is technically only required for cross-compiling, while building the package in non-cross-compiling mode does not actually require this change in order to work, so it seemed appropriate to organize them in separate patches.
The error that I saved in the comment of the patch, is the error that happens if EXECUTABLE_OUTPUT_PATH
does not exist when that linked point in the CMakeLists.txt
is reached, which normally happens only when cross-compiling Luanti.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So what's still in the main luanti
package if the server and common files are split out as subpackages?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question, I will explain it like this, and if the packages need to be reorganized in a different way, this could be changed:
-
the
luanti
package contains the.desktop
shortcut, the icon, and a program$PREFIX/bin/luanti
that actually has both a client and a server inside it. It can be made to behave as a server by launching it with the commandluanti --server
. The problem is just that this binary depends on a lot of packages for the graphical client as well,libjpeg-turbo
,libxi
and others, so installing it requires installing those packages as runtime dependencies. -
The
luanti-server
package contains only the program$PREFIX/bin/luantiserver
, which when launched, only implements the headless server functionality and does not have the graphical client built inside it. This means it does not depend onlibjpeg-turbo
,libxi
or the other packages that are in the dependency list of theluanti
package, but not theluanti-server
package. This would be the package for use by someone who just wants to open Termux and run the Luanti server to connect to it remotely from Luanti clients on other devices, and doesn't have a desktop environment installed inside Termux. -
The
luanti-common
package contains platform-independent files that are necessary for both the client and the server.
f697f13
to
9286ddc
Compare
Brief suggestions for layer packages to use for the time being, on each of these Android 8+ devices, and the FPS you might expect to get in fullscreen with default settings on them; I listed the best-functioning layer package I have seen so far for Luanti + Termux:X11 on each of these devices, so if someone is trying to play and happens to have the same one as me and is using the newest possible Android ROM available for each of them, they should try the one listed first unless there have been more updates to them since I posted this.
|
0d33a64
to
63d9e3b
Compare
I think its better to put SUBPKG_BREAKS and SUBPKG_REPLACES fields with old version main package in the subpackages to handle split |
@truboxl I thought it might be a good idea as well, but I am not sure how to do it properly, maybe you have an idea of what is wrong here. In my test I tried this in
and also, separately and together, I tried this as well in
However, unfortunately, if I build the packages with those changes, then I try to install them, this happens, which seems to prevent luanti-server depends luanti but it is not installable
Is there a way to do it without the main package becoming a dependency of the subpackages? |
Use TERMUX_SUBPKG_DEPEND_ON_PARENT=false if you think subpackage don't need the main package |
Thank you very much that works, I have added that now. I would like to explain that the reason why I have not added a Arch Linux (AUR) does make the command Instead of that (Arch Linux's default behavior), I thought the most natural and user-friendly default title screen for Termux users would be this one, so this is how I have it set currently - the button in the center leads to a menu where every gamemode, including devtest if needed, can be found and installed. |
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti Previous documentation here: - termux-user-repository/tur#1295 - termux-user-repository/tur#1296 - termux-user-repository/tur#1331 - termux-user-repository/tur#1327 Summary of key points: - for better performance than normal virglrenderer-android, test using [termux-wsi-layer](termux#22353) or [new virglrenderer](termux#22385) - to use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings - to use keyboard input, set "Prefer scancodes" in Termux:X11 settings - to use mouse input, set "Capture external pointer devices" in Termux:X11 settings - 6 patches are unique to TUR/termux, but the patch 0001-enable-egl-without-sdl2.patch is a cherry pick of minetest/minetest@4838eb2
TERMUX_PKG_SRCURL=https://github.com/minetest/minetest/archive/refs/tags/${TERMUX_PKG_VERSION:2}.zip | ||
TERMUX_PKG_SHA256=e74e994c0f1b188d60969477f553ad83b8ce20ee1e0e2dcd068120189cb0f56c | ||
TERMUX_PKG_AUTO_UPDATE=true | ||
TERMUX_PKG_DEPENDS="freetype, jsoncpp, libandroid-spawn, libc++, libcurl, libglvnd-dev, libgmp, libjpeg-turbo, libiconv, libpng, libsqlite, libvorbis, libxi, luajit, luanti-common, openal-soft, xdg-utils, zstd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TERMUX_PKG_DEPENDS="freetype, jsoncpp, libandroid-spawn, libc++, libcurl, libglvnd-dev, libgmp, libjpeg-turbo, libiconv, libpng, libsqlite, libvorbis, libxi, luajit, luanti-common, openal-soft, xdg-utils, zstd" | |
TERMUX_PKG_DEPENDS="freetype, jsoncpp, libandroid-spawn, libc++, libcurl, libgmp, libjpeg-turbo, libiconv, libluajit, libpng, libsqlite, libvorbis, libx11, libxi, luanti-common, openal-soft, opengl, xdg-utils, zlib, zstd" |
@@ -0,0 +1,6 @@ | |||
TERMUX_SUBPKG_INCLUDE="bin/luantiserver bin/minetestserver" | |||
TERMUX_SUBPKG_DESCRIPTION="Headless server for the Luanti voxel game engine." | |||
TERMUX_SUBPKG_DEPENDS="jsoncpp, libandroid-spawn, libc++, libcurl, libgmp, libiconv, libpng, libsqlite, luajit, luanti-common, zstd" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
TERMUX_SUBPKG_DEPENDS="jsoncpp, libandroid-spawn, libc++, libcurl, libgmp, libiconv, libpng, libsqlite, luajit, luanti-common, zstd" | |
TERMUX_SUBPKG_DEPENDS="jsoncpp, libandroid-spawn, libc++, libcurl, libgmp, libiconv, libluajit, libsqlite, luanti-common, zlib, zstd" |
Copied and pasted from https://github.com/termux-user-repository/tur/tree/master/tur/luanti
Previous documentation here:
Summary of key points:
for better performance than normal
virglrenderer-android
, test using termux-wsi-layer or new virglrendererto use touchscreen input, set "Touchscreen input mode: Direct touch" in Termux:X11 settings
New recommended Termux:X11 settings for Luanti
0001-enable-egl-without-sdl2.patch
is not, it is this commit cherrypicked. minetest/minetest@4838eb2Note
In the future, Luanti might "transition back to SDL2" I think that a blocker for that in this build of luanti might be that building it with SDL2 prevented accessing EGL mode, at least for me. I have been building versions of SDL2 that might work with EGL when I test them, so that might come next eventually.