diff --git a/pipewire-jack/src/meson.build b/pipewire-jack/src/meson.build index a8c62c27e..0962d48fb 100644 --- a/pipewire-jack/src/meson.build +++ b/pipewire-jack/src/meson.build @@ -18,6 +18,15 @@ if libjack_path == '' libjack_path = join_paths(modules_install_dir, 'jack') endif +tools_config = configuration_data() +tools_config.set('LIBJACK_PATH', libjack_path) + +configure_file(input : 'pw-jack.in', + output : 'pw-jack', + configuration : tools_config, + install: true, + install_dir : pipewire_bindir) + pipewire_jack = shared_library('jack', pipewire_jack_sources, soversion : soversion, diff --git a/pipewire-jack/src/pw-jack.in b/pipewire-jack/src/pw-jack.in new file mode 100755 index 000000000..555d4d886 --- /dev/null +++ b/pipewire-jack/src/pw-jack.in @@ -0,0 +1,59 @@ +#!/bin/sh + +# This file is part of PipeWire. +# +# Copyright © 2020 Wim Taymans +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +while getopts 'hr:v' param ; do + case $param in + r) + PIPEWIRE_REMOTE="$OPTARG" + export PIPEWIRE_REMOTE + ;; + v) + if [ x"$PIPEWIRE_DEBUG" = x ]; then + PIPEWIRE_DEBUG=3 + else + PIPEWIRE_DEBUG=$(( $PIPEWIRE_DEBUG + 1 )) + fi + export PIPEWIRE_DEBUG + ;; + *) + echo "$0 - run JACK applications on PipeWire" + echo " " + echo "$0 [options] application [arguments]" + echo " " + echo "options:" + echo " -h show brief help" + echo " -r remote daemon name" + echo " -v verbose debug info" + exit 0 + ;; + esac +done + +shift $(( $OPTIND - 1 )) + +LD_LIBRARY_PATH=@LIBJACK_PATH@:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH + +exec "$@" diff --git a/pipewire-pulseaudio/src/meson.build b/pipewire-pulseaudio/src/meson.build index 2fecdd8ce..f7e8ea6ee 100644 --- a/pipewire-pulseaudio/src/meson.build +++ b/pipewire-pulseaudio/src/meson.build @@ -53,6 +53,14 @@ if libpulse_path == '' libpulse_path = join_paths(modules_install_dir, 'pulse') endif +tools_config = configuration_data() +tools_config.set('LIBPULSE_PATH', libpulse_path) + +configure_file(input : 'pw-pulse.in', + output : 'pw-pulse', + configuration : tools_config, + install: true, + install_dir : pipewire_bindir) pipewire_pulseaudio = shared_library('pulse', pipewire_pulseaudio_sources, diff --git a/pipewire-pulseaudio/src/pw-pulse.in b/pipewire-pulseaudio/src/pw-pulse.in new file mode 100755 index 000000000..72ff62f55 --- /dev/null +++ b/pipewire-pulseaudio/src/pw-pulse.in @@ -0,0 +1,59 @@ +#!/bin/sh + +# This file is part of PipeWire. +# +# Copyright © 2020 Wim Taymans +# +# Permission is hereby granted, free of charge, to any person obtaining a +# copy of this software and associated documentation files (the "Software"), +# to deal in the Software without restriction, including without limitation +# the rights to use, copy, modify, merge, publish, distribute, sublicense, +# and/or sell copies of the Software, and to permit persons to whom the +# Software is furnished to do so, subject to the following conditions: +# +# The above copyright notice and this permission notice (including the next +# paragraph) shall be included in all copies or substantial portions of the +# Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +# DEALINGS IN THE SOFTWARE. +# +while getopts 'hr:v' param ; do + case $param in + r) + PIPEWIRE_REMOTE="$OPTARG" + export PIPEWIRE_REMOTE + ;; + v) + if [ x"$PIPEWIRE_DEBUG" = x ]; then + PIPEWIRE_DEBUG=3 + else + PIPEWIRE_DEBUG=$(( $PIPEWIRE_DEBUG + 1 )) + fi + export PIPEWIRE_DEBUG + ;; + *) + echo "$0 - run PulseAudio applications on PipeWire" + echo " " + echo "$0 [options] application [arguments]" + echo " " + echo "options:" + echo " -h show brief help" + echo " -r remote daemon name" + echo " -v verbose debug info" + exit 0 + ;; + esac +done + +shift $(( $OPTIND - 1 )) + +LD_LIBRARY_PATH=@LIBPULSE_PATH@:$LD_LIBRARY_PATH +export LD_LIBRARY_PATH + +exec "$@"