Dowork icon indicating copy to clipboard operation
Dowork copied to clipboard

please help me

Open xoureldeen opened this issue 1 year ago • 13 comments

please check this source code https://github.com/epicstudios856/vectras-x11

the framebuffer sliced and the colors shifted wrong and i dont know why

xoureldeen avatar May 15 '24 21:05 xoureldeen

https://github.com/epicstudios856/vectras-x11/blob/main/app/src/main/cpp/xdraw.c

xoureldeen avatar May 15 '24 21:05 xoureldeen

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.

PangBaiWork avatar May 16 '24 17:05 PangBaiWork

now i do what u say but image corrupted, sorry can u check it again?

xoureldeen avatar May 16 '24 18:05 xoureldeen

image

xoureldeen avatar May 16 '24 19:05 xoureldeen

i do what u say now, can u check the code and contribute pls

xoureldeen avatar May 16 '24 19:05 xoureldeen

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.

PangBaiWork avatar May 17 '24 09:05 PangBaiWork

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.

PangBaiWork avatar May 17 '24 10:05 PangBaiWork

ok thanks alot, i will try this

xoureldeen avatar May 17 '24 23:05 xoureldeen

i need libX11.a source code to use XOpenDisplay(0)

xoureldeen avatar May 18 '24 00:05 xoureldeen

i need libX11.a source code to use XOpenDisplay(0)

You can build it with termux.

PangBaiWork avatar May 18 '24 13:05 PangBaiWork

How?, sorry im noob about x11 things

xoureldeen avatar May 18 '24 14:05 xoureldeen

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.

PangBaiWork avatar May 18 '24 14:05 PangBaiWork

I thinks ur prebuilt libX11 uses co.pangbai.dowork, is thats right?

Now termux packages dosent build on my xubuntu server without reason

xoureldeen avatar May 20 '24 00:05 xoureldeen

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

PangBaiWork avatar May 20 '24 13:05 PangBaiWork

image

xoureldeen avatar May 20 '24 20:05 xoureldeen

libX11 libXau libX11-xcb libXcursor libdmcp libXext libXtst libxcb libandroid-support

xoureldeen avatar May 20 '24 20:05 xoureldeen

image

xoureldeen avatar May 20 '24 20:05 xoureldeen

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

PangBaiWork avatar May 21 '24 02:05 PangBaiWork

image

xoureldeen avatar May 21 '24 18:05 xoureldeen

https://github.com/epicstudios856/termux-packages/blob/master/scripts/properties.sh

xoureldeen avatar May 21 '24 18:05 xoureldeen

image

edit package.yml and remove "-I"

PangBaiWork avatar May 22 '24 06:05 PangBaiWork

ok thanks, i think now this time for using termux bootstraps instead of proot

xoureldeen avatar May 22 '24 12:05 xoureldeen

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.

xoureldeen avatar May 22 '24 21:05 xoureldeen

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

PangBaiWork avatar May 23 '24 01:05 PangBaiWork

after 50m

image

xoureldeen avatar May 24 '24 00:05 xoureldeen

after 50m

image

Consider pulling docker to compile locally

PangBaiWork avatar May 24 '24 01:05 PangBaiWork

image

xoureldeen avatar May 24 '24 15:05 xoureldeen

then?

xoureldeen avatar May 24 '24 15:05 xoureldeen

now the remaining thing is assets xvfb executable files

xoureldeen avatar May 25 '24 01:05 xoureldeen

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.)

PangBaiWork avatar May 25 '24 02:05 PangBaiWork