-
Notifications
You must be signed in to change notification settings - Fork 149
Building Embedded Linux embedding for Flutter
There are several build ways, so please use the one you like.
$ mkdir build
$ cd build
$ cmake -DUSER_PROJECT_PATH=examples/flutter-wayland-client ..
$ cmake --build .This binary will run as a desktop-shell by setting weston.ini when Weston starts. See Settings of weston.ini file.
$ mkdir build
$ cd build
$ cmake -DUSER_PROJECT_PATH=examples/flutter-weston-desktop-shell ..
$ cmake --build .$ mkdir build
$ cd build
$ cmake -DUSER_PROJECT_PATH=examples/flutter-drm-gbm-backend ..
$ cmake --build .$ mkdir build
$ cd build
$ cmake -DUSER_PROJECT_PATH=examples/flutter-drm-eglstream-backend ..
$ cmake --build .Basically, the x11 backend is just only for debugging and developing Flutter apps on desktops. And it's still being implemented now.
$ mkdir build
$ cd build
$ cmake -DUSER_PROJECT_PATH=examples/flutter-x11-client ..
$ cmake --build .You need to create a toolchain file to cross compile using the Yocto SDK for aarch64 on x64 hosts. toolchain-template.cmake is the templete file for aarch64 toolchain. Also, you need to modify <path_to_user_target_sysroot> appropriately for your environment if you want to use the template file.
$ cmake -DUSER_PROJECT_PATH=<path_to_user_project> -DCMAKE_TOOLCHAIN_FILE=<toolchain-template-file> ..If you want to build using Yocto, see: meta-flutter
You need to build the embedder with CMAKE_BUILD_TYPE=Debug option if you want to debug the embedder. Using this option, you can get gather logs and debug them with debuggers such as gdb / lldb.
$ cmake -DUSER_PROJECT_PATH=<path_to_user_project> -DCMAKE_BUILD_TYPE=Debug ..Please edit cmake/user_config.cmake file.
| Option | Description |
|---|---|
| BACKEND_TYPE | Select WAYLAND, DRM-GBM, DRM-EGLSTREAM, or X11 as the display backend type (The default setting is WAYLAND) |
| DESKTOP_SHELL | Work as Weston desktop-shell |
| USE_VIRTUAL_KEYBOARD | Use Virtual Keyboard (Only available when you choose Wayland backend) |
| USE_GLES3 | Use OpenGLES3 instead of OpenGLES2 |