Browse Source

Fix carla-single under ladish, closes #184

tags/1.9.6
falkTX 10 years ago
parent
commit
da59d56e20
2 changed files with 18 additions and 31 deletions
  1. +13
    -26
      data/carla-single
  2. +5
    -5
      source/backend/CarlaStandalone.cpp

+ 13
- 26
data/carla-single View File

@@ -21,8 +21,6 @@

import os
import sys
from signal import signal, SIGINT, SIGTERM
from subprocess import Popen

# --------------------------------------------------------------------------------------------------------
# Setup
@@ -199,30 +197,9 @@ if FILENAME and not os.path.exists(FILENAME):
print("Requested filename does not exist")
sys.exit(1)

# ------------------------------------------------------------------------------------------------------------
# Signal handler

global gProc
gProc = None

def signalHandler(sig, frame):
global gProc

if gProc is None:
return

if sig in (SIGINT, SIGTERM):
gProc.kill()
gProc = None

signal(SIGINT, signalHandler)
signal(SIGTERM, signalHandler)

# --------------------------------------------------------------------------------------------------------
# Setup environment

#CARLA_CLIENT_NAME = os.getenv("CARLA_CLIENT_NAME", "(none)")

#os.environ["ENGINE_OPTION_UIS_ALWAYS_ON_TOP"] = "false"
#os.environ["ENGINE_OPTION_MAX_PARAMETERS"] = "200"
#os.environ["ENGINE_OPTION_UI_BRIDGES_TIMEOUT"] = "3000"
@@ -250,6 +227,18 @@ if SFZ_PATH is not None: os.environ["ENGINE_OPTION_PLUGIN_PATH_SFZ"] = SFZ
os.environ["ENGINE_OPTION_PATH_BINARIES"] = CARLA_LIBDIR
os.environ["ENGINE_OPTION_PATH_RESOURCES"] = CARLA_RESDIR

# --------------------------------------------------------------------------------------------------------

CARLA_CLIENT_NAME = os.getenv("CARLA_CLIENT_NAME")
LADISH_APP_NAME = os.getenv("LADISH_APP_NAME")

if CARLA_CLIENT_NAME is not None:
os.environ["CARLA_CLIENT_NAME"] = CARLA_CLIENT_NAME
elif CARLA_CLIENT_NAME is not None:
os.environ["CARLA_CLIENT_NAME"] = LADISH_APP_NAME
else:
os.environ["CARLA_CLIENT_NAME"] = "(none)"

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

@@ -265,8 +254,6 @@ command.append(LABEL or "(none)")
command.append(str(UNIQUEID))

print(command)

gProc = Popen(command)
gProc.wait()
os.execvp(command[0], command)

# --------------------------------------------------------------------------------------------------------

+ 5
- 5
source/backend/CarlaStandalone.cpp View File

@@ -70,11 +70,6 @@ struct CarlaBackendStandalone {
engineOptions.forceStereo = false;
engineOptions.preferPluginBridges = false;
engineOptions.preferUiBridges = false;

using juce::File;
File binaryDir(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory());
engineOptions.binaryDir = carla_strdup_safe(binaryDir.getFullPathName().toRawUTF8());
engineOptions.resourceDir = carla_strdup_safe(binaryDir.getChildFile("resources").getFullPathName().toRawUTF8());
#endif
}

@@ -418,6 +413,11 @@ static void carla_engine_init_common()
gStandalone.engine->setFileCallback(gStandalone.fileCallback, gStandalone.fileCallbackPtr);

#ifdef BUILD_BRIDGE
using juce::File;
File binaryDir(File::getSpecialLocation(File::currentExecutableFile).getParentDirectory());
gStandalone.engineOptions.binaryDir = carla_strdup_safe(binaryDir.getFullPathName().toRawUTF8());
gStandalone.engineOptions.resourceDir = carla_strdup_safe(binaryDir.getChildFile("resources").getFullPathName().toRawUTF8());

if (const char* const uisAlwaysOnTop = std::getenv("ENGINE_OPTION_FORCE_STEREO"))
gStandalone.engine->setOption(CB::ENGINE_OPTION_FORCE_STEREO, (std::strcmp(uisAlwaysOnTop, "true") == 0) ? 1 : 0, nullptr);



Loading…
Cancel
Save