Browse Source

Add script to test carla-osc usage locally

Signed-off-by: falkTX <falktx@falktx.com>
tags/v2.2.0-RC1
falkTX 5 years ago
parent
commit
799c45eb84
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
1 changed files with 32 additions and 0 deletions
  1. +32
    -0
      data/carla-osc-gui

+ 32
- 0
data/carla-osc-gui View File

@@ -0,0 +1,32 @@
#!/bin/bash

PYTHON=$(which python3 2>/dev/null)

if [ ! -f ${PYTHON} ]; then
PYTHON=python
fi

if [ "$1" = "--gdb" ]; then
PYTHON="gdb --args $PYTHON"
fi

INSTALL_ARGS="--with-appname="${0}""

if [ -f "$(dirname ${0})/carla-utils.pc" ]; then
cd "$(dirname ${0})/.."
INSTALL_PREFIX="$(pwd)"
INSTALL_FRONTENDDIR="./source/frontend"
else
INSTALL_PREFIX="X-PREFIX-X"
INSTALL_FRONTENDDIR="${INSTALL_PREFIX}/share/carla"
INSTALL_ARGS="${INSTALL_ARGS} --with-libprefix="${INSTALL_PREFIX}""
fi

if lsof -i:21337 > /dev/null; then
echo "NOTICE: Backend already running"
else
echo "NOTICE: Backend not running yet, starting it now"
${PYTHON} "${INSTALL_FRONTENDDIR}/carla" "${INSTALL_ARGS}" --osc-gui=21337 "$@" &
fi

${PYTHON} "${INSTALL_FRONTENDDIR}/carla-control" "${INSTALL_ARGS}" osc.tcp://127.0.0.1:21337/Carla "$@"

Loading…
Cancel
Save