Skip to content
Snippets Groups Projects
Unverified Commit 37c79ea8 authored by Athul Iddya's avatar Athul Iddya Committed by GitHub
Browse files

docs: add PipeWire integration instructions for snaps (#40019)

parent 93bcb30c
No related merge requests found
......@@ -91,14 +91,14 @@ version: '0.1'
summary: Hello World Electron app
description: |
Simple Hello World Electron app as an example
base: core18
base: core22
confinement: strict
grade: stable
apps:
electron-packager-hello-world:
command: electron-quick-start/electron-quick-start --no-sandbox
extensions: [gnome-3-34]
extensions: [gnome]
plugs:
- browser-support
- network
......@@ -237,6 +237,34 @@ apps:
desktop: usr/share/applications/desktop.desktop
```
## Optional: Enabling desktop capture
Capturing the desktop requires PipeWire library in some Linux configurations that use
the Wayland protocol. To bundle PipeWire with your application, ensure that the base
snap is set to `core22` or newer. Next, create a part called `pipewire` and add it to
the `after` section of your application:
```yaml
pipewire:
plugin: nil
build-packages: [libpipewire-0.3-dev]
stage-packages: [pipewire]
prime:
- usr/lib/*/pipewire-*
- usr/lib/*/spa-*
- usr/lib/*/libpipewire*.so*
- usr/share/pipewire
```
Finally, configure your application's environment for PipeWire:
```yaml
environment:
SPA_PLUGIN_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/spa-0.2
PIPEWIRE_CONFIG_NAME: $SNAP/usr/share/pipewire/pipewire.conf
PIPEWIRE_MODULE_DIR: $SNAP/usr/lib/$CRAFT_ARCH_TRIPLET/pipewire-0.3
```
[snapcraft-syntax]: https://docs.snapcraft.io/build-snaps/syntax
[electron-packager]: https://github.com/electron/electron-packager
[electron-forge]: https://github.com/electron/forge
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment