diff --git a/source/backend/CarlaStandalone.pro b/source/backend/CarlaStandalone.pro new file mode 100644 index 000000000..2e2153502 --- /dev/null +++ b/source/backend/CarlaStandalone.pro @@ -0,0 +1,113 @@ +# QtCreator project file + +TARGET = CarlaStandalone +TEMPLATE = app +VERSION = 1.9 + +# ------------------------------------------------------- + +CONFIG = debug +CONFIG += link_pkgconfig warn_on + +# ------------------------------------------------------- + +DEFINES = DEBUG REAL_BUILD +DEFINES += QTCREATOR_TEST + +DEFINES += HAVE_FLUIDSYNTH +DEFINES += HAVE_LINUXSAMPLER +DEFINES += HAVE_X11 +DEFINES += VESTIGE_HEADER +DEFINES += WANT_ZYNADDSUBFX +DEFINES += WANT_ZYNADDSUBFX_UI + +# ------------------------------------------------------- + +PKGCONFIG = liblo +PKGCONFIG += alsa +PKGCONFIG += fluidsynth +PKGCONFIG += linuxsampler +PKGCONFIG += x11 +PKGCONFIG += fftw3 +PKGCONFIG += mxml +PKGCONFIG += zlib +PKGCONFIG += ntk_images +PKGCONFIG += ntk + +# ------------------------------------------------------- + +LIBS = ../modules/jackbridge.a +LIBS += ../modules/juce_audio_basics.a +LIBS += ../modules/juce_audio_formats.a +LIBS += ../modules/juce_core.a +LIBS += ../modules/lilv.a +LIBS += ../modules/native-plugins.a +LIBS += ../modules/rtmempool.a +LIBS += ../modules/rtaudio.a +LIBS += ../modules/rtmidi.a +LIBS += -ldl -lm -lpthread -lrt -lmagic + +# ------------------------------------------------------- + +SOURCES = \ + CarlaStandalone.cpp + +SOURCES += \ + engine/CarlaEngine.cpp \ + engine/CarlaEngineClient.cpp \ + engine/CarlaEngineData.cpp \ + engine/CarlaEngineGraph.cpp \ + engine/CarlaEngineInternal.cpp \ + engine/CarlaEngineOsc.cpp \ + engine/CarlaEngineOscSend.cpp \ + engine/CarlaEnginePorts.cpp \ + engine/CarlaEngineThread.cpp \ + engine/CarlaEngineJack.cpp \ + engine/CarlaEngineNative.cpp \ + engine/CarlaEngineRtAudio.cpp + +SOURCES += \ + plugin/CarlaPlugin.cpp \ + plugin/CarlaPluginInternal.cpp \ + plugin/CarlaPluginThread.cpp \ + plugin/BridgePlugin.cpp \ + plugin/NativePlugin.cpp \ + plugin/LadspaPlugin.cpp \ + plugin/DssiPlugin.cpp \ + plugin/Lv2Plugin.cpp \ + plugin/VstPlugin.cpp \ + plugin/Vst3Plugin.cpp \ + plugin/AuPlugin.cpp \ + plugin/FluidSynthPlugin.cpp \ + plugin/LinuxSamplerPlugin.cpp + +SOURCES += \ + ../tests/QtCreator.cpp + +HEADERS = \ + CarlaBackend.h \ + CarlaHost.h \ + CarlaEngine.hpp \ + CarlaPlugin.hpp + +HEADERS += \ + engine/*.hpp \ + plugin/*.hpp + +HEADERS += \ + ../includes/*.h \ + ../modules/*.h \ + ../modules/*.hpp \ + ../utils/*.cpp \ + ../utils/*.hpp + +INCLUDEPATH = . \ + ../includes \ + ../modules \ + ../utils + +# ------------------------------------------------------- + +QMAKE_CXXFLAGS *= -std=c++11 + +# ------------------------------------------------------- diff --git a/source/tests/QtCreator.cpp b/source/tests/QtCreator.cpp new file mode 100644 index 000000000..742b98b7e --- /dev/null +++ b/source/tests/QtCreator.cpp @@ -0,0 +1,30 @@ +/* + * Carla Print Tests + * Copyright (C) 2013-2014 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. + */ + +#include "CarlaHost.h" + +// ----------------------------------------------------------------------- + +int main() +{ + carla_engine_init("JACK", "Test"); + carla_engine_idle(); + carla_engine_close(); + return 0; +} + +// ----------------------------------------------------------------------- diff --git a/source/utils/CarlaUtils.hpp b/source/utils/CarlaUtils.hpp index 2381cdeed..00dd58db7 100644 --- a/source/utils/CarlaUtils.hpp +++ b/source/utils/CarlaUtils.hpp @@ -82,9 +82,15 @@ void carla_debug(const char* const fmt, ...) noexcept try { ::va_list args; ::va_start(args, fmt); +#ifndef QTCREATOR_TEST std::fprintf(stdout, "\x1b[30;1m"); +#endif std::vfprintf(stdout, fmt, args); +#ifndef QTCREATOR_TEST std::fprintf(stdout, "\x1b[0m\n"); +#else + std::fprintf(stdout, "\n"); +#endif ::va_end(args); } catch (...) {} } @@ -129,9 +135,15 @@ void carla_stderr2(const char* const fmt, ...) noexcept try { ::va_list args; ::va_start(args, fmt); +#ifndef QTCREATOR_TEST std::fprintf(stderr, "\x1b[31m"); +#endif std::vfprintf(stderr, fmt, args); +#ifndef QTCREATOR_TEST std::fprintf(stderr, "\x1b[0m\n"); +#else + std::fprintf(stderr, "\n"); +#endif ::va_end(args); } catch (...) {} }