-
Notifications
You must be signed in to change notification settings - Fork 82
wpe-simple-launcher: Add recipe #603
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
psaavedra
wants to merge
3
commits into
main
Choose a base branch
from
psaavedra/add_wpe-simple-launcher
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
recipes-browser/wpe-simple-launcher/wpe-simple-launcher/wpe-ctl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/sh | ||
| CTL_FILE="/tmp/wpe-exported-wayland" | ||
|
|
||
| if [ ! -p "$CTL_FILE" ]; then | ||
| echo "wpe-ctl: control FIFO not found: $CTL_FILE" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| printf '%s\n' "$*" >"$CTL_FILE" | ||
54 changes: 54 additions & 0 deletions
54
recipes-browser/wpe-simple-launcher/wpe-simple-launcher/wpe-exported-wayland
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| #!/bin/sh | ||
|
|
||
| # Disable sandboxing for WebKit (dangerous, use with caution) | ||
| # export WEBKIT_DISABLE_SANDBOX_THIS_IS_DANGEROUS=1 | ||
|
|
||
| # Lower rank of AV1 decoder to disable it | ||
| export GST_PLUGIN_FEATURE_RANK="avdec_av1:0" | ||
|
|
||
| # Set directory for GStreamer debug output | ||
| # export GST_DEBUG_DUMP_DOT_DIR=/tmp/gst-out/ | ||
| # mkdir -p /tmp/gst-out | ||
| # chmod 777 /tmp/gst-out | ||
|
|
||
| # FIFO path used for the wpe-simple-launcher --ctrl channel (see wpe-ctl) | ||
| CTL_FILE="/tmp/wpe-exported-wayland" | ||
|
psaavedra marked this conversation as resolved.
|
||
|
|
||
| # Enable DMA-BUF video sink in WebKit for efficient rendering. | ||
| # WebKitDMABufVideoSink sink that is able to accept decode | ||
| # dmabuf or raw data in a range of RGB-like or YUV formats. | ||
| # Bug: https://bugs.webkit.org/show_bug.cgi?id=279819 | ||
| # | ||
| # Apply workaround only if running on raspberrypi5 | ||
| if [ "$(hostname)" = "raspberrypi5" ]; then | ||
| export WEBKIT_GST_DMABUF_SINK_ENABLED=1 | ||
| fi | ||
|
|
||
| # Regression in 2.48.X since | ||
| # [GStreamer] Add support for DMA-BUF to GL video sink | ||
| # https://bugs.webkit.org/show_bug.cgi?id=279672 | ||
| # XXX Reported in : https://bugs.webkit.org/show_bug.cgi?id=288464 | ||
| # | ||
| # Apply regression workaround only if running on raspberrypi5 | ||
| if [ "$(hostname)" = "raspberrypi5" ]; then | ||
| export WEBKIT_GST_DISABLE_GL_SINK=1 | ||
| fi | ||
|
|
||
| # Ensure Wayland and XDG runtime environment variables are propagated | ||
| WESTON_PID="$(pidof -s weston-keyboard 2>/dev/null || true)" | ||
| if [ -z "$WESTON_PID" ] || [ ! -r "/proc/$WESTON_PID/environ" ]; then | ||
| echo "wpe-exported-wayland: unable to read weston-keyboard environment" >&2 | ||
| exit 1 | ||
| fi | ||
|
|
||
| WAYLAND_DISPLAY="$(tr '\0' '\n' < "/proc/$WESTON_PID/environ" | grep -m1 '^WAYLAND_DISPLAY=')" | ||
| XDG_RUNTIME_DIR="$(tr '\0' '\n' < "/proc/$WESTON_PID/environ" | grep -m1 '^XDG_RUNTIME_DIR=')" | ||
| export "${WAYLAND_DISPLAY?}" | ||
| export "${XDG_RUNTIME_DIR?}" | ||
|
Copilot marked this conversation as resolved.
|
||
|
|
||
| # Check if the script is run as root and switch to the 'weston' user if needed | ||
| if [ "$(id -u)" -eq 0 ]; then | ||
| su -s /bin/sh weston -c 'ctl="$1"; shift; exec /usr/bin/wpe-simple-launcher --ctrl "$ctl" "$@"' sh "$CTL_FILE" "$@" | ||
| else | ||
| exec /usr/bin/wpe-simple-launcher --ctrl "$CTL_FILE" "$@" | ||
| fi | ||
|
Copilot marked this conversation as resolved.
Comment on lines
+49
to
+54
|
||
24 changes: 24 additions & 0 deletions
24
recipes-browser/wpe-simple-launcher/wpe-simple-launcher_git.bb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| SUMMARY = "Simple WPE-based web launcher" | ||
| DESCRIPTION = "On-device WPEWebKit launcher that opens a URL and exposes a FIFO control channel through the wpe-ctl helper." | ||
| HOMEPAGE = "https://github.com/psaavedra/wpe-simple-launcher" | ||
|
|
||
| LICENSE = "MIT" | ||
| LIC_FILES_CHKSUM = "file://LICENSE;md5=dd93f6e0496294f589c3d561f96ffee4" | ||
|
|
||
| inherit meson pkgconfig | ||
|
|
||
| DEPENDS += "glib-2.0 wpewebkit" | ||
|
|
||
| SRC_URI = "git://github.com/psaavedra/wpe-simple-launcher.git;protocol=https;branch=main;destsuffix=${BP} \ | ||
| file://wpe-ctl \ | ||
| file://wpe-exported-wayland \ | ||
| " | ||
| SRCREV = "522488025d1e68d039667bd897b3e8f4ee820061" | ||
|
|
||
| do_install:append() { | ||
| install -d ${D}${bindir} | ||
| install -m 0755 ${B}/wpe-simple-launcher ${D}${bindir}/wpe-simple-launcher | ||
| install -m 0755 ${UNPACKDIR}/wpe-ctl ${D}${bindir}/wpe-ctl | ||
| install -m 0755 ${UNPACKDIR}/wpe-exported-wayland ${D}${bindir}/wpe-exported-wayland | ||
|
Comment on lines
+18
to
+22
|
||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.