| @@ -126,43 +126,43 @@ source/dist/ | |||||
| # python files in plugin resources dir | # python files in plugin resources dir | ||||
| bin/resources/*.py | bin/resources/*.py | ||||
| source/modules/native-plugins/resources/*.py | |||||
| source/native-plugins/resources/*.py | |||||
| # zynaddsubfx | # zynaddsubfx | ||||
| source/modules/native-plugins/zynaddsubfx/Output/ | |||||
| source/modules/native-plugins/zynaddsubfx/Tests/ | |||||
| source/modules/native-plugins/zynaddsubfx/UI/ADnoteUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/ADnoteUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/BankUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/BankUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/ConfigUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/ConfigUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/EffUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/EffUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/EnvelopeUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/EnvelopeUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/FilterUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/FilterUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/LFOUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/LFOUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/MasterUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/MasterUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/MicrotonalUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/MicrotonalUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/OscilGenUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/OscilGenUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/PADnoteUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/PADnoteUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/PartUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/PartUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/PresetsUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/PresetsUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/ResonanceUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/ResonanceUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/SUBnoteUI.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/SUBnoteUI.h | |||||
| source/modules/native-plugins/zynaddsubfx/UI/VirKeyboard.cpp | |||||
| source/modules/native-plugins/zynaddsubfx/UI/VirKeyboard.h | |||||
| source/native-plugins/zynaddsubfx/Output/ | |||||
| source/native-plugins/zynaddsubfx/Tests/ | |||||
| source/native-plugins/zynaddsubfx/UI/ADnoteUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/ADnoteUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/BankUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/BankUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/ConfigUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/ConfigUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/EffUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/EffUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/EnvelopeUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/EnvelopeUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/FilterUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/FilterUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/LFOUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/LFOUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/MasterUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/MasterUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/MicrotonalUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/MicrotonalUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/OscilGenUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/OscilGenUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/PADnoteUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/PADnoteUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/PartUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/PartUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/PresetsUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/PresetsUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/ResonanceUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/ResonanceUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/SUBnoteUI.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/SUBnoteUI.h | |||||
| source/native-plugins/zynaddsubfx/UI/VirKeyboard.cpp | |||||
| source/native-plugins/zynaddsubfx/UI/VirKeyboard.h | |||||
| # Other | # Other | ||||
| source/includes/asio/ | source/includes/asio/ | ||||
| @@ -26,10 +26,8 @@ DESTDIR := | |||||
| BINDIR := $(CURDIR)/bin | BINDIR := $(CURDIR)/bin | ||||
| ifeq ($(DEBUG),true) | ifeq ($(DEBUG),true) | ||||
| OBJDIR := $(CURDIR)/build/backend/Debug | |||||
| MODULEDIR := $(CURDIR)/build/modules/Debug | MODULEDIR := $(CURDIR)/build/modules/Debug | ||||
| else | else | ||||
| OBJDIR := $(CURDIR)/build/backend/Release | |||||
| MODULEDIR := $(CURDIR)/build/modules/Release | MODULEDIR := $(CURDIR)/build/modules/Release | ||||
| endif | endif | ||||
| @@ -48,11 +46,11 @@ ALL_LIBS = $(MODULEDIR)/carla_engine.a | |||||
| ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a | ALL_LIBS += $(MODULEDIR)/carla_engine_plugin.a | ||||
| ALL_LIBS += $(MODULEDIR)/carla_plugin.a | ALL_LIBS += $(MODULEDIR)/carla_plugin.a | ||||
| ALL_LIBS += $(MODULEDIR)/jackbridge.a | ALL_LIBS += $(MODULEDIR)/jackbridge.a | ||||
| ALL_LIBS += $(MODULEDIR)/native-plugins.a | |||||
| ALL_LIBS += $(MODULEDIR)/juce_audio_basics.a | ALL_LIBS += $(MODULEDIR)/juce_audio_basics.a | ||||
| ALL_LIBS += $(MODULEDIR)/juce_audio_formats.a | ALL_LIBS += $(MODULEDIR)/juce_audio_formats.a | ||||
| ALL_LIBS += $(MODULEDIR)/juce_core.a | ALL_LIBS += $(MODULEDIR)/juce_core.a | ||||
| ALL_LIBS += $(MODULEDIR)/lilv.a | ALL_LIBS += $(MODULEDIR)/lilv.a | ||||
| ALL_LIBS += $(MODULEDIR)/native-plugins.a | |||||
| ALL_LIBS += $(MODULEDIR)/rtmempool.a | ALL_LIBS += $(MODULEDIR)/rtmempool.a | ||||
| ifeq ($(MACOS_OR_WIN32),true) | ifeq ($(MACOS_OR_WIN32),true) | ||||
| @@ -89,36 +87,36 @@ $(MODULEDIR)/carla_engine_plugin.a: $(MODULEDIR)/carla_engine.a | |||||
| $(MODULEDIR)/carla_plugin.a: .FORCE | $(MODULEDIR)/carla_plugin.a: .FORCE | ||||
| @$(MAKE) -C source/backend/plugin | @$(MAKE) -C source/backend/plugin | ||||
| $(MODULEDIR)/%.qt4.a: .FORCE | |||||
| @$(MAKE) -C source/modules/$* qt4 | |||||
| $(MODULEDIR)/jackbridge.a: .FORCE | |||||
| @$(MAKE) -C source/jackbridge | |||||
| $(MODULEDIR)/jackbridge.%.a: .FORCE | |||||
| @$(MAKE) -C source/jackbridge $* | |||||
| $(MODULEDIR)/native-plugins.a: .FORCE | |||||
| @$(MAKE) -C source/native-plugins | |||||
| $(MODULEDIR)/theme.a: .FORCE | |||||
| @$(MAKE) -C source/theme | |||||
| $(MODULEDIR)/%.qt5.a: .FORCE | |||||
| @$(MAKE) -C source/modules/$* qt5 | |||||
| $(MODULEDIR)/theme.qt4.a: .FORCE | |||||
| @$(MAKE) -C source/theme qt4 | |||||
| $(MODULEDIR)/theme.qt5.a: .FORCE | |||||
| @$(MAKE) -C source/theme qt5 | |||||
| $(MODULEDIR)/%.posix32.a: .FORCE | $(MODULEDIR)/%.posix32.a: .FORCE | ||||
| @$(MAKE) -C source/modules/$* posix32 | @$(MAKE) -C source/modules/$* posix32 | ||||
| $(MODULEDIR)/%.posix32e.a: .FORCE | |||||
| @$(MAKE) -C source/modules/$* posix32e | |||||
| $(MODULEDIR)/%.posix64.a: .FORCE | $(MODULEDIR)/%.posix64.a: .FORCE | ||||
| @$(MAKE) -C source/modules/$* posix64 | @$(MAKE) -C source/modules/$* posix64 | ||||
| $(MODULEDIR)/%.posix64e.a: .FORCE | |||||
| @$(MAKE) -C source/modules/$* posix64e | |||||
| $(MODULEDIR)/%.win32.a: .FORCE | $(MODULEDIR)/%.win32.a: .FORCE | ||||
| @$(MAKE) -C source/modules/$* win32 | @$(MAKE) -C source/modules/$* win32 | ||||
| $(MODULEDIR)/%.win32e.a: .FORCE | |||||
| @$(MAKE) -C source/modules/$* win32e | |||||
| $(MODULEDIR)/%.win64.a: .FORCE | $(MODULEDIR)/%.win64.a: .FORCE | ||||
| @$(MAKE) -C source/modules/$* win64 | @$(MAKE) -C source/modules/$* win64 | ||||
| $(MODULEDIR)/%.win64e.a: .FORCE | |||||
| @$(MAKE) -C source/modules/$* win64e | |||||
| $(MODULEDIR)/%.a: .FORCE | $(MODULEDIR)/%.a: .FORCE | ||||
| @$(MAKE) -C source/modules/$* | @$(MAKE) -C source/modules/$* | ||||
| @@ -148,7 +146,7 @@ plugin: backend bridges-plugin bridges-ui discovery | |||||
| ifeq ($(HAVE_QT),true) | ifeq ($(HAVE_QT),true) | ||||
| theme: | theme: | ||||
| @$(MAKE) -C source/modules/theme | |||||
| @$(MAKE) -C source/theme | |||||
| else | else | ||||
| theme: | theme: | ||||
| endif | endif | ||||
| @@ -1 +1 @@ | |||||
| ../source/modules/native-plugins/resources/ | |||||
| ../source/native-plugins/resources | |||||
| @@ -118,13 +118,12 @@ endif | |||||
| # Strict test build | # Strict test build | ||||
| ifeq ($(TESTBUILD),true) | ifeq ($(TESTBUILD),true) | ||||
| BASE_FLAGS += -Werror -Wabi -Wcast-qual -Wclobbered -Wconversion -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Winline -Wmissing-declarations | |||||
| BASE_FLAGS += -Woverlength-strings -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wswitch-default -Wundef -Wuninitialized -Wunused | |||||
| BASE_FLAGS += -Wstack-protector -fstack-protector | |||||
| BASE_FLAGS += -Werror -Wabi -Wcast-qual -Wclobbered -Wconversion -Wdisabled-optimization -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-declarations | |||||
| BASE_FLAGS += -Woverlength-strings -Wpointer-arith -Wredundant-decls -Wshadow -Wsign-conversion -Wundef -Wuninitialized -Wunused | |||||
| BASE_FLAGS += -Wstrict-aliasing -fstrict-aliasing | BASE_FLAGS += -Wstrict-aliasing -fstrict-aliasing | ||||
| BASE_FLAGS += -Wstrict-overflow -fstrict-overflow | BASE_FLAGS += -Wstrict-overflow -fstrict-overflow | ||||
| CFLAGS += -Wbad-function-cast -Wc++-compat -Wc++0x-compat -Wc++11-compat -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wunsuffixed-float-constants -Wwrite-strings | |||||
| CXXFLAGS += -Weffc++ -Wnon-virtual-dtor -Woverloaded-virtual -Wuseless-cast -Wzero-as-null-pointer-constant | |||||
| CFLAGS += -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes -Wwrite-strings | |||||
| CXXFLAGS += -Wc++0x-compat -Wc++11-compat -Weffc++ -Wnon-virtual-dtor -Woverloaded-virtual -Wzero-as-null-pointer-constant | |||||
| ifeq ($(LINUX),true) | ifeq ($(LINUX),true) | ||||
| BASE_FLAGS += -isystem /opt/kxstudio/include | BASE_FLAGS += -isystem /opt/kxstudio/include | ||||
| CXXFLAGS += -isystem /opt/kxstudio/include/ntk | CXXFLAGS += -isystem /opt/kxstudio/include/ntk | ||||
| @@ -24,7 +24,7 @@ endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += -I. -I.. -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||||
| BUILD_CXX_FLAGS += -I. -I.. -I$(CWD) -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||||
| BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | ||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -459,7 +459,7 @@ int main(int argc, char* argv[]) | |||||
| if (label == nullptr) | if (label == nullptr) | ||||
| label = clientName; | label = clientName; | ||||
| if (std::strstr(label, " (16 outs)") == 0) | |||||
| if (std::strstr(label, " (16 outs)") != nullptr) | |||||
| extraStuff = "true"; | extraStuff = "true"; | ||||
| } | } | ||||
| @@ -22,7 +22,7 @@ endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||||
| BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin | BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin | ||||
| BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | ||||
| @@ -165,7 +165,7 @@ protected: | |||||
| #ifdef CARLA_OS_LINUX | #ifdef CARLA_OS_LINUX | ||||
| if (const char* const winIdStr = std::getenv("ENGINE_OPTION_FRONTEND_WIN_ID")) | if (const char* const winIdStr = std::getenv("ENGINE_OPTION_FRONTEND_WIN_ID")) | ||||
| if (const long long winId = std::strtoll(winIdStr, nullptr, 16)) | if (const long long winId = std::strtoll(winIdStr, nullptr, 16)) | ||||
| setTransient(winId); | |||||
| setTransient(static_cast<uintptr_t>(winId)); | |||||
| #endif | #endif | ||||
| } | } | ||||
| @@ -22,7 +22,7 @@ endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||||
| BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||||
| BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | BUILD_CXX_FLAGS += $(LIBLO_FLAGS) | ||||
| BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2 | BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2 | ||||
| @@ -43,10 +43,10 @@ LINK_LV2_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl | |||||
| BUILD_LV2_GTK3_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0) | BUILD_LV2_GTK3_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0) | ||||
| LINK_LV2_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl | LINK_LV2_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl | ||||
| BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) -I$(OBJDIR) -I$(CWD)/modules/theme | |||||
| BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui) -I$(OBJDIR) -I$(CWD)/theme | |||||
| LINK_LV2_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl | LINK_LV2_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl | ||||
| BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -I$(OBJDIR) -I$(CWD)/modules/theme | |||||
| BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets) -I$(OBJDIR) -I$(CWD)/theme | |||||
| LINK_LV2_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | LINK_LV2_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl | ||||
| BUILD_LV2_X11_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 $(X11_FLAGS) | BUILD_LV2_X11_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 $(X11_FLAGS) | ||||
| @@ -28,7 +28,7 @@ endif | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils | |||||
| BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules | |||||
| BUILD_CXX_FLAGS += -I$(CWD)/includes/vst2 -I$(CWD)/includes/vst3 | BUILD_CXX_FLAGS += -I$(CWD)/includes/vst2 -I$(CWD)/includes/vst3 | ||||
| ifeq ($(CARLA_VESTIGE_HEADER),true) | ifeq ($(CARLA_VESTIGE_HEADER),true) | ||||
| @@ -1,63 +0,0 @@ | |||||
| # QtCreator project file | |||||
| QT = core gui widgets | |||||
| TARGET = carla-frontend | |||||
| TEMPLATE = app | |||||
| VERSION = 1.9.4 | |||||
| # ------------------------------------------------------- | |||||
| CONFIG = debug | |||||
| CONFIG += qt resources warn_on | |||||
| DEFINES = DEBUG | |||||
| DEFINES += REAL_BUILD | |||||
| # ------------------------------------------------------- | |||||
| SOURCES = \ | |||||
| carla_host.cpp \ | |||||
| carla_shared.cpp \ | |||||
| carla_style.cpp | |||||
| HEADERS += \ | |||||
| carla_shared.hpp \ | |||||
| carla_style.hpp | |||||
| RESOURCES = ../../resources/resources.qrc | |||||
| # ------------------------------------------------------- | |||||
| HEADERS += \ | |||||
| ../includes/CarlaDefines.h | |||||
| HEADERS += \ | |||||
| ../backend/CarlaBackend.h \ | |||||
| ../backend/CarlaHost.h | |||||
| # ------------------------------------------------------- | |||||
| INCLUDEPATH = \ | |||||
| ../backend \ | |||||
| ../includes \ | |||||
| ../modules \ | |||||
| ../utils | |||||
| # ------------------------------------------------------- | |||||
| LIBS = ../modules/theme.qt5.a | |||||
| LIBS += -L../../bin -lcarla_standalone2 | |||||
| # ------------------------------------------------------- | |||||
| QMAKE_CXXFLAGS += -Wall -Wextra -pipe | |||||
| QMAKE_CXXFLAGS += -Werror -Wcast-align -Wcast-qual -Wconversion -Wformat-security -Wredundant-decls -Wshadow -Wstrict-overflow -fstrict-overflow -Wundef -Wunsafe-loop-optimizations -Wwrite-strings | |||||
| QMAKE_CXXFLAGS += -Wnon-virtual-dtor -Woverloaded-virtual | |||||
| QMAKE_CXXFLAGS += -Wlogical-op -Wsign-conversion | |||||
| # -Wmissing-declarations | |||||
| QMAKE_CXXFLAGS += -O0 -g | |||||
| QMAKE_CXXFLAGS += -std=c++0x -std=gnu++0x | |||||
| QMAKE_CXXFLAGS += -isystem /opt/kxstudio/include -isystem /usr/include/qt5 | |||||
| # ------------------------------------------------------- | |||||
| @@ -1,28 +0,0 @@ | |||||
| /* | |||||
| * Carla host code | |||||
| * Copyright (C) 2011-2014 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. | |||||
| */ | |||||
| #include "carla_shared.hpp" | |||||
| #include "carla_style.hpp" | |||||
| int main(int argc, char* argv[]) | |||||
| { | |||||
| CarlaApplication app(argc, argv); | |||||
| initHost("TestApp"); | |||||
| return 0; | |||||
| } | |||||
| @@ -1,619 +0,0 @@ | |||||
| /* | |||||
| * Common Carla code | |||||
| * Copyright (C) 2011-2014 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. | |||||
| */ | |||||
| #include "carla_shared.hpp" | |||||
| #include <QtCore/QDir> | |||||
| #include <QtCore/QFile> | |||||
| #include <QtWidgets/QFileDialog> | |||||
| #include <QtWidgets/QLineEdit> | |||||
| //#ifdef CARLA_OS_MAC | |||||
| //#endif | |||||
| CARLA_BACKEND_USE_NAMESPACE | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Misc functions | |||||
| static | |||||
| QString getenvWithFallback(const char* const key, const QString& fallback) | |||||
| { | |||||
| if (const char* const value = std::getenv(key)) | |||||
| return key; | |||||
| return fallback; | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Global objects | |||||
| QString TMP; | |||||
| QString HOME; | |||||
| QStringList PATH; | |||||
| QStringList MIDI_CC_LIST; | |||||
| CarlaObject gCarla; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // init | |||||
| static | |||||
| void init() | |||||
| { | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Platform specific stuff | |||||
| #if defined(CARLA_OS_MAC) | |||||
| qt_mac_set_menubar_icons(false); | |||||
| #elif defined(CARLA_OS_WIN) | |||||
| QString WINDIR = std::getenv("WINDIR"); | |||||
| #endif | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Set TMP | |||||
| const char* const envTMP = std::getenv("TMP"); | |||||
| if (envTMP == nullptr) | |||||
| { | |||||
| #ifdef CARLA_OS_WIN | |||||
| qWarning("TMP variable not set"); | |||||
| #endif | |||||
| TMP = QDir::tempPath(); | |||||
| } | |||||
| else | |||||
| TMP = envTMP; | |||||
| if (! QDir(TMP).exists()) | |||||
| { | |||||
| qWarning("TMP does not exist"); | |||||
| TMP = "/"; | |||||
| } | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Set HOME | |||||
| const char* const envHOME = std::getenv("HOME"); | |||||
| if (envHOME == nullptr) | |||||
| { | |||||
| #if defined(CARLA_OS_LINUX) || defined(CARLA_OS_MAC) | |||||
| qWarning("HOME variable not set"); | |||||
| #endif | |||||
| HOME = QDir::homePath(); | |||||
| } | |||||
| else | |||||
| HOME = envHOME; | |||||
| if (! QDir(HOME).exists()) | |||||
| { | |||||
| qWarning("HOME does not exist"); | |||||
| HOME = TMP; | |||||
| } | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Set PATH | |||||
| const char* const envPATH = std::getenv("PATH"); | |||||
| if (envPATH == nullptr) | |||||
| { | |||||
| qWarning("PATH variable not set"); | |||||
| PATH.clear(); | |||||
| #if defined(CARLA_OS_MAC) | |||||
| PATH << "/opt/local/bin"; | |||||
| PATH << "/usr/local/bin"; | |||||
| PATH << "/usr/bin"; | |||||
| PATH << "/bin"; | |||||
| #elif defined(CARLA_OS_WIN) | |||||
| PATH << QDir(WINDIR).filePath("system32"); | |||||
| PATH << WINDIR; | |||||
| #else | |||||
| PATH << "/usr/local/bin"; | |||||
| PATH << "/usr/bin"; | |||||
| PATH << "/bin"; | |||||
| #endif | |||||
| } | |||||
| else | |||||
| { | |||||
| #ifdef CARLA_OS_WIN | |||||
| PATH = QString(envPATH).split(":"); | |||||
| #else | |||||
| PATH = QString(envPATH).split(";"); | |||||
| #endif | |||||
| } | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Static MIDI CC list | |||||
| MIDI_CC_LIST.clear(); | |||||
| MIDI_CC_LIST << "0x01 Modulation"; | |||||
| MIDI_CC_LIST << "0x02 Breath"; | |||||
| MIDI_CC_LIST << "0x03 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x04 Foot"; | |||||
| MIDI_CC_LIST << "0x05 Portamento"; | |||||
| MIDI_CC_LIST << "0x07 Volume"; | |||||
| MIDI_CC_LIST << "0x08 Balance"; | |||||
| MIDI_CC_LIST << "0x09 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x0A Pan"; | |||||
| MIDI_CC_LIST << "0x0B Expression"; | |||||
| MIDI_CC_LIST << "0x0C FX Control 1"; | |||||
| MIDI_CC_LIST << "0x0D FX Control 2"; | |||||
| MIDI_CC_LIST << "0x0E (Undefined)"; | |||||
| MIDI_CC_LIST << "0x0F (Undefined)"; | |||||
| MIDI_CC_LIST << "0x10 General Purpose 1"; | |||||
| MIDI_CC_LIST << "0x11 General Purpose 2"; | |||||
| MIDI_CC_LIST << "0x12 General Purpose 3"; | |||||
| MIDI_CC_LIST << "0x13 General Purpose 4"; | |||||
| MIDI_CC_LIST << "0x14 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x15 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x16 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x17 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x18 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x19 (Undefined)"; | |||||
| MIDI_CC_LIST << "0x1A (Undefined)"; | |||||
| MIDI_CC_LIST << "0x1B (Undefined)"; | |||||
| MIDI_CC_LIST << "0x1C (Undefined)"; | |||||
| MIDI_CC_LIST << "0x1D (Undefined)"; | |||||
| MIDI_CC_LIST << "0x1E (Undefined)"; | |||||
| MIDI_CC_LIST << "0x1F (Undefined)"; | |||||
| MIDI_CC_LIST << "0x46 Control 1 [Variation]"; | |||||
| MIDI_CC_LIST << "0x47 Control 2 [Timbre]"; | |||||
| MIDI_CC_LIST << "0x48 Control 3 [Release]"; | |||||
| MIDI_CC_LIST << "0x49 Control 4 [Attack]"; | |||||
| MIDI_CC_LIST << "0x4A Control 5 [Brightness]"; | |||||
| MIDI_CC_LIST << "0x4B Control 6 [Decay]"; | |||||
| MIDI_CC_LIST << "0x4C Control 7 [Vib Rate]"; | |||||
| MIDI_CC_LIST << "0x4D Control 8 [Vib Depth]"; | |||||
| MIDI_CC_LIST << "0x4E Control 9 [Vib Delay]"; | |||||
| MIDI_CC_LIST << "0x4F Control 10 [Undefined]"; | |||||
| MIDI_CC_LIST << "0x50 General Purpose 5"; | |||||
| MIDI_CC_LIST << "0x51 General Purpose 6"; | |||||
| MIDI_CC_LIST << "0x52 General Purpose 7"; | |||||
| MIDI_CC_LIST << "0x53 General Purpose 8"; | |||||
| MIDI_CC_LIST << "0x54 Portamento Control"; | |||||
| MIDI_CC_LIST << "0x5B FX 1 Depth [Reverb]"; | |||||
| MIDI_CC_LIST << "0x5C FX 2 Depth [Tremolo]"; | |||||
| MIDI_CC_LIST << "0x5D FX 3 Depth [Chorus]"; | |||||
| MIDI_CC_LIST << "0x5E FX 4 Depth [Detune]"; | |||||
| MIDI_CC_LIST << "0x5F FX 5 Depth [Phaser]"; | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Global Carla object | |||||
| gCarla.host = nullptr; | |||||
| gCarla.gui = nullptr; | |||||
| gCarla.isControl = false; | |||||
| gCarla.isLocal = true; | |||||
| gCarla.isPlugin = false; | |||||
| gCarla.bufferSize = 0; | |||||
| gCarla.sampleRate = 0.0; | |||||
| #ifdef CARLA_OS_LINUX | |||||
| gCarla.processMode = CarlaBackend::ENGINE_PROCESS_MODE_MULTIPLE_CLIENTS; | |||||
| #else | |||||
| gCarla.processMode = CarlaBackend::ENGINE_PROCESS_MODE_CONTINUOUS_RACK; | |||||
| #endif | |||||
| gCarla.processModeForced = false; | |||||
| #ifdef CARLA_OS_LINUX | |||||
| gCarla.transportMode = CarlaBackend::ENGINE_TRANSPORT_MODE_JACK; | |||||
| #else | |||||
| gCarla.transportMode = CarlaBackend::ENGINE_TRANSPORT_MODE_INTERNAL; | |||||
| #endif | |||||
| gCarla.maxParameters = CarlaBackend::MAX_DEFAULT_PARAMETERS; | |||||
| gCarla.pathBinaries = ""; | |||||
| gCarla.pathResources = ""; | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Default Plugin Folders (get) | |||||
| QString splitter; | |||||
| QString DEFAULT_LADSPA_PATH, DEFAULT_DSSI_PATH, DEFAULT_LV2_PATH, DEFAULT_VST_PATH, DEFAULT_VST3_PATH, DEFAULT_AU_PATH; | |||||
| QString DEFAULT_GIG_PATH, DEFAULT_SF2_PATH, DEFAULT_SFZ_PATH; | |||||
| #if defined(CARLA_OS_WIN) | |||||
| splitter = ";"; | |||||
| const char* const envAPPDATA = std::getenv("APPDATA"); | |||||
| const char* const envPROGRAMFILES = std::getenv("PROGRAMFILES"); | |||||
| const char* const envPROGRAMFILESx86 = std::getenv("PROGRAMFILES(x86)"); | |||||
| const char* const envCOMMONPROGRAMFILES = std::getenv("COMMONPROGRAMFILES"); | |||||
| // Small integrity tests | |||||
| if (envAPPDATA == nullptr) | |||||
| { | |||||
| qFatal("APPDATA variable not set, cannot continue"); | |||||
| std::exit(1); | |||||
| } | |||||
| if (envPROGRAMFILES == nullptr) | |||||
| { | |||||
| qFatal("PROGRAMFILES variable not set, cannot continue"); | |||||
| std::exit(1); | |||||
| } | |||||
| if (envCOMMONPROGRAMFILES == nullptr) | |||||
| { | |||||
| qFatal("COMMONPROGRAMFILES variable not set, cannot continue"); | |||||
| std::exit(1); | |||||
| } | |||||
| QString APPDATA(envAPPDATA); | |||||
| QString PROGRAMFILES(envPROGRAMFILES); | |||||
| QString COMMONPROGRAMFILES(envCOMMONPROGRAMFILES); | |||||
| DEFAULT_LADSPA_PATH = APPDATA + "\\LADSPA"; | |||||
| DEFAULT_LADSPA_PATH += ";" + PROGRAMFILES + "\\LADSPA"; | |||||
| DEFAULT_DSSI_PATH = APPDATA + "\\DSSI"; | |||||
| DEFAULT_DSSI_PATH += ";" + PROGRAMFILES + "\\DSSI"; | |||||
| DEFAULT_LV2_PATH = APPDATA + "\\LV2"; | |||||
| DEFAULT_LV2_PATH += ";" + COMMONPROGRAMFILES + "\\LV2"; | |||||
| DEFAULT_VST_PATH = PROGRAMFILES + "\\VstPlugins"; | |||||
| DEFAULT_VST_PATH += ";" + PROGRAMFILES + "\\Steinberg\\VstPlugins"; | |||||
| DEFAULT_VST3_PATH = PROGRAMFILES + "\\Vst3"; | |||||
| DEFAULT_GIG_PATH = APPDATA + "\\GIG"; | |||||
| DEFAULT_SF2_PATH = APPDATA + "\\SF2"; | |||||
| DEFAULT_SFZ_PATH = APPDATA + "\\SFZ"; | |||||
| if (envPROGRAMFILESx86 != nullptr) | |||||
| { | |||||
| QString PROGRAMFILESx86(envPROGRAMFILESx86); | |||||
| DEFAULT_LADSPA_PATH += ";" + PROGRAMFILESx86 + "\\LADSPA"; | |||||
| DEFAULT_DSSI_PATH += ";" + PROGRAMFILESx86 + "\\DSSI"; | |||||
| DEFAULT_VST_PATH += ";" + PROGRAMFILESx86 + "\\VstPlugins"; | |||||
| DEFAULT_VST_PATH += ";" + PROGRAMFILESx86 + "\\Steinberg\\VstPlugins"; | |||||
| } | |||||
| #elif defined(CARLA_OS_HAIKU) | |||||
| splitter = ":"; | |||||
| DEFAULT_LADSPA_PATH = HOME + "/.ladspa"; | |||||
| DEFAULT_LADSPA_PATH += ":/boot/common/add-ons/ladspa"; | |||||
| DEFAULT_DSSI_PATH = HOME + "/.dssi"; | |||||
| DEFAULT_DSSI_PATH += ":/boot/common/add-ons/dssi"; | |||||
| DEFAULT_LV2_PATH = HOME + "/.lv2"; | |||||
| DEFAULT_LV2_PATH += ":/boot/common/add-ons/lv2"; | |||||
| DEFAULT_VST_PATH = HOME + "/.vst"; | |||||
| DEFAULT_VST_PATH += ":/boot/common/add-ons/vst"; | |||||
| DEFAULT_VST3_PATH = HOME + "/.vst3"; | |||||
| DEFAULT_VST3_PATH += ":/boot/common/add-ons/vst3"; | |||||
| #elif defined(CARLA_OS_MAC) | |||||
| splitter = ":"; | |||||
| DEFAULT_LADSPA_PATH = HOME + "/Library/Audio/Plug-Ins/LADSPA"; | |||||
| DEFAULT_LADSPA_PATH += ":/Library/Audio/Plug-Ins/LADSPA"; | |||||
| DEFAULT_DSSI_PATH = HOME + "/Library/Audio/Plug-Ins/DSSI"; | |||||
| DEFAULT_DSSI_PATH += ":/Library/Audio/Plug-Ins/DSSI"; | |||||
| DEFAULT_LV2_PATH = HOME + "/Library/Audio/Plug-Ins/LV2"; | |||||
| DEFAULT_LV2_PATH += ":/Library/Audio/Plug-Ins/LV2"; | |||||
| DEFAULT_VST_PATH = HOME + "/Library/Audio/Plug-Ins/VST"; | |||||
| DEFAULT_VST_PATH += ":/Library/Audio/Plug-Ins/VST"; | |||||
| DEFAULT_VST3_PATH = HOME + "/Library/Audio/Plug-Ins/VST3"; | |||||
| DEFAULT_VST3_PATH += ":/Library/Audio/Plug-Ins/VST3"; | |||||
| DEFAULT_AU_PATH = HOME + "/Library/Audio/Plug-Ins/Components"; | |||||
| DEFAULT_AU_PATH += ":/Library/Audio/Plug-Ins/Components"; | |||||
| #else | |||||
| splitter = ":"; | |||||
| DEFAULT_LADSPA_PATH = HOME + "/.ladspa"; | |||||
| DEFAULT_LADSPA_PATH += ":/usr/lib/ladspa"; | |||||
| DEFAULT_LADSPA_PATH += ":/usr/local/lib/ladspa"; | |||||
| DEFAULT_DSSI_PATH = HOME + "/.dssi"; | |||||
| DEFAULT_DSSI_PATH += ":/usr/lib/dssi"; | |||||
| DEFAULT_DSSI_PATH += ":/usr/local/lib/dssi"; | |||||
| DEFAULT_LV2_PATH = HOME + "/.lv2"; | |||||
| DEFAULT_LV2_PATH += ":/usr/lib/lv2"; | |||||
| DEFAULT_LV2_PATH += ":/usr/local/lib/lv2"; | |||||
| DEFAULT_VST_PATH = HOME + "/.vst"; | |||||
| DEFAULT_VST_PATH += ":/usr/lib/vst"; | |||||
| DEFAULT_VST_PATH += ":/usr/local/lib/vst"; | |||||
| DEFAULT_VST3_PATH = HOME + "/.vst3"; | |||||
| DEFAULT_VST3_PATH += ":/usr/lib/vst3"; | |||||
| DEFAULT_VST3_PATH += ":/usr/local/lib/vst3"; | |||||
| DEFAULT_GIG_PATH = HOME + "/.sounds/gig"; | |||||
| DEFAULT_GIG_PATH += ":/usr/share/sounds/gig"; | |||||
| DEFAULT_SF2_PATH = HOME + "/.sounds/sf2"; | |||||
| DEFAULT_SF2_PATH += ":/usr/share/sounds/sf2"; | |||||
| DEFAULT_SFZ_PATH = HOME + "/.sounds/sfz"; | |||||
| DEFAULT_SFZ_PATH += ":/usr/share/sounds/sfz"; | |||||
| #endif | |||||
| #ifndef CARLA_OS_WIN | |||||
| QString winePrefix = std::getenv("WINEPREFIX"); | |||||
| if (winePrefix.isEmpty()) | |||||
| winePrefix = HOME + "/.wine"; | |||||
| if (QDir(winePrefix).exists()) | |||||
| { | |||||
| DEFAULT_VST_PATH += ":" + winePrefix + "/drive_c/Program Files/VstPlugins"; | |||||
| DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3"; | |||||
| # if defined (__LP64__) || defined (_LP64) | |||||
| if (QDir(winePrefix + "/drive_c/Program Files (x86)").exists()) | |||||
| { | |||||
| DEFAULT_VST_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins"; | |||||
| DEFAULT_VST3_PATH += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3"; | |||||
| } | |||||
| # endif | |||||
| } | |||||
| #endif | |||||
| // -------------------------------------------------------------------------------------------------------- | |||||
| // Default Plugin Folders (set) | |||||
| bool readEnvVars = true; | |||||
| #if 0 //def CARLA_OS_WIN | |||||
| // Check if running Wine. If yes, ignore env vars | |||||
| from winreg import ConnectRegistry, OpenKey, CloseKey, HKEY_CURRENT_USER; | |||||
| reg = ConnectRegistry(None, HKEY_CURRENT_USER); | |||||
| key = OpenKey(reg, r"SOFTWARE\Wine"); | |||||
| CloseKey(key); | |||||
| readEnvVars = False; | |||||
| CloseKey(reg); | |||||
| #endif | |||||
| if (readEnvVars) | |||||
| { | |||||
| gCarla.DEFAULT_LADSPA_PATH = getenvWithFallback("LADSPA_PATH", DEFAULT_LADSPA_PATH).split(splitter); | |||||
| gCarla.DEFAULT_DSSI_PATH = getenvWithFallback("DSSI_PATH", DEFAULT_DSSI_PATH).split(splitter); | |||||
| gCarla.DEFAULT_LV2_PATH = getenvWithFallback("LV2_PATH", DEFAULT_LV2_PATH).split(splitter); | |||||
| gCarla.DEFAULT_VST_PATH = getenvWithFallback("VST_PATH", DEFAULT_VST_PATH).split(splitter); | |||||
| gCarla.DEFAULT_VST3_PATH = getenvWithFallback("VST3_PATH", DEFAULT_VST3_PATH).split(splitter); | |||||
| gCarla.DEFAULT_AU_PATH = getenvWithFallback("AU_PATH", DEFAULT_AU_PATH).split(splitter); | |||||
| gCarla.DEFAULT_GIG_PATH = getenvWithFallback("GIG_PATH", DEFAULT_GIG_PATH).split(splitter); | |||||
| gCarla.DEFAULT_SF2_PATH = getenvWithFallback("SF2_PATH", DEFAULT_SF2_PATH).split(splitter); | |||||
| gCarla.DEFAULT_SFZ_PATH = getenvWithFallback("SFZ_PATH", DEFAULT_SFZ_PATH).split(splitter); | |||||
| } | |||||
| else | |||||
| { | |||||
| gCarla.DEFAULT_LADSPA_PATH = DEFAULT_LADSPA_PATH.split(splitter); | |||||
| gCarla.DEFAULT_DSSI_PATH = DEFAULT_DSSI_PATH.split(splitter); | |||||
| gCarla.DEFAULT_LV2_PATH = DEFAULT_LV2_PATH.split(splitter); | |||||
| gCarla.DEFAULT_VST_PATH = DEFAULT_VST_PATH.split(splitter); | |||||
| gCarla.DEFAULT_VST3_PATH = DEFAULT_VST3_PATH.split(splitter); | |||||
| gCarla.DEFAULT_AU_PATH = DEFAULT_AU_PATH.split(splitter); | |||||
| gCarla.DEFAULT_GIG_PATH = DEFAULT_GIG_PATH.split(splitter); | |||||
| gCarla.DEFAULT_SF2_PATH = DEFAULT_SF2_PATH.split(splitter); | |||||
| gCarla.DEFAULT_SFZ_PATH = DEFAULT_SFZ_PATH.split(splitter); | |||||
| } | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // find tool | |||||
| QString findTool(const QString& toolName) | |||||
| { | |||||
| QString path; | |||||
| path = QDir::current().filePath(toolName); | |||||
| if (QFile(path).exists()) | |||||
| return path; | |||||
| if (! gCarla.pathBinaries.isEmpty()) | |||||
| { | |||||
| path = QDir(gCarla.pathBinaries).filePath(toolName); | |||||
| if (QFile(path).exists()) | |||||
| return path; | |||||
| } | |||||
| foreach (const QString& p, PATH) | |||||
| { | |||||
| path = QDir(p).filePath(toolName); | |||||
| if (QFile(path).exists()) | |||||
| return path; | |||||
| } | |||||
| return ""; | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Init host | |||||
| void initHost(const char* const initName, const char* const libPrefix, bool failError) | |||||
| { | |||||
| init(); | |||||
| // ------------------------------------------------------------- | |||||
| // Set Carla library name | |||||
| QString libname = "libcarla_"; | |||||
| if (gCarla.isControl) | |||||
| libname += "control2"; | |||||
| else | |||||
| libname += "standalone2"; | |||||
| #if defined(CARLA_OS_WIN) | |||||
| libname += ".dll"; | |||||
| #elif defined(CARLA_OS_MAC) | |||||
| libname += ".dylib"; | |||||
| #else | |||||
| libname += ".so"; | |||||
| #endif | |||||
| // ------------------------------------------------------------- | |||||
| // Set binary dir | |||||
| QString CWD = QDir::current().absolutePath(); | |||||
| if (libPrefix != nullptr && libPrefix[0] != '\0') | |||||
| { | |||||
| QDir tmp(libPrefix); | |||||
| tmp.cd("lib"); | |||||
| tmp.cd("carla"); | |||||
| gCarla.pathBinaries = tmp.absolutePath(); | |||||
| } | |||||
| else if (CWD.endsWith("resources", Qt::CaseInsensitive)) | |||||
| { | |||||
| QDir tmp(CWD); | |||||
| tmp.cdUp(); | |||||
| gCarla.pathBinaries = tmp.absolutePath(); | |||||
| } | |||||
| else if (CWD.endsWith("source", Qt::CaseInsensitive)) | |||||
| { | |||||
| QDir tmp(CWD); | |||||
| tmp.cdUp(); | |||||
| tmp.cd("bin"); | |||||
| gCarla.pathBinaries = tmp.absolutePath(); | |||||
| } | |||||
| else if (CWD.endsWith("bin", Qt::CaseInsensitive)) | |||||
| { | |||||
| gCarla.pathBinaries = CWD; | |||||
| } | |||||
| // ------------------------------------------------------------- | |||||
| // Fail if binary dir is not found | |||||
| if (gCarla.pathBinaries.isEmpty() && ! gCarla.isPlugin) | |||||
| { | |||||
| if (failError) | |||||
| { | |||||
| QMessageBox::critical(nullptr, "Error", "Failed to find the carla library, cannot continue"); | |||||
| std::exit(1); | |||||
| } | |||||
| return; | |||||
| } | |||||
| // ------------------------------------------------------------- | |||||
| // Set resources dir | |||||
| if (libPrefix != nullptr && libPrefix[0] != '\0') | |||||
| { | |||||
| QDir tmp(libPrefix); | |||||
| tmp.cd("share"); | |||||
| tmp.cd("carla"); | |||||
| tmp.cd("resources"); | |||||
| gCarla.pathResources = tmp.absolutePath(); | |||||
| } | |||||
| else | |||||
| { | |||||
| QDir tmp(gCarla.pathBinaries); | |||||
| tmp.cd("resources"); | |||||
| gCarla.pathResources = tmp.absolutePath(); | |||||
| } | |||||
| // ------------------------------------------------------------- | |||||
| // Print info | |||||
| carla_stdout("Carla %s started, status:", VERSION); | |||||
| carla_stdout(" binary dir: %s", gCarla.pathBinaries.toUtf8().constData()); | |||||
| carla_stdout(" resources dir: %s", gCarla.pathResources.toUtf8().constData()); | |||||
| // ------------------------------------------------------------- | |||||
| // Init host | |||||
| if (! (gCarla.isControl or gCarla.isPlugin)) | |||||
| carla_set_engine_option(ENGINE_OPTION_NSM_INIT, getpid(), initName); | |||||
| carla_set_engine_option(ENGINE_OPTION_PATH_BINARIES, 0, gCarla.pathBinaries.toUtf8().constData()); | |||||
| carla_set_engine_option(ENGINE_OPTION_PATH_RESOURCES, 0, gCarla.pathResources.toUtf8().constData()); | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Get Icon from user theme, using our own as backup (Oxygen) | |||||
| QIcon getIcon(const QString& icon, const int size) | |||||
| { | |||||
| return QIcon::fromTheme(icon, QIcon(QString(":/%ix%i/%s.png").arg(size).arg(size).arg(icon))); | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Signal handler | |||||
| static inline // TODO - remove inline | |||||
| void signalHandler(/*sig, frame*/) | |||||
| { | |||||
| if (gCarla.gui == nullptr) | |||||
| return; | |||||
| // if (sig == SIGINT || sig == SIGTERM) | |||||
| // emit(gCarla.gui.SIGTERM); | |||||
| #ifdef HAVE_SIGUSR1 | |||||
| // else if (sig == SIGUSR1) | |||||
| // emit(gCarla.gui.SIGUSR1); | |||||
| #endif | |||||
| } | |||||
| void setUpSignals() | |||||
| { | |||||
| //signal(SIGINT, signalHandler); | |||||
| //signal(SIGTERM, signalHandler); | |||||
| #ifdef HAVE_SIGUSR1 | |||||
| //signal(SIGUSR1, signalHandler); | |||||
| #endif | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // QLineEdit and QPushButton combo | |||||
| QString getAndSetPath(QWidget* const parent, const QString& currentPath, QLineEdit* const lineEdit) | |||||
| { | |||||
| QString newPath = QFileDialog::getExistingDirectory(parent, parent->tr("Set Path"), currentPath, QFileDialog::ShowDirsOnly); | |||||
| if (! newPath.isEmpty()) | |||||
| lineEdit->setText(newPath); | |||||
| return newPath; | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Custom MessageBox | |||||
| int CustomMessageBox(QWidget* const parent, const QMessageBox::Icon icon, const QString& title, const QString& text, const QString& extraText, const QMessageBox::StandardButtons buttons, const QMessageBox::StandardButton defButton) | |||||
| { | |||||
| QMessageBox msgBox(parent); | |||||
| msgBox.setIcon(icon); | |||||
| msgBox.setWindowTitle(title); | |||||
| msgBox.setText(text); | |||||
| msgBox.setInformativeText(extraText); | |||||
| msgBox.setStandardButtons(buttons); | |||||
| msgBox.setDefaultButton(defButton); | |||||
| return msgBox.exec(); | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| @@ -1,176 +0,0 @@ | |||||
| /* | |||||
| * Common Carla code | |||||
| * Copyright (C) 2011-2014 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. | |||||
| */ | |||||
| #ifndef FRONTEND_CARLA_SHARED_HPP_INCLUDED | |||||
| #define FRONTEND_CARLA_SHARED_HPP_INCLUDED | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Imports (Global) | |||||
| #include <QtGui/QIcon> | |||||
| #include <QtWidgets/QMessageBox> | |||||
| class QLineEdit; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Imports (Custom) | |||||
| #include "CarlaBackendUtils.hpp" | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Set Version | |||||
| #define VERSION "1.9.6 (2.0-beta4)" | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Set TMP | |||||
| extern QString TMP; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Set HOME | |||||
| extern QString HOME; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Set PATH | |||||
| extern QStringList PATH; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Static MIDI CC list | |||||
| extern QStringList MIDI_CC_LIST; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Carla Settings keys | |||||
| #define CARLA_KEY_MAIN_PROJECT_FOLDER "Main/ProjectFolder" // str | |||||
| #define CARLA_KEY_MAIN_USE_PRO_THEME "Main/UseProTheme" // bool | |||||
| #define CARLA_KEY_MAIN_PRO_THEME_COLOR "Main/ProThemeColor" // str | |||||
| #define CARLA_KEY_MAIN_REFRESH_INTERVAL "Main/RefreshInterval" // int | |||||
| #define CARLA_KEY_CANVAS_THEME "Canvas/Theme" // str | |||||
| #define CARLA_KEY_CANVAS_SIZE "Canvas/Size" // str "NxN" | |||||
| #define CARLA_KEY_CANVAS_USE_BEZIER_LINES "Canvas/UseBezierLines" // bool | |||||
| #define CARLA_KEY_CANVAS_AUTO_HIDE_GROUPS "Canvas/AutoHideGroups" // bool | |||||
| #define CARLA_KEY_CANVAS_EYE_CANDY "Canvas/EyeCandy" // enum | |||||
| #define CARLA_KEY_CANVAS_USE_OPENGL "Canvas/UseOpenGL" // bool | |||||
| #define CARLA_KEY_CANVAS_ANTIALIASING "Canvas/Antialiasing" // enum | |||||
| #define CARLA_KEY_CANVAS_HQ_ANTIALIASING "Canvas/HQAntialiasing" // bool | |||||
| #define CARLA_KEY_CUSTOM_PAINTING "UseCustomPainting" // bool | |||||
| #define CARLA_KEY_ENGINE_DRIVER_PREFIX "Engine/Driver-" | |||||
| #define CARLA_KEY_ENGINE_AUDIO_DRIVER "Engine/AudioDriver" // str | |||||
| #define CARLA_KEY_ENGINE_PROCESS_MODE "Engine/ProcessMode" // enum | |||||
| #define CARLA_KEY_ENGINE_TRANSPORT_MODE "Engine/TransportMode" // enum | |||||
| #define CARLA_KEY_ENGINE_FORCE_STEREO "Engine/ForceStereo" // bool | |||||
| #define CARLA_KEY_ENGINE_PREFER_PLUGIN_BRIDGES "Engine/PreferPluginBridges" // bool | |||||
| #define CARLA_KEY_ENGINE_PREFER_UI_BRIDGES "Engine/PreferUiBridges" // bool | |||||
| #define CARLA_KEY_ENGINE_UIS_ALWAYS_ON_TOP "Engine/UIsAlwaysOnTop" // bool | |||||
| #define CARLA_KEY_ENGINE_MAX_PARAMETERS "Engine/MaxParameters" // int | |||||
| #define CARLA_KEY_ENGINE_UI_BRIDGES_TIMEOUT "Engine/UiBridgesTimeout" // int | |||||
| #define CARLA_KEY_PATHS_LADSPA "Paths/LADSPA" | |||||
| #define CARLA_KEY_PATHS_DSSI "Paths/DSSI" | |||||
| #define CARLA_KEY_PATHS_LV2 "Paths/LV2" | |||||
| #define CARLA_KEY_PATHS_VST2 "Paths/VST2" | |||||
| #define CARLA_KEY_PATHS_VST3 "Paths/VST3" | |||||
| #define CARLA_KEY_PATHS_AU "Paths/AU" | |||||
| #define CARLA_KEY_PATHS_GIG "Paths/GIG" | |||||
| #define CARLA_KEY_PATHS_SF2 "Paths/SF2" | |||||
| #define CARLA_KEY_PATHS_SFZ "Paths/SFZ" | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Global Carla object | |||||
| struct CarlaObject { | |||||
| // Host library object | |||||
| void* host; | |||||
| // Host Window | |||||
| void* gui; | |||||
| // is controller | |||||
| bool isControl; | |||||
| // is running local | |||||
| bool isLocal; | |||||
| // is plugin | |||||
| bool isPlugin; | |||||
| // current buffer size | |||||
| uint32_t bufferSize; | |||||
| // current sample rate | |||||
| double sampleRate; | |||||
| // current process mode | |||||
| EngineProcessMode processMode; | |||||
| // check if process mode is forced (rack/patchbay) | |||||
| bool processModeForced; | |||||
| // current transport mode | |||||
| EngineTransportMode transportMode; | |||||
| // current max parameters | |||||
| uint maxParameters; | |||||
| // binary dir | |||||
| QString pathBinaries; | |||||
| // resources dir | |||||
| QString pathResources; | |||||
| // default paths | |||||
| QStringList DEFAULT_LADSPA_PATH; | |||||
| QStringList DEFAULT_DSSI_PATH; | |||||
| QStringList DEFAULT_LV2_PATH; | |||||
| QStringList DEFAULT_VST_PATH; | |||||
| QStringList DEFAULT_VST3_PATH; | |||||
| QStringList DEFAULT_AU_PATH; | |||||
| QStringList DEFAULT_GIG_PATH; | |||||
| QStringList DEFAULT_SF2_PATH; | |||||
| QStringList DEFAULT_SFZ_PATH; | |||||
| }; | |||||
| extern CarlaObject gCarla; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // find tool | |||||
| QString findTool(const QString& toolName); | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Init host | |||||
| void initHost(const char* const initName, const char* const libPrefix = nullptr, bool failError = true); | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Get Icon from user theme, using our own as backup (Oxygen) | |||||
| QIcon getIcon(const QString& icon, const int size = 16); | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Signal handler | |||||
| void setUpSignals(); | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // QLineEdit and QPushButton combo | |||||
| QString getAndSetPath(QWidget* const parent, const QString& currentPath, QLineEdit* const lineEdit); | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Custom MessageBox | |||||
| int CustomMessageBox(QWidget* const parent, const QMessageBox::Icon icon, const QString& title, const QString& text, const QString& extraText = "", | |||||
| const QMessageBox::StandardButtons buttons = QMessageBox::Yes|QMessageBox::No, | |||||
| const QMessageBox::StandardButton defButton = QMessageBox::No); | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| #endif // FRONTEND_CARLA_SHARED_HPP_INCLUDED | |||||
| @@ -1,212 +0,0 @@ | |||||
| /* | |||||
| * Carla style | |||||
| * Copyright (C) 2013-2014 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. | |||||
| */ | |||||
| #include "carla_shared.hpp" | |||||
| #include "carla_style.hpp" | |||||
| #include "theme/CarlaStyle.hpp" | |||||
| #include <QtCore/QDir> | |||||
| #include <QtCore/QSettings> | |||||
| #include <QtWidgets/QApplication> | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| CarlaApplication::CarlaApplication(int& argc, char* argv[], const QString& appName) | |||||
| : fApp(nullptr), | |||||
| fStyle(nullptr) | |||||
| { | |||||
| fApp = new QApplication(argc, argv, true); | |||||
| fApp->setApplicationName(appName); | |||||
| fApp->setApplicationVersion(VERSION); | |||||
| fApp->setOrganizationName("falkTX"); | |||||
| if (appName.toLower() == "carla-control") | |||||
| fApp->setWindowIcon(QIcon(":/scalable/carla-control.svg")); | |||||
| else | |||||
| fApp->setWindowIcon(QIcon(":/scalable/carla.svg")); | |||||
| fPalSystem = fApp->palette(); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Window, QColor(14, 14, 14)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Window, QColor(17, 17, 17)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Window, QColor(17, 17, 17)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::WindowText, QColor(83, 83, 83)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::WindowText, QColor(240, 240, 240)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::WindowText, QColor(240, 240, 240)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Base, QColor(6, 6, 6)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Base, QColor(7, 7, 7)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Base, QColor(7, 7, 7)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::AlternateBase, QColor(12, 12, 12)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::AlternateBase, QColor(14, 14, 14)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::AlternateBase, QColor(14, 14, 14)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::ToolTipBase, QColor(4, 4, 4)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::ToolTipBase, QColor(4, 4, 4)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::ToolTipBase, QColor(4, 4, 4)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::ToolTipText, QColor(230, 230, 230)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::ToolTipText, QColor(230, 230, 230)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::ToolTipText, QColor(230, 230, 230)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Text, QColor(74, 74, 74)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Text, QColor(230, 230, 230)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Text, QColor(230, 230, 230)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Button, QColor(24, 24, 24)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Button, QColor(28, 28, 28)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Button, QColor(28, 28, 28)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(90, 90, 90)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::ButtonText, QColor(240, 240, 240)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::ButtonText, QColor(240, 240, 240)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::BrightText, QColor(255, 255, 255)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::BrightText, QColor(255, 255, 255)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::BrightText, QColor(255, 255, 255)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Light, QColor(191, 191, 191)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Light, QColor(191, 191, 191)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Light, QColor(191, 191, 191)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Midlight, QColor(155, 155, 155)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Midlight, QColor(155, 155, 155)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Midlight, QColor(155, 155, 155)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Dark, QColor(129, 129, 129)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Dark, QColor(129, 129, 129)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Dark, QColor(129, 129, 129)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Mid, QColor(94, 94, 94)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Mid, QColor(94, 94, 94)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Mid, QColor(94, 94, 94)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Shadow, QColor(155, 155, 155)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Shadow, QColor(155, 155, 155)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Shadow, QColor(155, 155, 155)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Highlight, QColor(14, 14, 14)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Highlight, QColor(60, 60, 60)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Highlight, QColor(34, 34, 34)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::HighlightedText, QColor(83, 83, 83)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::HighlightedText, QColor(255, 255, 255)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::HighlightedText, QColor(240, 240, 240)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::Link, QColor(34, 34, 74)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::Link, QColor(100, 100, 230)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::Link, QColor(100, 100, 230)); | |||||
| fPalBlack.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(74, 34, 74)); | |||||
| fPalBlack.setColor(QPalette::Active, QPalette::LinkVisited, QColor(230, 100, 230)); | |||||
| fPalBlack.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(230, 100, 230)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Window, QColor(32, 35, 39)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Window, QColor(37, 40, 45)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Window, QColor(37, 40, 45)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::WindowText, QColor(89, 95, 104)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::WindowText, QColor(223, 237, 255)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::WindowText, QColor(223, 237, 255)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Base, QColor(48, 53, 60)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Base, QColor(55, 61, 69)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Base, QColor(55, 61, 69)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::AlternateBase, QColor(60, 64, 67)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::AlternateBase, QColor(69, 73, 77)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::AlternateBase, QColor(69, 73, 77)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::ToolTipBase, QColor(182, 193, 208)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::ToolTipBase, QColor(182, 193, 208)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::ToolTipBase, QColor(182, 193, 208)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::ToolTipText, QColor(42, 44, 48)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::ToolTipText, QColor(42, 44, 48)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::ToolTipText, QColor(42, 44, 48)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Text, QColor(96, 103, 113)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Text, QColor(210, 222, 240)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Text, QColor(210, 222, 240)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Button, QColor(51, 55, 62)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Button, QColor(59, 63, 71)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Button, QColor(59, 63, 71)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::ButtonText, QColor(98, 104, 114)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::ButtonText, QColor(210, 222, 240)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::ButtonText, QColor(210, 222, 240)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::BrightText, QColor(255, 255, 255)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::BrightText, QColor(255, 255, 255)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::BrightText, QColor(255, 255, 255)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Light, QColor(59, 64, 72)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Light, QColor(63, 68, 76)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Light, QColor(63, 68, 76)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Midlight, QColor(48, 52, 59)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Midlight, QColor(51, 56, 63)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Midlight, QColor(51, 56, 63)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Dark, QColor(18, 19, 22)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Dark, QColor(20, 22, 25)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Dark, QColor(20, 22, 25)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Mid, QColor(28, 30, 34)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Mid, QColor(32, 35, 39)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Mid, QColor(32, 35, 39)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Shadow, QColor(13, 14, 16)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Shadow, QColor(15, 16, 18)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Shadow, QColor(15, 16, 18)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Highlight, QColor(32, 35, 39)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Highlight, QColor(14, 14, 17)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Highlight, QColor(27, 28, 33)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::HighlightedText, QColor(89, 95, 104)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::HighlightedText, QColor(217, 234, 253)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::HighlightedText, QColor(223, 237, 255)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::Link, QColor(79, 100, 118)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::Link, QColor(156, 212, 255)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::Link, QColor(156, 212, 255)); | |||||
| fPalBlue.setColor(QPalette::Disabled, QPalette::LinkVisited, QColor(51, 74, 118)); | |||||
| fPalBlue.setColor(QPalette::Active, QPalette::LinkVisited, QColor(64, 128, 255)); | |||||
| fPalBlue.setColor(QPalette::Inactive, QPalette::LinkVisited, QColor(64, 128, 255)); | |||||
| loadSettings(); | |||||
| } | |||||
| CarlaApplication::~CarlaApplication() | |||||
| { | |||||
| CARLA_SAFE_ASSERT_RETURN(fApp != nullptr,); | |||||
| if (fStyle != nullptr) | |||||
| { | |||||
| //delete fStyle; | |||||
| fStyle = nullptr; | |||||
| } | |||||
| delete fApp; | |||||
| fApp = nullptr; | |||||
| } | |||||
| void CarlaApplication::loadSettings() | |||||
| { | |||||
| CARLA_SAFE_ASSERT_RETURN(fApp != nullptr,); | |||||
| QSettings settings; | |||||
| const bool useProTheme(settings.value("Main/UseProTheme", true).toBool()); | |||||
| if (useProTheme) | |||||
| { | |||||
| //QFont font("DejaVu Sans [Book]", 8, QFont::Normal); | |||||
| //fApp->setFont(font); | |||||
| //QApplication::setFont(font); | |||||
| // TODO | |||||
| if (fStyle == nullptr) | |||||
| fStyle = new CarlaStyle(); | |||||
| fApp->setStyle(fStyle); | |||||
| QApplication::setStyle(fStyle); | |||||
| const QString proThemeColor(settings.value("Main/ProThemeColor", "Black").toString().toLower()); | |||||
| if (proThemeColor == "black") | |||||
| fApp->setPalette(fPalBlack); | |||||
| else if (proThemeColor == "blue") | |||||
| fApp->setPalette(fPalBlue); | |||||
| } | |||||
| carla_stdout("Using \"%s\" theme", fApp->style()->objectName().toUtf8().constData()); | |||||
| } | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| @@ -1,50 +0,0 @@ | |||||
| /* | |||||
| * Carla style | |||||
| * Copyright (C) 2013-2014 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. | |||||
| */ | |||||
| #ifndef FRONTEND_CARLA_STYLE_HPP_INCLUDED | |||||
| #define FRONTEND_CARLA_STYLE_HPP_INCLUDED | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| // Imports (Global) | |||||
| #include <QtGui/QPalette> | |||||
| class QApplication; | |||||
| class CarlaStyle; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| class CarlaApplication | |||||
| { | |||||
| public: | |||||
| CarlaApplication(int& argc, char* argv[], const QString& appName = "Carla2"); | |||||
| ~CarlaApplication(); | |||||
| private: | |||||
| QApplication* fApp; | |||||
| CarlaStyle* fStyle; | |||||
| QPalette fPalSystem; | |||||
| QPalette fPalBlack; | |||||
| QPalette fPalBlue; | |||||
| void loadSettings(); | |||||
| }; | |||||
| // ------------------------------------------------------------------------------------------------------------ | |||||
| #endif // FRONTEND_CARLA_STYLE_HPP_INCLUDED | |||||
| @@ -258,7 +258,7 @@ typedef struct _NativePluginDescriptor { | |||||
| extern void carla_register_native_plugin(const NativePluginDescriptor* desc); | extern void carla_register_native_plugin(const NativePluginDescriptor* desc); | ||||
| /** Called once on host init */ | /** Called once on host init */ | ||||
| void carla_register_all_plugins(); | |||||
| void carla_register_all_plugins(void); | |||||
| /* ------------------------------------------------------------------------------------------------------------ */ | /* ------------------------------------------------------------------------------------------------------------ */ | ||||
| @@ -34,7 +34,8 @@ class NativePluginClass | |||||
| { | { | ||||
| public: | public: | ||||
| NativePluginClass(const NativeHostDescriptor* const host) | NativePluginClass(const NativeHostDescriptor* const host) | ||||
| : pHost(host) | |||||
| : pHost(host), | |||||
| leakDetector_NativePluginClass() | |||||
| { | { | ||||
| CARLA_SAFE_ASSERT(host != nullptr); | CARLA_SAFE_ASSERT(host != nullptr); | ||||
| } | } | ||||
| @@ -362,12 +363,12 @@ protected: | |||||
| (void)sampleRate; | (void)sampleRate; | ||||
| } | } | ||||
| virtual void offlineChanged(const bool isOffline) | |||||
| virtual void offlineChanged(const bool offline) | |||||
| { | { | ||||
| return; | return; | ||||
| // unused | // unused | ||||
| (void)isOffline; | |||||
| (void)offline; | |||||
| } | } | ||||
| virtual void uiNameChanged(const char* const uiName) | virtual void uiNameChanged(const char* const uiName) | ||||
| @@ -181,7 +181,7 @@ protected: | |||||
| CARLA_SAFE_ASSERT_RETURN(channel < MAX_MIDI_CHANNELS, true); | CARLA_SAFE_ASSERT_RETURN(channel < MAX_MIDI_CHANNELS, true); | ||||
| try { | try { | ||||
| uiMidiProgramChanged(channel, bank, program); | |||||
| uiMidiProgramChanged(static_cast<uint8_t>(channel), bank, program); | |||||
| } CARLA_SAFE_EXCEPTION("uiMidiProgramChanged"); | } CARLA_SAFE_EXCEPTION("uiMidiProgramChanged"); | ||||
| return true; | return true; | ||||
| @@ -4,9 +4,9 @@ | |||||
| # Created by falkTX | # Created by falkTX | ||||
| # | # | ||||
| CWD=../.. | |||||
| CWD=.. | |||||
| MODULENAME=jackbridge | MODULENAME=jackbridge | ||||
| include ../Makefile.mk | |||||
| include ../modules/Makefile.mk | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -9,7 +9,6 @@ | |||||
| all: | all: | ||||
| clean: | clean: | ||||
| $(MAKE) clean -C jackbridge | |||||
| $(MAKE) clean -C juce_audio_basics | $(MAKE) clean -C juce_audio_basics | ||||
| $(MAKE) clean -C juce_audio_devices | $(MAKE) clean -C juce_audio_devices | ||||
| $(MAKE) clean -C juce_audio_formats | $(MAKE) clean -C juce_audio_formats | ||||
| @@ -21,10 +20,8 @@ clean: | |||||
| $(MAKE) clean -C juce_gui_basics | $(MAKE) clean -C juce_gui_basics | ||||
| $(MAKE) clean -C juce_gui_extra | $(MAKE) clean -C juce_gui_extra | ||||
| $(MAKE) clean -C lilv | $(MAKE) clean -C lilv | ||||
| $(MAKE) clean -C native-plugins | |||||
| $(MAKE) clean -C rtaudio | $(MAKE) clean -C rtaudio | ||||
| $(MAKE) clean -C rtmempool | $(MAKE) clean -C rtmempool | ||||
| $(MAKE) clean -C rtmidi | $(MAKE) clean -C rtmidi | ||||
| $(MAKE) clean -C theme | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -10,7 +10,7 @@ include ../Makefile.mk | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_CXX_FLAGS += $(RTAUDIO_FLAGS) -I.. -w | |||||
| BUILD_CXX_FLAGS += $(RTAUDIO_FLAGS) -I$(CWD) -w | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| @@ -4,14 +4,14 @@ | |||||
| # Created by falkTX | # Created by falkTX | ||||
| # | # | ||||
| CWD=../.. | |||||
| CWD=.. | |||||
| MODULENAME=native-plugins | MODULENAME=native-plugins | ||||
| include ../Makefile.mk | |||||
| include ../modules/Makefile.mk | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| BUILD_C_FLAGS += -I.. | BUILD_C_FLAGS += -I.. | ||||
| BUILD_CXX_FLAGS += -I.. -I../distrho | |||||
| BUILD_CXX_FLAGS += -I.. -I../distrho -isystem $(CWD)/modules | |||||
| # ---------------------------------------------------------------------------------------------------------------------------- | # ---------------------------------------------------------------------------------------------------------------------------- | ||||
| # Flags for _all.c | # Flags for _all.c | ||||
| @@ -0,0 +1 @@ | |||||
| /home/falktx/Source/Carla/source/carla_patchbay.py | |||||
| @@ -0,0 +1 @@ | |||||
| /home/falktx/Source/Carla/source/carla_rack.py | |||||