-
Notifications
You must be signed in to change notification settings - Fork 131
Installing dependent libraries
You need to install the following dependent libraries to build and run. Here introduce how to install the libraries on Debian-based systems like Ubuntu.
- clang (for building)
- cmake (for building)
- build-essential (for building)
- pkg-config (for building)
- EGL
- xkbcommon
- OpenGL ES (>=2.0)
sudo apt install clang cmake build-essential pkg-config libegl1-mesa-dev libxkbcommon-dev libgles2-mesa-dev
- libwayland
- wayland-protocols (to generate the source files of Wayland protocols)
sudo apt install libwayland-dev wayland-protocols
- libdrm
- libgbm
- libinput
- libudev
DRM backend requires either libsystemd or libuv. If both libsystemd and libuv exist, libsystemd will be used when building the embedder. See also https://github.com/sony/flutter-embedded-linux/pull/420
- libsystemd
- libuv
sudo apt install libdrm-dev libgbm-dev libinput-dev libudev-dev libsystemd-dev
Or
sudo apt install libdrm-dev libgbm-dev libinput-dev libudev-dev libuv-dev
- x11
sudo apt install libx11-dev
This embedder requres libflutter_engine.so
(Pre-build library of the Flutter Engine). You need to install it in <path_to_cmake_build_directory>
to build. See: Building Flutter Engine embedder
You can download a specific pre-built Flutter Engine (libflutter_engine.so) version from https://github.com/sony/flutter-embedded-linux/releases/latest without building it yourself. See also: Use pre-build image
Or you can download a specific pre-built Flutter Engine from Google's infra by the following steps, but it's limited to debug mode and x64 targets.
Check the version (SHA) of the channel you want to use. You can also get the version from ${path_to_flutter_sdk_install}/flutter/bin/internal/engine.version
of the Flutter SDK which you are currently using.
Download Flutter Engine embedder library. Note that replace FLUTTER_ENGINE
with the SHA of the Flutter engine you want to use.
curl -O https://storage.googleapis.com/flutter_infra/flutter/FLUTTER_ENGINE/linux-x64/linux-x64-embedder
Install the library. Note that the downloaded library is only debug mode and for x64 targets.
unzip ./linux-x64-embedder
cp ./libflutter_engine.so <path_to_cmake_build_directory>