WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Kiosk viewer using webkitfltk?  (Read 2668 times)

Offline jefferee

  • Newbie
  • *
  • Posts: 31
Kiosk viewer using webkitfltk?
« on: December 31, 2018, 09:15:25 AM »
Back in the days of piCore v8.1.5, I was able to compile a standalone kiosk webviewer using webkitfltk.

See discussion here. (Notes? We don't need no stinkin' notes!  ;D) It appears that all I needed to do at that time was clone the webfltk source repo, install compiletc and webkitfltk-dev, and compile Source/WebKit/fltk/testapp/testapp.cpp, using the command line:

Code: [Select]
g++ testapp.cpp -lz -pthread -lxslt -lxml2 -ldl -lsqlite3 -lpthread -ldl -lm -L/usr/local/lib -licui18n -licuuc -licudata -lpthread -ldl -lm -lharfbuzz -lharfbuzz-icu -lfreetype -lfontconfig -lcairo -lpng -ljpeg -lrt -lcurl -lssl -lcrypto -lglib-2.0 -L/usr/local/lib -Wl,-rpath,/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXcursor -lXfixes -lXext -lfontconfig -lpthread -ldl -lm -lX11 -static-libgcc -static-libstdc++ -lfltk -lwebkitfltk
Unfortunately the project ended up going forward with the Pi Zero W, which was not at the time supported by piCore, so we deployed with Raspbian/chromium instead... but there are a couple of annoyances with that setup that I think could be resolved with a piCore build so I'm having another go at it, with piCore 9.0.3.

Currently building on a Pi 3 but will eventually want to deploy the compiled executable on a Pi Zero W.

Attempting the above g++ command in 9.0.3 gives the error
Code: [Select]
testapp.cpp:1:10: fatal error: webkit.h: No such file or directory
 #include "webkit.h"
          ^~~~~~~~~~
compilation terminated.
which suggests to me that the compiler is not able to find the file /usr/local/include/webkitfltk/webkit.h.

Figured I just needed to add the path /usr/local/include/webkitfltk, so I tried adding -L/usr/local/include/webkitfltk to the above command line without changing the result.

Any advice where to go from here? Thanks.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11694
Re: Kiosk viewer using webkitfltk?
« Reply #1 on: December 31, 2018, 09:27:15 AM »
Hi jefferee
Close but no cigar. Try:
Code: [Select]
-I/usr/local/include/webkitfltkThat's an uppercase  i  for include instead of  L.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14849
Re: Kiosk viewer using webkitfltk?
« Reply #2 on: December 31, 2018, 09:28:14 AM »
Since fifth compiled against webkitfltk-dev it must be all present and correct.

It should be enough to include "webkitfltk/webkit.h" in the cpp file, does "'tce-status -i | grep webkitfltk-dev" confirm that it is loaded?

Offline jefferee

  • Newbie
  • *
  • Posts: 31
Re: Kiosk viewer using webkitfltk?
« Reply #3 on: December 31, 2018, 10:06:18 AM »
Hi jefferee
Close but no cigar. Try:
Code: [Select]
-I/usr/local/include/webkitfltkThat's an uppercase  i  for include instead of  L.
That seems to have done the trick, thanks.

Offline jefferee

  • Newbie
  • *
  • Posts: 31
Re: Kiosk viewer using webkitfltk?
« Reply #4 on: December 31, 2018, 10:12:36 AM »
Since fifth compiled against webkitfltk-dev it must be all present and correct.

It should be enough to include "webkitfltk/webkit.h" in the cpp file, does "'tce-status -i | grep webkitfltk-dev" confirm that it is loaded?
webkitfltk-dev is loaded.

testapp.cpp, as currently in the repo, includes "webkit.h" rather than "webkitfltk/webkit.h".

I've changed it to "webkitfltk/webkit.h" and it now compiles without explicitly including the folder in the command line call of g++.

Thanks!


Offline ibrahimuslu

  • Newbie
  • *
  • Posts: 2
Re: Kiosk viewer using webkitfltk?
« Reply #5 on: January 23, 2019, 04:25:54 PM »
Hello I am also newbier

I am trying to follow this thread

But at the end i got the error:

Code: [Select]
/usr/local/include/webkitfltk/webkit.h:21:10: fatal error: FL/Fl.H: No such file or directory
 #include <FL/Fl.H>

Can anybody help me about this?

Offline ibrahimuslu

  • Newbie
  • *
  • Posts: 2
Re: Kiosk viewer using webkitfltk?
« Reply #6 on: January 23, 2019, 05:14:13 PM »
Ok. I found it. and copy the FL directory to the /usr/local/includes https://github.com/fltk/fltk/blob/master
and created an abiversion.h file. :D

If anyhelp for how to fullscreen FLTK i will be very appreciated. ?[fixed] I entered the actual screen resolution number on FL_window()

And one more question. Can i autostart it without seeing desktop.?
At the moment i am using ".X.d/" folder and it works well but the desktop starts and after that fltk is runs on fullscreen. :)
« Last Edit: January 23, 2019, 05:45:40 PM by ibrahimuslu »