From 6b007c38651c133b3be52bb5044579c24e948100 Mon Sep 17 00:00:00 2001 From: Romain BOULLARD Date: Wed, 9 Sep 2026 17:48:18 +0200 Subject: [PATCH] Wayland Update --- Linux/CPPBuilder/Dockerfile | 13 +++++++++++++ Linux/CPPBuilder/weston-run | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100644 Linux/CPPBuilder/weston-run diff --git a/Linux/CPPBuilder/Dockerfile b/Linux/CPPBuilder/Dockerfile index cce53f8..c0d12e6 100644 --- a/Linux/CPPBuilder/Dockerfile +++ b/Linux/CPPBuilder/Dockerfile @@ -5,13 +5,26 @@ FROM $BASE_BUILDER RUN apt-get update && apt-get install -y \ build-essential \ git \ + libwayland-dev \ + libxkbcommon-dev \ lsb-release \ pkg-config \ software-properties-common \ + wayland-protocols \ + weston \ xvfb ENV PATH="/root/.local/bin:${PATH}" +# Headless Wayland test setup: a pre-created, correctly-permissioned XDG_RUNTIME_DIR (required +# by Wayland clients/compositors) plus a weston-run wrapper mirroring xvfb-run's ergonomics - +# starts Weston's headless backend, runs the given command against it, then tears it down. +RUN mkdir -p -m 700 /tmp/xdg-runtime +ENV XDG_RUNTIME_DIR=/tmp/xdg-runtime + +COPY weston-run /usr/local/bin/weston-run +RUN chmod +x /usr/local/bin/weston-run + # Install LLVM 22 and symlink tools RUN wget https://apt.llvm.org/llvm.sh -O /tmp/llvm.sh \ && chmod +x /tmp/llvm.sh \ diff --git a/Linux/CPPBuilder/weston-run b/Linux/CPPBuilder/weston-run new file mode 100644 index 0000000..3e7a653 --- /dev/null +++ b/Linux/CPPBuilder/weston-run @@ -0,0 +1,11 @@ +#!/bin/bash +# Runs the given command against a headless Weston compositor, mirroring xvfb-run's ergonomics +# for Wayland. Usage: weston-run [args...] +weston --backend=headless-backend.so --shell=kiosk-shell.so --socket=wayland-headless & +WESTON_PID=$! +sleep 1 +WAYLAND_DISPLAY=wayland-headless "$@" +STATUS=$? +kill "$WESTON_PID" 2>/dev/null +wait "$WESTON_PID" 2>/dev/null +exit "$STATUS"