please help me
please check this source code https://github.com/epicstudios856/vectras-x11
the framebuffer sliced and the colors shifted wrong and i dont know why
https://github.com/epicstudios856/vectras-x11/blob/main/app/src/main/cpp/xdraw.c
it looks like that you use bitmap to draw framebuffer.The performance cost will be higher than that of ANativeWindow.In fact I've never tried this method,which may require some data conversion(due to the data format). You can get buffer fortmat form Ximage and the copy buffer in format form Xvfb_screen0 fd,there are some different between rgb and rgba too ,so it may need to add alpha channels manually. I also thought about getting image data through fd at the beginning of the project. It will bring a better performance and avoid the memory defect of Ximage.But we need some tests before that.
now i do what u say but image corrupted, sorry can u check it again?
i do what u say now, can u check the code and contribute pls
the fbfd is not just an array of pixels.It is a data buffer in xwd format.There are some relevant information https://en.wikipedia.org/wiki/Xwd. I may start it at summer vacation.Or You can try to finish it first.
At present, the method of using x protocol to get ximage is available, this method does not need fd, and may be more suitable for a xserver.
ok thanks alot, i will try this
i need libX11.a source code to use XOpenDisplay(0)
i need libX11.a source code to use XOpenDisplay(0)
You can build it with termux.
How?, sorry im noob about x11 things
How?, sorry im noob about x11 things
There are many ways to get x11 lib you can build it with this build system https://github.com/termux/termux-packages. or find libx11-static/stable installed by termux. or directly use the elf file in my project. If app connect Xserver in TCP/IP these are all available.
I thinks ur prebuilt libX11 uses co.pangbai.dowork, is thats right?
Now termux packages dosent build on my xubuntu server without reason
I thinks ur prebuilt libX11 uses co.pangbai.dowork, is thats right?
Now termux packages dosent build on my xubuntu server without reason
you can use github action .there are automatic build scripts https://github.com/termux/termux-packages/actions/workflows/packages.yml
libX11 libXau libX11-xcb libXcursor libdmcp libXext libXtst libxcb libandroid-support
the package called libx11 ,not libX11.and you should edit your package name of app in https://github.com/termux/termux-packages/blob/master/scripts/properties.sh
https://github.com/epicstudios856/termux-packages/blob/master/scripts/properties.sh
edit package.yml and remove "-I"
ok thanks, i think now this time for using termux bootstraps instead of proot
xvfb ld.lld: error: undefined symbol: libandroid_shmget
referenced by test_xcb_image_shm.c test_xcb_image_shm-test_xcb_image_shm.o:(main)
ld.lld: error: undefined symbol: libandroid_shmat
referenced by test_xcb_image_shm.c test_xcb_image_shm-test_xcb_image_shm.o:(main)
ld.lld: error: undefined symbol: libandroid_shmctl
referenced by test_xcb_image_shm.c test_xcb_image_shm-test_xcb_image_shm.o:(main) clang-17: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [Makefile:655: test_xcb_image_shm] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/home/builder/.termux-build/xcb-util-image/build/test' make[1]: *** [Makefile:435: all-recursive] Error 1 make[1]: Leaving directory '/home/builder/.termux-build/xcb-util-image/build' make: *** [Makefile:367: all] Error 2 Error: Process completed with exit code 2.
xvfb ld.lld: error: undefined symbol: libandroid_shmget
referenced by test_xcb_image_shm.c test_xcb_image_shm-test_xcb_image_shm.o:(main)
ld.lld: error: undefined symbol: libandroid_shmat
referenced by test_xcb_image_shm.c test_xcb_image_shm-test_xcb_image_shm.o:(main)
ld.lld: error: undefined symbol: libandroid_shmctl
referenced by test_xcb_image_shm.c test_xcb_image_shm-test_xcb_image_shm.o:(main) clang-17: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: *** [Makefile:655: test_xcb_image_shm] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory '/home/builder/.termux-build/xcb-util-image/build/test' make[1]: *** [Makefile:435: all-recursive] Error 1 make[1]: Leaving directory '/home/builder/.termux-build/xcb-util-image/build' make: *** [Makefile:367: all] Error 2 Error: Process completed with exit code 2.
add package libandroid-shmem
after 50m
after 50m
Consider pulling docker to compile locally
then?
now the remaining thing is assets xvfb executable files
now the remaining thing is assets xvfb executable files
add package xorg-server-xvfb,
and extract all deb packages and put them in assets (unexpectedly, my busy time may continue.there are still some details you need to deal with yourself.)