Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 46 additions & 9 deletions release/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,55 @@
FROM debian:trixie-slim
# Build releases with the oldest possible supported target
# The built binaries will depend on symbols from the libc used here,
# so this should work on newer OS but might not work on older OS

# Recommended version should be kept in sync with the wiki:
# https://github.com/flutter-elinux/flutter-elinux/wiki/flutter-elinux-install
FROM debian:bullseye-slim

ENV DEBIAN_FRONTEND noninteractive

RUN <<EOF
dpkg --add-architecture arm64

apt-get update
apt-get -y -q upgrade
apt-get -y install \
crossbuild-essential-arm64 \
cmake \
git \
xxhash \
curl xz-utils build-essential pkgconf \
zip equivs clang libgles2-mesa-dev wayland-protocols libegl1-mesa-dev libdrm-dev libgbm-dev libinput-dev libudev-dev libsystemd-dev libxkbcommon-dev libwayland-dev \
libgles2-mesa-dev:arm64 wayland-protocols:arm64 libegl1-mesa-dev:arm64 libdrm-dev:arm64 libgbm-dev:arm64 libinput-dev:arm64 libudev-dev:arm64 libsystemd-dev:arm64 libxkbcommon-dev:arm64 libwayland-dev:arm64 libuv1-dev:arm64

apt-get -y install \
build-essential \
clang \
cmake \
crossbuild-essential-arm64 \
curl \
equivs \
git \
libdrm-dev \
libdrm-dev:arm64 \
libegl1-mesa-dev \
libegl1-mesa-dev:arm64 \
libgbm-dev \
libgbm-dev:arm64 \
libgles2-mesa-dev \
libgles2-mesa-dev:arm64 \
libinput-dev \
libinput-dev:arm64 \
libsystemd-dev \
libsystemd-dev:arm64 \
libudev-dev \
libudev-dev:arm64 \
libuv1-dev:arm64 \
libwayland-dev \
libwayland-dev:arm64 \
libxkbcommon-dev \
libxkbcommon-dev:arm64 \
pkgconf \
wayland-protocols \
wayland-protocols:arm64 \
xxhash \
xz-utils \
zip

# not needed for trixie
apt-get -y install libstdc++-10-dev:arm64

apt-get clean
EOF
5 changes: 1 addition & 4 deletions release/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@ To run with docker:
# build container
docker build -t flutter-build .
# build flutter engine and flutter-elinux variants
docker run -ti --rm --user "$(id -u):$(id -g)" \
-v "$PWD":/flutter -w /flutter \
--env HOME=/flutter/home flutter-build \
./build-all.sh [build-all options]
./run-docker.sh ./build-all.sh [build-all options]
# check build is complete and output instructions to make release
./prepare-release.sh output
```
Expand Down
4 changes: 3 additions & 1 deletion release/run-docker.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/sh

docker run -ti --rm \
--user "$(id -u):$(id -g)" \
-v "$PWD":/flutter \
-w /flutter \
--env HOME=/flutter/home \
flutter
flutter-build "$@"
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
#include "flutter/shell/platform/linux_embedded/logger.h"
#include "flutter/shell/platform/linux_embedded/surface/cursor_data.h"

// Allow building with mesa < 21
// This is a linux uapi header value so there is no risk in hardcoding it if
// unset
#ifdef DRM_MODE_CONNECTOR_USB
#define DRM_MODE_CONNECTOR_USB 20
#endif

namespace flutter {
namespace {
constexpr char kFlutterDrmConnectorEnvironmentKey[] = "FLUTTER_DRM_CONNECTOR";
Expand Down