From 3645cf789147562eb973c48743a19e01aa3a199e Mon Sep 17 00:00:00 2001 From: falkTX Date: Tue, 3 Jan 2017 20:54:53 +0000 Subject: [PATCH] Add carla-jack-single/multi startup tools --- Makefile | 6 ++++ data/carla-jack-multi | 15 +++++++++ data/carla-jack-single | 15 +++++++++ source/carla-jack-multi | 66 ++++++++++++++++++++++++++++++++++++++++ source/carla-jack-single | 66 ++++++++++++++++++++++++++++++++++++++++ 5 files changed, 168 insertions(+) create mode 100755 data/carla-jack-multi create mode 100755 data/carla-jack-single create mode 100755 source/carla-jack-multi create mode 100755 source/carla-jack-single diff --git a/Makefile b/Makefile index 3986e5fee..ab8d80a64 100644 --- a/Makefile +++ b/Makefile @@ -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 \ @@ -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 @@ -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 \ diff --git a/data/carla-jack-multi b/data/carla-jack-multi new file mode 100755 index 000000000..f9be0534c --- /dev/null +++ b/data/carla-jack-multi @@ -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" "$@" diff --git a/data/carla-jack-single b/data/carla-jack-single new file mode 100755 index 000000000..8fe4dceb6 --- /dev/null +++ b/data/carla-jack-single @@ -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" "$@" diff --git a/source/carla-jack-multi b/source/carla-jack-multi new file mode 100755 index 000000000..866edc746 --- /dev/null +++ b/source/carla-jack-multi @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Carla plugin host +# Copyright (C) 2011-2017 Filipe Coelho +# +# 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() diff --git a/source/carla-jack-single b/source/carla-jack-single new file mode 100755 index 000000000..7515a4411 --- /dev/null +++ b/source/carla-jack-single @@ -0,0 +1,66 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Carla plugin host +# Copyright (C) 2011-2017 Filipe Coelho +# +# 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()