Browse Source

Minor tweaks as used for testing

tags/v2.3.0-RC1
falkTX 3 years ago
parent
commit
3af8d7c7ae
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 9 additions and 8 deletions
  1. +1
    -1
      Makefile
  2. +5
    -4
      data/carla-single
  3. +3
    -3
      source/bridges-plugin/CarlaBridgePlugin.cpp

+ 1
- 1
Makefile View File

@@ -440,6 +440,7 @@ stoat:
install_main: install_main:
# Create directories # Create directories
install -d $(DESTDIR)$(BINDIR) install -d $(DESTDIR)$(BINDIR)
install -d $(DESTDIR)$(DATADIR)/carla/resources
ifeq ($(LINUX),true) ifeq ($(LINUX),true)
install -d $(DESTDIR)$(LIBDIR)/carla/jack install -d $(DESTDIR)$(LIBDIR)/carla/jack
else else
@@ -465,7 +466,6 @@ ifeq ($(HAVE_PYQT),true)
install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps install -d $(DESTDIR)$(DATADIR)/icons/hicolor/256x256/apps
install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps install -d $(DESTDIR)$(DATADIR)/icons/hicolor/scalable/apps
install -d $(DESTDIR)$(DATADIR)/mime/packages install -d $(DESTDIR)$(DATADIR)/mime/packages
install -d $(DESTDIR)$(DATADIR)/carla/resources
install -d $(DESTDIR)$(DATADIR)/carla/resources/translations install -d $(DESTDIR)$(DATADIR)/carla/resources/translations
install -d $(DESTDIR)$(DATADIR)/carla/modgui install -d $(DESTDIR)$(DATADIR)/carla/modgui
install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas install -d $(DESTDIR)$(DATADIR)/carla/patchcanvas


+ 5
- 4
data/carla-single View File

@@ -76,6 +76,7 @@ if len(sys.argv) < 2:
# Initialize variables to null # Initialize variables to null


ARCH = os.getenv("CARLA_BRIDGE_PLUGIN_BINARY_TYPE", "native") ARCH = os.getenv("CARLA_BRIDGE_PLUGIN_BINARY_TYPE", "native")
TESTING = os.getenv("CARLA_BRIDGE_TESTING", None)
FORMAT = "none" FORMAT = "none"
FILENAME = "" FILENAME = ""
LABEL = "" LABEL = ""
@@ -164,7 +165,7 @@ if len(sys.argv) > arg:


BRIDGE = os.path.join(CARLA_LIBDIR, "carla-bridge-" + ARCH) BRIDGE = os.path.join(CARLA_LIBDIR, "carla-bridge-" + ARCH)


if ARCH in ("win32", "win64"):
if ARCH in ("win32", "win64") or TESTING in ("win32", "win64"):
BRIDGE = BRIDGE + ".exe" BRIDGE = BRIDGE + ".exe"


# -------------------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------------------
@@ -182,7 +183,7 @@ if not os.path.exists(CARLA_RESDIR):
# Check for existing arch binary # Check for existing arch binary


if not os.path.exists(BRIDGE): if not os.path.exists(BRIDGE):
print("Carla plugin bridge for the requested arch (%s) does not exist" % (ARCH,))
print("Carla plugin bridge (%s) for the requested arch (%s) does not exist" % (os.path.basename(BRIDGE), ARCH,))
sys.exit(2) sys.exit(2)


# -------------------------------------------------------------------------------------------------------- # --------------------------------------------------------------------------------------------------------
@@ -241,9 +242,9 @@ command = []


if os.getenv("CARLA_BRIDGE_PLUGIN_BINARY_TYPE") is not None: if os.getenv("CARLA_BRIDGE_PLUGIN_BINARY_TYPE") is not None:
BRIDGE = os.path.join(CARLA_LIBDIR, "carla-bridge-native") BRIDGE = os.path.join(CARLA_LIBDIR, "carla-bridge-native")
elif ARCH == "win32":
elif ARCH == "win32" or TESTING == "win32":
command.append("wine") command.append("wine")
elif ARCH == "win64":
elif ARCH == "win64" or TESTING == "win64":
command.append("wine64") command.append("wine64")


command.append(BRIDGE) command.append(BRIDGE)


+ 3
- 3
source/bridges-plugin/CarlaBridgePlugin.cpp View File

@@ -255,7 +255,9 @@ public:
fUsingBridge = useBridge; fUsingBridge = useBridge;
fUsingExec = true; fUsingExec = true;


if (! useBridge)
const bool testing = std::getenv("CARLA_BRIDGE_TESTING") != nullptr;

if (! useBridge && ! testing)
{ {
const CarlaPluginInfo* const pInfo = carla_get_plugin_info(gHostHandle, 0); const CarlaPluginInfo* const pInfo = carla_get_plugin_info(gHostHandle, 0);
CARLA_SAFE_ASSERT_RETURN(pInfo != nullptr,); CARLA_SAFE_ASSERT_RETURN(pInfo != nullptr,);
@@ -281,8 +283,6 @@ public:
} }


gIsInitiated = true; gIsInitiated = true;

const bool testing = std::getenv("CARLA_BRIDGE_TESTING") != nullptr;
int64_t timeToEnd = 0; int64_t timeToEnd = 0;


if (testing) if (testing)


Loading…
Cancel
Save