Warning
To build this, you need very beefy hardware. We are building this on a VM with 32 vCPUs and 128GB RAM. If you're trying to build it locally, you likely need to tweak MAKE_CORES to something lower, but you would still need a powerful workstation (32GB RAM minimum) to make this build.
Since our entire build environment resides inside a Docker container, you don't need to install any packages on the host system. Everything is confined to the Docker image. Do however note that as of this writing, the multi-platform support is still in beta so, you need to enable this. Instructions for how to get started with multi-platform builds can be found here.
$ cd webview
$ docker buildx build \
--load \
--build-arg GIT_HASH=$(git rev-parse --short HEAD) \
-t qt-builder .
Start the builder container with the following command:
$ docker run -itd \
--name qt-builder-instance \
-v ~/tmp/qt-src:/src:Z \
-v ~/tmp/qt-build:/build:Z \
-v $(pwd):/webview:ro \
-e TARGET=${TARGET_PLATFORM} \
qt-builder
You should now be able to invoke a run executing the following command:
$ docker exec -it qt-builder-instance /webview/build_qt5.sh
This will start the process of building QT for all Raspberry Pi boards if you don't specify a TARGET
environment variable.
The resulting files will be placed in ~/tmp/qt-build/
.
When you're done, you can stop and remove the container with the following commands:
$ docker stop qt-builder-instance
$ docker rm qt-builder-instance
You can learn more about this process in the blog post Compiling Qt with Docker multi-stage and multi-platform.
You can append the following environment variables to configure the build process:
CLEAN_BUILD
: Set to1
to ensure a clean build (not including theccache
cache).BUILD_WEBVIEW
: Set to0
to disable the build of ScreenlyWebView.TARGET
: Specify a particular target (such aspi3
orpi4
) instead of all existing boards.
$ cd webview
$ docker compose -f docker-compose.x86.yml up -d --build
$ docker compose -f docker-compose.x86.yml exec builder /webview/build_x86.sh
The resulting files will be placed in ~/tmp-x86/qt-build/release
.
When you're done, you can stop and remove the container with the following commands:
docker compose -f docker-compose.x86.yml down
See this documentation for details
DBus is used for communication.
Webview registers screenly.webview
object at /Screenly
address on the session bus.
Webview provides 2 methods:loadPage
and loadImage
.
Example of interaction (python):
from pydbus import SessionBus
bus = SessionBus()
browser_bus = bus.get('screenly.webview', '/Screenly')
browser_bus.loadPage("www.example.com")
Supported protocols: http://
, https://
Tip
You can enable QT debugging by using the following:
export QT_LOGGING_RULES=qt.qpa.*=true