Skip to content

Commit

Permalink
Add carla-jack-single/multi startup tools
Browse files Browse the repository at this point in the history
  • Loading branch information
falkTX committed Jan 3, 2017
1 parent 2c71884 commit 3645cf7
Show file tree
Hide file tree
Showing 5 changed files with 168 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ ifeq ($(HAVE_PYQT),true)
data/carla \
data/carla-control \
data/carla-database \
data/carla-jack-multi \
data/carla-jack-single \
data/carla-patchbay \
data/carla-rack \
data/carla-settings \
Expand All @@ -552,6 +554,8 @@ ifeq ($(HAVE_PYQT),true)
$(DESTDIR)$(BINDIR)/carla \
$(DESTDIR)$(BINDIR)/carla-control \
$(DESTDIR)$(BINDIR)/carla-database \
$(DESTDIR)$(BINDIR)/carla-jack-multi \
$(DESTDIR)$(BINDIR)/carla-jack-single \
$(DESTDIR)$(BINDIR)/carla-patchbay \
$(DESTDIR)$(BINDIR)/carla-rack \
$(DESTDIR)$(BINDIR)/carla-settings
Expand All @@ -569,6 +573,8 @@ ifeq ($(HAVE_PYQT),true)
install -m 644 \
source/carla \
source/carla-control \
source/carla-jack-multi \
source/carla-jack-single \
source/carla-patchbay \
source/carla-rack \
source/*.py \
Expand Down
15 changes: 15 additions & 0 deletions data/carla-jack-multi
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [ -f /usr/bin/python3 ]; then
PYTHON=/usr/bin/python3
else
PYTHON=python
fi

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

INSTALL_PREFIX="X-PREFIX-X"
export PATH="$INSTALL_PREFIX"/lib/carla:$PATH
exec $PYTHON "$INSTALL_PREFIX"/share/carla/carla-jack-multi --with-appname="$0" --with-libprefix="$INSTALL_PREFIX" "$@"
15 changes: 15 additions & 0 deletions data/carla-jack-single
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

if [ -f /usr/bin/python3 ]; then
PYTHON=/usr/bin/python3
else
PYTHON=python
fi

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

INSTALL_PREFIX="X-PREFIX-X"
export PATH="$INSTALL_PREFIX"/lib/carla:$PATH
exec $PYTHON "$INSTALL_PREFIX"/share/carla/carla-jack-single --with-appname="$0" --with-libprefix="$INSTALL_PREFIX" "$@"
66 changes: 66 additions & 0 deletions source/carla-jack-multi
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Carla plugin host
# Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# For a full copy of the GNU General Public License see the doc/GPL.txt file.

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)

from carla_host import *

# ------------------------------------------------------------------------------------------------------------
# Main

if __name__ == '__main__':
# -------------------------------------------------------------
# Read CLI args

initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)

# -------------------------------------------------------------
# App initialization

app = CarlaApplication("Carla2-Single-Client", libPrefix)

# -------------------------------------------------------------
# Set-up custom signal handling

setUpSignals()

# -------------------------------------------------------------
# Init host backend

host = initHost(initName, libPrefix, False, False, True)
host.audioDriverForced = "JACK"
host.processMode = ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS
host.processModeForced = True
host.transportMode = ENGINE_TRANSPORT_MODE_JACK
loadHostSettings(host)

# -------------------------------------------------------------
# Create GUI

gui = HostWindow(host, not(LADISH_APP_NAME or NSM_URL))

# -------------------------------------------------------------
# Show GUI

gui.show()

# -------------------------------------------------------------
# App-Loop

app.exit_exec()
66 changes: 66 additions & 0 deletions source/carla-jack-single
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

# Carla plugin host
# Copyright (C) 2011-2017 Filipe Coelho <falktx@falktx.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2 of
# the License, or any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# For a full copy of the GNU General Public License see the doc/GPL.txt file.

# ------------------------------------------------------------------------------------------------------------
# Imports (Custom Stuff)

from carla_host import *

# ------------------------------------------------------------------------------------------------------------
# Main

if __name__ == '__main__':
# -------------------------------------------------------------
# Read CLI args

initName, libPrefix = handleInitialCommandLineArguments(__file__ if "__file__" in dir() else None)

# -------------------------------------------------------------
# App initialization

app = CarlaApplication("Carla2-Single-Client", libPrefix)

# -------------------------------------------------------------
# Set-up custom signal handling

setUpSignals()

# -------------------------------------------------------------
# Init host backend

host = initHost(initName, libPrefix, False, False, True)
host.audioDriverForced = "JACK"
host.processMode = ENGINE_PROCESS_MODE_SINGLE_CLIENT
host.processModeForced = True
host.transportMode = ENGINE_TRANSPORT_MODE_JACK
loadHostSettings(host)

# -------------------------------------------------------------
# Create GUI

gui = HostWindow(host, not(LADISH_APP_NAME or NSM_URL))

# -------------------------------------------------------------
# Show GUI

gui.show()

# -------------------------------------------------------------
# App-Loop

app.exit_exec()

0 comments on commit 3645cf7

Please sign in to comment.