Skip to content
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

please help me #8

Closed
xoureldeen opened this issue May 15, 2024 · 37 comments
Closed

please help me #8

xoureldeen opened this issue May 15, 2024 · 37 comments

Comments

@xoureldeen
Copy link

xoureldeen commented May 15, 2024

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
Copy link
Author

@PangBaiWork
Copy link
Owner

PangBaiWork commented May 16, 2024

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.

@xoureldeen
Copy link
Author

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

@xoureldeen
Copy link
Author

xoureldeen commented May 16, 2024

image

@xoureldeen
Copy link
Author

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

@PangBaiWork
Copy link
Owner

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
Copy link
Owner

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.

@xoureldeen
Copy link
Author

ok thanks alot, i will try this

@xoureldeen
Copy link
Author

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

@PangBaiWork
Copy link
Owner

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

You can build it with termux.

@xoureldeen
Copy link
Author

How?, sorry im noob about x11 things

@PangBaiWork
Copy link
Owner

PangBaiWork commented May 18, 2024

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.

@xoureldeen
Copy link
Author

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

Now termux packages dosent build on my xubuntu server without reason

@PangBaiWork
Copy link
Owner

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

@xoureldeen
Copy link
Author

image

@xoureldeen
Copy link
Author

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

@xoureldeen
Copy link
Author

image

@PangBaiWork
Copy link
Owner

PangBaiWork commented May 21, 2024

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

@xoureldeen
Copy link
Author

image

@xoureldeen
Copy link
Author

@PangBaiWork
Copy link
Owner

image

edit package.yml and remove "-I"

@xoureldeen
Copy link
Author

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

@xoureldeen
Copy link
Author

xoureldeen commented May 22, 2024

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.

@PangBaiWork
Copy link
Owner

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

@xoureldeen
Copy link
Author

after 50m

image

@PangBaiWork
Copy link
Owner

after 50m

image

Consider pulling docker to compile locally

@xoureldeen
Copy link
Author

image

@xoureldeen
Copy link
Author

then?

@xoureldeen
Copy link
Author

now the remaining thing is assets xvfb executable files

@PangBaiWork
Copy link
Owner

PangBaiWork commented May 25, 2024

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

@xoureldeen
Copy link
Author

Thx

@xoureldeen
Copy link
Author

@PangBaiWork
Copy link
Owner

termux/termux-packages#20336

I haven't had a problem like this before. you can try running the termux-package script in termux.termux-package is always updated, and the results of the latest scripts may be different from week to week.now, xvfb seems to depends on mesa, so the package built may be much larger than before.

@xoureldeen
Copy link
Author

So what machine and os u built xvfb on and what u mean by termux.termux-package

@PangBaiWork
Copy link
Owner

PangBaiWork commented May 28, 2024

So what machine and os u built xvfb on and what u mean by termux.termux-package

Screenshot_2024-05-28-13-47-25-748_com.termux.jpg

I'd like to say this, but this should not be the solution, because the package name cannot be changed at this time.As a matter of fact, I failed to build just now(in termux).termux-package maintainers may be needed to solve this problem(build mesa).

@xoureldeen
Copy link
Author

so how u built xvfb in assets dir

@PangBaiWork
Copy link
Owner

so how u built xvfb in assets dir

I'm sorry. I've forgotten. I need some time to try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants