From d1162f28efd502fcb973e172867970f5cc8d7a6b Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Sat, 6 Jun 2020 10:23:58 +0200 Subject: [PATCH] pipewire.conf.in: use absolute path to pipewire-media-session So pipewire daemon is able to find pipewire-media-session from the location it's installed to, even when it's not in $PATH. For the `pw-ininstalled.sh` and `make run` invocations, provide a `src/daemon/pipewire-uninstalled.conf` that still uses the relative path, but isn't installed. --- Makefile.in | 2 +- pw-uninstalled.sh | 2 +- src/daemon/meson.build | 7 +++++++ src/daemon/pipewire.conf.in | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Makefile.in b/Makefile.in index 1e7d5d35f..1fc8adf7a 100644 --- a/Makefile.in +++ b/Makefile.in @@ -14,7 +14,7 @@ run: all SPA_PLUGIN_DIR=@BUILD_ROOT@/spa/plugins \ PIPEWIRE_MODULE_DIR=@BUILD_ROOT@ \ PATH=@BUILD_ROOT@/src/examples:$(PATH) \ - PIPEWIRE_CONFIG_FILE=@BUILD_ROOT@/src/daemon/pipewire.conf \ + PIPEWIRE_CONFIG_FILE=@BUILD_ROOT@/src/daemon/pipewire-uninstalled.conf \ $(DBG) @BUILD_ROOT@/src/daemon/pipewire gdb: diff --git a/pw-uninstalled.sh b/pw-uninstalled.sh index 0ed106caf..5bfcfa6a4 100755 --- a/pw-uninstalled.sh +++ b/pw-uninstalled.sh @@ -31,7 +31,7 @@ if [ ! -d ${BUILDDIR} ]; then exit -1 fi -export PIPEWIRE_CONFIG_FILE="${BUILDDIR}/src/daemon/pipewire.conf" +export PIPEWIRE_CONFIG_FILE="${BUILDDIR}/src/daemon/pipewire-uninstalled.conf" export SPA_PLUGIN_DIR="${BUILDDIR}/spa/plugins" export PIPEWIRE_MODULE_DIR="${BUILDDIR}/src/modules" export PATH="${BUILDDIR}/src/daemon:${BUILDDIR}/src/tools:${BUILDDIR}/src/examples:${PATH}" diff --git a/src/daemon/meson.build b/src/daemon/meson.build index 228d4d119..a424d78b9 100644 --- a/src/daemon/meson.build +++ b/src/daemon/meson.build @@ -17,13 +17,20 @@ pipewire_c_args = [ conf_config = configuration_data() conf_config.set('VERSION', '"@0@"'.format(pipewire_version)) +conf_config.set('media_session_path', pipewire_bindir / 'pipewire-media-session') conf_install_dir = join_paths(get_option('sysconfdir'), 'pipewire') +conf_config_uninstalled = conf_config +conf_config_uninstalled.set('media_session_path', 'pipewire-media-session') + configure_file(input : 'pipewire.conf.in', output : 'pipewire.conf', configuration : conf_config, install_dir : conf_install_dir) +configure_file(input : 'pipewire.conf.in', + output : 'pipewire-uninstalled.conf', + configuration : conf_config) executable('pipewire', pipewire_daemon_sources, diff --git a/src/daemon/pipewire.conf.in b/src/daemon/pipewire.conf.in index a674b9510..90faee49a 100644 --- a/src/daemon/pipewire.conf.in +++ b/src/daemon/pipewire.conf.in @@ -74,4 +74,4 @@ create-object spa-node-factory factory.name=support.node.driver node.name=Dummy # Execute the given program. This is usually used to start the # session manager. run the session manager with -h for options # -exec pipewire-media-session # -d alsa-seq,alsa-pcm,bluez5,metadata +exec @media_session_path@ # -d alsa-seq,alsa-pcm,bluez5,metadata