-
Notifications
You must be signed in to change notification settings - Fork 4
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
Using the phantomjs scripts (or forking them) #6
Comments
I've updated the script mimicking how PhantonJS works and qtbase compiles without problem, but qtwebkit requires to install some programs (gperf bison ruby flex) and requires to have qtbase compiled with ICU support. I enabled it but require to also compile and add libicu... Don't know if it makes sense to go so long or if we should move directly to content_shell instead of QtWebkit. Maybe we could continue experimenting with QtWebkit to see if we manage to make it work and later see if it compensates to move to content_shell, what do you think? Do you want that I upload my modified script and try to add ICU support yourself, or do you prefer that I add ICU support first? |
Hm... I think content_shell would be extremly interesting to work and prototype with... I think for a first attemp it is to much work if there are better ways of achivinh the same :) I think we should leave it as it easy and look forward to the content-shell ! |
However, I would say that we leave GUI related code in this repo no mather which way we take (?). |
There were previous attempts with content_shell and seems @formula1 was able to compile and make it work, but only at default resolution of 800x600 and trying to change that it showed nothing... :-/ We could investigate it, I only agreed to experiment with QtWebkit since it seemed it would be easier to have a working prototype before to move to other things. Who knows, maybe ICU is just the only last one needed thing, at least by using qtbase instead of full qt it got to compile a lot faster... :-)
I agree on that. Maybe we could do it on different branches before deciding what alternative to follow, isn't it? |
@netlovers was the real hero when it came to content shell but I don't think he was able to finish it. My own attempts involved webkit.js, headless-gl and falsifying a bunch of browser objects. Didn't work out as planned though : / I am able to get it running without errors but it renders blank pngs. https://github.com/formula1/node-webkit-canvas I saw @piranna (I see you everywhere man, you have no idea) at the servo repo which may be of interest to us. They implemented a CEF interface to hook into (https://github.com/servo/servo/tree/master/ports/cef). I'm aware it's probably a bad thing to add more language dependencies (as it stands, c compiler, python and now possibly rust) But they seem to be doing good work over there. Heres a CEF sample if you didn't find one https://github.com/acristoffers/CEFSimpleSample |
Sorry, I'm really bad with names...
At least it was a good idea :-) Probably there was sonething missing...
I have an idea about it, what I don't have it's a life :-(
Yeah, it's written in Rust. Being this a independent project from NodeOS
CEF is somewhat deprecated in benefict of content_shell since it has less |
Yeah... I agree with trying it once again with ICU (fingers crossed ) Both CEF and content shell will require a bunch of work to make them run as we want (as far as I know) |
Ok, not sure how or why, but I managed to compile it using ICU :-P There are some problems though:
Since it's using ICU as a dynamic library I've added a [piranna@SquaredHead:~/Proyectos/noGUI]
(master) > LD_LIBRARY_PATH=build/icu/lib ldd build/nogui/noGui
linux-vdso.so.1 => (0x00007ffdf1155000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f3a77942000)
libicui18n.so.56 => build/icu/lib/libicui18n.so.56 (0x00007f3a774c4000)
libicuuc.so.56 => build/icu/lib/libicuuc.so.56 (0x00007f3a7712b000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3a76f27000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3a76d1f000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3a76b00000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f3a7677e000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f3a76476000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3a7625e000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3a75e94000)
/lib64/ld-linux-x86-64.so.2 (0x000056256ab56000)
libicudata.so.56 => build/icu/lib/libicudata.so.56 (0x00007f3a744b1000) Problems is it have been compiled by using Ubuntu glibc and worst than that, glibc is not able to create purely statically linked binaries as musl does, so we'll need to find a way to compile it. I think the best option would be to convert the NodeOS cross-compiler as an independent project. |
WOW ! Good job ! Could you push your scripts ? I think most of these problems should be "solveable". Sure, I'll test it ;) |
I've already pushed them. I have tested it and done some minor tune-ups but
|
There's a 'special' method/function/lib/whatever-qt-calls-that to include static plugins ... I will push an updated version of noGui in the next days :) (Totally forgot to tell you about that ) I think that's what is missing ! |
Seems I was able to include the linuxfb plugin, or at least now I get an
|
Yay! :-D I've managed to include the Things to do now:
|
Yeah! That's cool ! For exiting and co. I thought about keyboard shortcuts (something like ctrl + q or so ) To use the fb by default... What about a js script (or even wrapper) for that ? |
Ok, although well need to find a good one not used by anyone...
Ok.
It's currently being used a bash script, but I want it native. |
|
If you need anything, let me know. BTW, I'm watching your progress like a hawk :P I'm always here so if you need something (excluding compiling because my pc just can't XD) then lemme know :D |
@piranna It looks like the size of the linuxfb is set using env variables... (http://doc.qt.io/qt-5/embedded-linux.html#linuxfb) I could query the display size and set the size using a function from stdlib.h... |
It's a shame that it can't be set programatically nor it gets the correct
How are you planning to do that? |
QApplication has got a method to get the screen size And stdlib has got |
And set them before calling QtWebkit? It could work...
|
As long as everything is called in one process it should work, since |
Yeah, but it's strange there not an API for this...
|
I've fully read the page and all of us we should do so. Seems EGLFS uses by
|
Ok, we need to check this
|
(I knew that EGLFS uses the full screen, I tested noGui on it...) |
Do you think is an issue only of framebuffer?
In the long run I want to use EGL and Mesa, but it's ok, let's freeze a |
It don't know, if it is only framebuffer related ... It's possible too that we just don't have this "auto adjustment" when using static binaries So... are your build scripts complete ? I will add the framebuffer code in the next days and afterwards I think.. (just maybe ^^) we have got a first release :) ( Of course ... I needs to be packaged and so on) |
Ok, let's forget about this and we'll check it later if we move to EGL.
No, it doesn't have relationship, static binaries are only about having all
Sort of :-) I didn't have time to test loading a web page, though..
One step at a time ;-) |
Well then ^^ |
Wow ! That's great news ! Sorry, that I'm so inactive at the moment but school's running pretty hot right now :P I'll look into this asap. |
Yeah, I've been a bit inactive lately too due to work and some showstoppers, but seems things are moving forward :-) |
I finally looked into it ^^ ! It seems like they (the developers of these addons) just remove the option from the response... I know that qt got the |
Do you think you would be able to easily override this on noGUI and submit your changes soon? |
Puh... Yeah, it shouldn't be that hard but my time is limited. I'll try my best to do it this week ! |
Ok, take your time and keep going ;-)
|
Remember enable first the support for X11, probably this will make it
|
Ah right ! That was a thing too :0... |
Just a question. Did y'all manage to open any page in the last noGUI? Just
|
Just a question. Did y'all manage to open any page in the last noGUI?
No I didn't, but also didn't hace time to give it an oportunity.
|
Oh hahaha! That's alright. Good job anyway on all your progress!
|
It doesn't work on our static linuxfb versiob... however I seems to work with X11 |
Have you managed to open a web page with noGUI on X11? If so maybe linuxfb it's more a network issue... |
Well... X11-non-static works... |
Ok, that's something :-) Have you modified the code? Do you have it somewhere? |
I didn't modify anything... just use X11 as target platforn |
I was talking about to enable the support for X11 target platform. |
You wanna enable it for nodeos or for noGui ? NoGui code is platform indipendent... |
For noGUI, and just only for development purposes. I think this way it will be easier to test... |
Yeah... noGui seems to work in a non-static X11 context. I haven't tested it in a static context yet. |
Ok, if we can show a url in a non-static X11, we can continue working from it. Do you have somewhere the changes to enable X11 target? |
You don't have to change anything ... using qtStudio is the easiest way, just press "run" ^^ If you try to run noGui with a normal qt version (something like Since qt 5.6 there seems to be something new to static versions ... I think it got easier, I will have to look at it (as far as I've seen, it seems to be much easier now) |
=> so just compile a normal, shared version of noGui and start it with |
Of course on desktop that's not the case, that's just why I tell you about doing so for testing purposes :-) |
Ah, well I can comfirm then, that it works. I will add some logging and this x frame thingy in the near future... |
Cool, keep us informed of tour progresses :-)
|
I think these links would be of interest: ariya/phantomjs#12948 (comment) |
Hm... So if I understood correctly they managed to build qt static ! This cross-compile system looks good and it'll be trivial to make the changes we need. Thanks for the link, lucky that I've got holidays so I've got enough time to try that (and other things) out ! |
We need to see what build arguments they are using, that's the interesting part. |
I think I know where to start working now: @piranna
preconfigure.sh
script (add backends, etc) (here)The text was updated successfully, but these errors were encountered: