Installation
Boson brings together a set of components, each handling a key part of the system:
Runtime — acts as the bridge between your PHP code and the underlying operating system. This is the main API that you can use both in runtime and during development.
Compiler – allows you to build the results of your work into a finished project ready for distribution.
Together, they create a seamless environment for building rich desktop applications with web technologies — without the bloat.
Runtime
Boson runtime provides the core of the library and allows you to run your wonderful applications.
Library is available as Composer repository and can be installed using the following command in a root of your project:
Don't forget to include the autoload file in your application.
Compiler
Boson compiler gives you the ability to assemble the result of your work into a final product. That is, into an executable file for the target platform.
Library is available as Composer repository and can be installed using the following command in a root of your project:
Requirements
List of dependencies required for development.
Windows 10+
x86 or Amd64
PHP 8.4+
An
ext-ffi
extension
MacOS 12+
x86, Amd64 or Arm64
PHP 8.4+
An
ext-ffi
extension
Linux
x86, Amd64 or Arm64
PHP 8.4+
An
ext-ffi
extension
Frontend dependencies (one of):
gtk4
webkitgtk-6.0
qt5-qtwebengine
qt5-qtwebchannel
qt5-qtbase-gui
qt5-qtbase
qt6-qtwebengine
qt6-qtwebchannel
qt6-qtbase-gui
qt6-qtbase
List of dependencies required for build target.
Windows 10+
x86 or Amd64
MacOS 12+
x86, Amd64 or Arm64
Linux
x86, Amd64 or Arm64
Frontend dependencies (one of):
gtk4
webkitgtk-6.0
qt5-qtwebengine
qt5-qtwebchannel
qt5-qtbase-gui
qt5-qtbase
qt6-qtwebengine
qt6-qtwebchannel
qt6-qtbase-gui
qt6-qtbase
Troubleshooting
An [ext-ffi] disabled in your php.ini
An [ext-ffi] not available
Failed loading '.../libboson-linux-xxx.so'
Make sure that GTK4 is installed.
Illegal instruction (core dumped)
Linux prebuild was compiled with some assumptions, such as the presence of sse
and avx2
instructions.
Make sure your CPU supports AVX2
(Intel Q2 2013, AMD Q2 2015) instructions set (cat /proc/cpuinfo
).
Note: VirtualBox may not support AVX/AVX2 when running under Hyper-V.
libEGL warning: egl: failed to create dri2 screen
sudo apt-get install libnvidia-egl-wayland1
Failed to fully launch dbus-proxy: Child process exited with code 1
This is apparmor bug and Ubuntu 24.04 is also affected.
It can be temporarily fixed by running code as
sudo
.Or using following commands: