Skip to content

Commit

Permalink
fix: allow electron 27 to run (#137)
Browse files Browse the repository at this point in the history
Branch for OE changes to support Opentrons/opentrons#14600

Adds a new command line flag to enable remote devtool access on electron 27 and switches out some libraries.
  • Loading branch information
sfoster1 authored Mar 19, 2024
1 parent ad5d1e0 commit 15b6b18
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
3 changes: 3 additions & 0 deletions layers/meta-opentrons/conf/distro/opentrons.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,6 @@ PREFERRED_VERSION_python3-setuptools = "62.3.1"
PREFERRED_VERSION_python3-jupyter-packaging = "0.12.0"
PREFERRED_VERSION_nodejs = "18.18.2"
PREFERRED_VERSION_python3-wrapt = "1.16.0"
PREFERRED_VERSION_vulkan-tools = "1.2.182.0"
PREFERRED_VERSION_vulkan-headers = "1.2.182.0"
PREFERRED_VERSION_vulkan-loader = "1.2.182.0"
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,19 @@ fakeroot do_install(){
# really system utilities and (in the case of wayland) actually can break
# communication with the system because it uses a weird RPC thing and
# really needs to get the system version. So we remove the local versions.
# however, chrome for some reason opens these libraries via direct calls
# or has a strict rpath or something so we need to symlink them explicitly
rm ${DESTDIR}/libEGL.so ${DESTDIR}/libGLESv2.so ${DESTDIR}/libvulkan.so.1
ln -s /usr/lib/libEGL.so ${DESTDIR}/libEGL.so
ln -s /usr/lib/libGLESv2.so ${DESTDIR}/libGLESv2.so
ln -s /usr/lib/libvulkan.so.1 ${DESTDIR}/libvulkan.so.1

}

REQUIRED_DISTRO_FEATURES = "x11"

do_install[depends] += "virtual/fakeroot-native:do_populate_sysroot"
INSANE_SKIP:${PN} = " already-stripped file-rdeps"
INSANE_SKIP:${PN} = " already-stripped file-rdeps dev-so "
FILES:${PN} = "/opt/opentrons-app/* /opt/opentrons-app/**/*"
# todo figure out how to not need cups
RDEPENDS:${PN} = "udev \
Expand All @@ -76,5 +81,7 @@ RDEPENDS:${PN} = "udev \
libxcomposite libx11 libxrender libxext libx11-xcb libxi \
libxtst libxcursor libxrandr libxscrnsaver \
atk at-spi2-atk\
cups"
cups \
vulkan-loader vulkan-tools \
"
DEPENDS = " nodejs-native udev openssl-native "
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,21 @@ SRC_URI = " \

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

APPLICATION_ENVIRONMENT := '\"DISPLAY=\:0\:0\" \"XDG_SESSION_TYPE=wayland\" \"XDG_SESSION_DESKTOP=kiosk\" \"PYTHONPATH=/opt/opentrons-robot-server\"'
APPLICATION_ENVIRONMENT := '\"WAYLAND_DISPLAY=wayland-0\" \"XDG_RUNTIME_DIR=/run/user/0\" \"DISPLAY=\:0\:0\" \"XDG_SESSION_TYPE=wayland\" \"XDG_SESSION_DESKTOP=kiosk\" \"PYTHONPATH=/opt/opentrons-robot-server\"'

WAYLAND_APPLICATION := "/opt/opentrons-app/opentrons --disable-gpu --remote-debugging-port=9222 --discovery.candidates=localhost --discovery.ipFilter=\"127.0.0.1\" --isOnDevice=1 --no-sandbox --enable-features=UseOzonePlatform --ozone-platform=wayland --in-process-gpu --python.pathToPythonOverride=/usr/bin/python3"
WAYLAND_APPLICATION := "/opt/opentrons-app/opentrons \
--disable-gpu \
--remote-allow-origin=* \
--remote-debugging-port=9222 \
--discovery.candidates=localhost \
--discovery.ipFilter=\"127.0.0.1\" \
--isOnDevice=1 \
--no-sandbox \
--enable-features=UseOzonePlatform \
--ozone-platform=wayland \
--in-process-gpu \
--python.pathToPythonOverride=/usr/bin/python3\
"

do_compile () {
sed -e "s:@@wayland-application@@:${WAYLAND_APPLICATION}:" -e "s:@@initial-path@@:${INITIAL_PATH}:" opentrons-robot-app.sh.in > opentrons-robot-app.sh
Expand Down

0 comments on commit 15b6b18

Please sign in to comment.