Browse Source

Add carla-standalone script

tags/v0.9.0
falkTX 10 years ago
parent
commit
cf803ba4f2
2 changed files with 108 additions and 0 deletions
  1. +2
    -0
      Makefile
  2. +106
    -0
      data/carla-standalone

+ 2
- 0
Makefile View File

@@ -302,6 +302,7 @@ install:
data/claudia-launcher \
data/carla \
data/carla-control \
data/carla-standalone \
data/caitlyn \
c++/jackmeter/cadence-jackmeter \
c++/xycontroller/cadence-xycontroller \
@@ -389,6 +390,7 @@ install:
$(DESTDIR)$(PREFIX)/bin/claudia-launcher \
$(DESTDIR)$(PREFIX)/bin/carla \
$(DESTDIR)$(PREFIX)/bin/carla-control \
$(DESTDIR)$(PREFIX)/bin/carla-standalone \
$(DESTDIR)$(PREFIX)/bin/caitlyn \
$(X11_RC_DIR)/99cadence-session-start
# $(DESTDIR)$(PREFIX)/bin/cadence-cpufreq


+ 106
- 0
data/carla-standalone View File

@@ -0,0 +1,106 @@
#!/bin/bash
# Script to start Carla bridges

INSTALL_PREFIX="X-PREFIX-X"
CADENCE_PREFIX="$INSTALL_PREFIX"/lib/cadence

# ----------------------------------------------------------------------
# Check for enough arguments

if [ "$3"x == ""x ]; then
echo "usage: $0 [arch] [mode] [filename] [label/uri]

Possible archs:
- \"posix32\"
- \"posix64\"
- \"win32\"
- \"win64\"

Possible modes:
- \"ladspa\"
- \"dssi\"
- \"lv2\"
- \"vst\"

Examples:
$0 posix64 lv2 \"/usr/lib/lv2/calf/\" \"http://calf.sourceforge.net/plugins/Compressor\"
"
exit
fi

# ----------------------------------------------------------------------
# Set client name (from environment)

if [ "$CARLA_CLIENT_NAME"x == ""x ]; then
CARLA_CLIENT_NAME="(none)"
fi

# ----------------------------------------------------------------------
# Set variables

RUN_ARCH="$1"
RUN_MODE="$2"
RUN_FILE="$3"
RUN_LABEL="$4"

# ----------------------------------------------------------------------
# Fix arch for windows bridges

if [ $RUN_ARCH == "win32" ]; then
RUN_ARCH="win32.exe"
fi

if [ $RUN_ARCH == "win64" ]; then
RUN_ARCH="win64.exe"
fi

# ----------------------------------------------------------------------
# Check for existing cadence folder

if [ ! -d $CADENCE_PREFIX ]; then
echo "$0: Cadence folder non-existing, is it installed?"
exit
fi

# ----------------------------------------------------------------------
# Check for existing arch binary

CARLA_EXEC="$CADENCE_PREFIX/carla-bridge-$RUN_ARCH"

if [ ! -f $CARLA_EXEC ]; then
echo "$0: Invalid arch (may not be installed)"
exit
fi

# ----------------------------------------------------------------------
# Check mode

if [ "$RUN_MODE"x == "ladspa"x ]; then
if [ "$RUN_LABEL"x == ""x ]; then
echo "$0: LADSPA needs label"
exit
fi
RUN_MODE="DSSI"
elif [ "$RUN_MODE"x == "dssi"x ]; then
if [ "$RUN_LABEL"x == ""x ]; then
echo "$0: DSSI needs label"
exit
fi
RUN_MODE="DSSI"
elif [ "$RUN_MODE"x == "lv2"x ]; then
if [ "$RUN_LABEL"x == ""x ]; then
echo "$0: LV2 needs uri"
exit
fi
RUN_MODE="LV2"
elif [ "$RUN_MODE"x == "vst"x ]; then
RUN_MODE="VST"
else
echo "$0: Invalid mode"
exit
fi

# ----------------------------------------------------------------------
# Exec

exec $CARLA_EXEC "null" "$RUN_MODE" "$RUN_FILE" "$CARLA_CLIENT_NAME" "$RUN_LABEL"

Loading…
Cancel
Save