pipewire-media-session/INSTALL.md

88 lines
2.3 KiB
Markdown
Raw Permalink Normal View History

2020-05-01 20:29:40 +02:00
## Building
2021-10-13 16:07:36 +10:00
PipeWire Media Session uses a build tool called *Meson* as a basis for its build
process. It's a tool with some resemblance to Autotools and CMake. Meson
again generates build files for a lower level build tool called *Ninja*,
working in about the same level of abstraction as more familiar GNU Make
does.
Meson uses a user-specified build directory and all files produced by Meson
are in that build directory. This build directory will be called `builddir`
in this document.
Generate the build files for Ninja:
```
$ meson setup builddir
```
For distribution-specific build dependencies, please check our
[CI pipeline](https://gitlab.freedesktop.org/pipewire/media-session/-/blob/master/.gitlab-ci.yml)
(search for `FDO_DISTRIBUTION_PACKAGES`). Note that some dependencies are
optional and depend on options passed to meson.
Once this is done, the next step is to review the build options:
```
$ meson configure builddir
```
Define the installation prefix:
2020-05-01 20:29:40 +02:00
```
$ meson configure builddir -Dprefix=/usr # Default: /usr/local
2020-05-01 20:29:40 +02:00
```
2021-10-13 16:07:36 +10:00
PipeWire Media Session specific build options are listed in the "Project options"
section. They are defined in `meson_options.txt`.
2020-05-01 20:29:40 +02:00
Finally, invoke the build:
2020-05-01 20:29:40 +02:00
```
$ ninja -C builddir
2020-05-01 20:29:40 +02:00
```
Just to avoid any confusion: `autogen.sh` is a script invoked by *Jhbuild*,
which orchestrates multi-component builds.
2020-05-01 20:29:40 +02:00
## Running
2021-10-13 16:07:36 +10:00
If you want to run PipeWire Media Session without installing it on your system, there is a
script that you can run. This puts you in an environment in which PipeWire Media Session can
be run from the build directory. You can get into this environment with:
2020-05-01 20:29:40 +02:00
```
2021-10-13 16:07:36 +10:00
$ ./media-session-uninstalled.sh
$ pipewire-media-session
2020-05-01 20:29:40 +02:00
```
2021-10-13 16:07:36 +10:00
This will use the default config file to configure and start PipeWire Media
Session.
2020-05-01 20:29:40 +02:00
You can also enable more debugging with the PIPEWIRE_DEBUG environment
2020-05-01 20:29:40 +02:00
variable like so:
```
cd builddir/
PIPEWIRE_DEBUG="D" make run
2020-05-01 20:29:40 +02:00
```
2021-10-13 16:07:36 +10:00
You might have to stop the pipewire-media-session service that might have been
started already, with:
2020-05-01 20:29:40 +02:00
```
2021-10-13 16:07:36 +10:00
systemctl --user stop pipewire-media-session.service
2020-05-01 20:29:40 +02:00
```
## Installing
2021-10-13 16:07:36 +10:00
Inside `builddir`, run:
2020-05-01 20:29:40 +02:00
```
sudo meson install
```
to install everything onto the system into the specified prefix.
Some additional steps will have to be performed to integrate
with the distribution as shown below.