pipewire/pw-uninstalled.sh
Wim Taymans fc90a4e48a Implement config/state file handling
Make methods to load_config and load/save state. For now the config
and state directories are the same but it might not be. Implement
the search path for all config/state files as:

  $XDG_CONFIG_HOME/[$prefix]/$name
  $HOME/.config/[$prefix]/$name
  $PIPEWIRE_CONFIG_DIR/pipewire/[$prefix]/$name
  /etc/pipewire/[$prefix]/$name

Make some config files for jack and RT clients. Make pw-cat use the
client-rt config.

Use core state and config management in media-session.
Move all session manager state and config files to the build dir and
set the PIPEWIRE_CONFIG_DIR to this build dir.
2021-02-12 10:25:11 +01:00

49 lines
1.3 KiB
Bash
Executable file

#!/bin/sh
set -e
while getopts ":b:v:" opt; do
case ${opt} in
b)
BUILDDIR=${OPTARG}
;;
v)
VERSION=${OPTARG}
;;
\?)
echo "Invalid option: -${OPTARG}"
exit -1
;;
:)
echo "Option -${OPTARG} requires an argument"
exit -1
;;
esac
done
if [ -z "${BUILDDIR}" ]; then
BUILDDIR=${PWD}/build
echo "Using default build directory: ${BUILDDIR}"
fi
if [ ! -d ${BUILDDIR} ]; then
echo "Invalid build directory: ${BUILDDIR}"
exit -1
fi
# the config file read by the daemon
export PIPEWIRE_CONFIG_DIR="${BUILDDIR}/src/daemon"
# the directory with SPA plugins
export SPA_PLUGIN_DIR="${BUILDDIR}/spa/plugins"
# the directory with pipewire modules
export PIPEWIRE_MODULE_DIR="${BUILDDIR}/src/modules"
export PATH="${BUILDDIR}/src/daemon:${BUILDDIR}/src/tools:${BUILDDIR}/src/examples:${PATH}"
export LD_LIBRARY_PATH="${BUILDDIR}/pipewire-pulseaudio/src/:${BUILDDIR}/src/pipewire/:${BUILDDIR}/pipewire-jack/src/${LD_LIBRARY_PATH+":$LD_LIBRARY_PATH"}"
export GST_PLUGIN_PATH="${BUILDDIR}/src/gst/${GST_PLUGIN_PATH+":${GST_PLUGIN_PATH}"}"
# the directory with card profiles and paths
export ACP_PATHS_DIR=${PWD}"/spa/plugins/alsa/mixer/paths"
export ACP_PROFILES_DIR=${PWD}"/spa/plugins/alsa/mixer/profile-sets"
# FIXME: find a nice, shell-neutral way to specify a prompt
${SHELL}