Build fixes
Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
5b7e5336c6
commit
fec9aef939
11 changed files with 36 additions and 57 deletions
|
@ -20,22 +20,16 @@
|
|||
#include "plugin.hpp"
|
||||
#include "DistrhoUtils.hpp"
|
||||
|
||||
#ifndef HEADLESS
|
||||
# include "../dgl/Base.hpp"
|
||||
#else
|
||||
# include "extra/LeakDetector.hpp"
|
||||
#endif
|
||||
#include "../dgl/Base.hpp"
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
// from PluginContext.hpp
|
||||
|
||||
#ifndef HEADLESS
|
||||
START_NAMESPACE_DGL
|
||||
class TopLevelWidget;
|
||||
template <class BaseWidget> class NanoBaseWidget;
|
||||
typedef NanoBaseWidget<TopLevelWidget> NanoTopLevelWidget;
|
||||
END_NAMESPACE_DGL
|
||||
#endif
|
||||
|
||||
START_NAMESPACE_DISTRHO
|
||||
|
||||
|
@ -76,10 +70,8 @@ struct CardinalPluginContext : rack::Context {
|
|||
const MidiEvent* midiEvents;
|
||||
uint32_t midiEventCount;
|
||||
Plugin* const plugin;
|
||||
#ifndef HEADLESS
|
||||
DGL_NAMESPACE::NanoTopLevelWidget* tlw;
|
||||
UI* ui;
|
||||
#endif
|
||||
CardinalPluginContext(Plugin* const p);
|
||||
void writeMidiMessage(const rack::midi::Message& message, uint8_t channel);
|
||||
#ifndef HEADLESS
|
||||
|
|
|
@ -301,7 +301,7 @@ endif
|
|||
|
||||
ifeq ($(shell $(PKG_CONFIG) --exists fftw3f && echo true),true)
|
||||
PLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp
|
||||
MINIPLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp
|
||||
# MINIPLUGIN_FILES += Cardinal/src/AudioToCVPitch.cpp
|
||||
BASE_FLAGS += -DHAVE_FFTW3F
|
||||
endif
|
||||
|
||||
|
|
|
@ -171,15 +171,18 @@ static void initStatic__Cardinal()
|
|||
p->addModel(modelHostParametersMap);
|
||||
p->addModel(modelHostTime);
|
||||
p->addModel(modelTextEditor);
|
||||
/* TODO
|
||||
#ifdef HAVE_FFTW3F
|
||||
p->addModel(modelAudioToCVPitch);
|
||||
#else
|
||||
*/
|
||||
spl.removeModule("AudioToCVPitch");
|
||||
/*
|
||||
#endif
|
||||
*/
|
||||
spl.removeModule("AudioFile");
|
||||
spl.removeModule("Blank");
|
||||
spl.removeModule("Carla");
|
||||
spl.removeModule("ExpanderInputMIDI");
|
||||
spl.removeModule("ExpanderOutputMIDI");
|
||||
spl.removeModule("HostAudio8");
|
||||
spl.removeModule("Ildaeil");
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include <app/Scene.hpp>
|
||||
#include <engine/Engine.hpp>
|
||||
#include <ui/common.hpp>
|
||||
#include <widget/Widget.hpp>
|
||||
#include <window/Window.hpp>
|
||||
|
||||
#ifdef NDEBUG
|
||||
|
@ -64,6 +65,11 @@ static const constexpr uint kCardinalStateCount = kCardinalStateBaseCount;
|
|||
extern const std::string CARDINAL_VERSION;
|
||||
|
||||
namespace rack {
|
||||
#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
namespace app {
|
||||
rack::widget::Widget* createMenuBar() { return new rack::widget::Widget; }
|
||||
}
|
||||
#endif
|
||||
namespace engine {
|
||||
void Engine_setAboutToClose(Engine*);
|
||||
}
|
||||
|
@ -80,6 +86,7 @@ bool d_isDiffHigherThanLimit(const T& v1, const T& v2, const T& limit)
|
|||
|
||||
#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS
|
||||
const char* UI::getBundlePath() const noexcept { return nullptr; }
|
||||
void UI::setState(const char*, const char*) {}
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
|
|
|
@ -330,8 +330,10 @@ BUILD_CXX_FLAGS += -DCARDINAL_PLUGIN_PREFIX='"$(PREFIX)"'
|
|||
FILES = main.cpp
|
||||
FILES += RemoteUI.cpp
|
||||
FILES += CardinalCommon.cpp
|
||||
FILES += CardinalRemote.cpp
|
||||
FILES += common.cpp
|
||||
FILES += glfw.cpp
|
||||
FILES += MenuBar.cpp
|
||||
FILES += Window.cpp
|
||||
|
||||
ifeq ($(WINDOWS),true)
|
||||
|
|
|
@ -41,15 +41,6 @@ CardinalRemoteUI::CardinalRemoteUI(Window& window, const std::string& templatePa
|
|||
|
||||
rack::window::WindowSetPluginRemote(context->window, this);
|
||||
|
||||
if (rack::widget::Widget* const menuBar = context->scene->menuBar)
|
||||
{
|
||||
context->scene->removeChild(menuBar);
|
||||
delete menuBar;
|
||||
}
|
||||
|
||||
context->scene->menuBar = rack::app::createMenuBar(true);
|
||||
context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll);
|
||||
|
||||
// hide "Browse VCV Library" button
|
||||
rack::widget::Widget* const browser = context->scene->browser->children.back();
|
||||
rack::widget::Widget* const headerLayout = browser->children.front();
|
||||
|
@ -93,15 +84,6 @@ CardinalRemoteUI::~CardinalRemoteUI()
|
|||
|
||||
context->nativeWindowId = 0;
|
||||
|
||||
if (rack::widget::Widget* const menuBar = context->scene->menuBar)
|
||||
{
|
||||
context->scene->removeChild(menuBar);
|
||||
delete menuBar;
|
||||
}
|
||||
|
||||
context->scene->menuBar = rack::app::createMenuBar(true);
|
||||
context->scene->addChildBelow(context->scene->menuBar, context->scene->rackScroll);
|
||||
|
||||
rack::window::WindowSetPluginRemote(context->window, nullptr);
|
||||
}
|
||||
|
||||
|
|
|
@ -26,13 +26,10 @@
|
|||
// --------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
namespace rack {
|
||||
namespace app {
|
||||
widget::Widget* createMenuBar(bool isStandalone);
|
||||
}
|
||||
namespace window {
|
||||
void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw);
|
||||
void WindowSetMods(Window* window, int mods);
|
||||
void WindowSetInternalSize(rack::window::Window* window, math::Vec size);
|
||||
void WindowSetPluginRemote(Window* window, NanoTopLevelWidget* tlw);
|
||||
void WindowSetMods(Window* window, int mods);
|
||||
void WindowSetInternalSize(rack::window::Window* window, math::Vec size);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -240,13 +240,13 @@ all: $(TARGETS)
|
|||
ifeq ($(MOD_BUILD),true)
|
||||
$(MAKE) -C Cardinal lv2
|
||||
$(MAKE) -C CardinalFX lv2
|
||||
#$(MAKE) -C CardinalMini lv2
|
||||
$(MAKE) -C CardinalMini lv2
|
||||
else ifeq ($(WASM),true)
|
||||
$(MAKE) -C CardinalNative
|
||||
else
|
||||
$(MAKE) -C Cardinal
|
||||
ifneq ($(NOPLUGINS),true)
|
||||
#$(MAKE) -C CardinalMini
|
||||
$(MAKE) -C CardinalMini
|
||||
endif
|
||||
$(MAKE) -C CardinalNative
|
||||
$(MAKE) -C CardinalFX $(CARDINAL_FX_ARGS)
|
||||
|
|
|
@ -30,6 +30,13 @@
|
|||
|
||||
#ifndef HEADLESS
|
||||
# include "DistrhoUI.hpp"
|
||||
#else
|
||||
# include "Base.hpp"
|
||||
START_NAMESPACE_DGL
|
||||
class TopLevelWidget;
|
||||
template <class BaseWidget> class NanoBaseWidget;
|
||||
typedef NanoBaseWidget<TopLevelWidget> NanoTopLevelWidget;
|
||||
END_NAMESPACE_DGL
|
||||
#endif
|
||||
|
||||
START_NAMESPACE_DISTRHO
|
||||
|
@ -64,10 +71,8 @@ struct CardinalPluginContext : rack::Context {
|
|||
const MidiEvent* midiEvents;
|
||||
uint32_t midiEventCount;
|
||||
Plugin* const plugin;
|
||||
#ifndef HEADLESS
|
||||
NanoTopLevelWidget* tlw;
|
||||
UI* ui;
|
||||
#endif
|
||||
|
||||
CardinalPluginContext(Plugin* const p)
|
||||
: bufferSize(p != nullptr ? p->getBufferSize() : 0),
|
||||
|
@ -107,21 +112,19 @@ struct CardinalPluginContext : rack::Context {
|
|||
dataOuts(nullptr),
|
||||
midiEvents(nullptr),
|
||||
midiEventCount(0),
|
||||
plugin(p)
|
||||
#ifndef HEADLESS
|
||||
, tlw(nullptr)
|
||||
, ui(nullptr)
|
||||
#endif
|
||||
plugin(p),
|
||||
tlw(nullptr),
|
||||
ui(nullptr)
|
||||
{
|
||||
std::memset(parameters, 0, sizeof(parameters));
|
||||
}
|
||||
|
||||
void writeMidiMessage(const rack::midi::Message& message, uint8_t channel);
|
||||
|
||||
#ifndef HEADLESS
|
||||
#ifndef HEADLESS
|
||||
bool addIdleCallback(IdleCallback* cb) const;
|
||||
void removeIdleCallback(IdleCallback* cb) const;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
// -----------------------------------------------------------------------------------------------------------
|
||||
|
@ -137,9 +140,9 @@ public:
|
|||
context(new CardinalPluginContext(this)) {}
|
||||
~CardinalBasePlugin() override {}
|
||||
|
||||
#ifndef HEADLESS
|
||||
#ifndef HEADLESS
|
||||
friend class CardinalUI;
|
||||
#endif
|
||||
#endif
|
||||
};
|
||||
|
||||
#ifndef HEADLESS
|
||||
|
|
|
@ -844,11 +844,7 @@ struct MenuBar : widget::OpaqueWidget {
|
|||
|
||||
|
||||
widget::Widget* createMenuBar() {
|
||||
return new widget::Widget;
|
||||
}
|
||||
|
||||
widget::Widget* createMenuBar(const bool isStandalone) {
|
||||
menuBar::MenuBar* menuBar = new menuBar::MenuBar(isStandalone);
|
||||
menuBar::MenuBar* menuBar = new menuBar::MenuBar(isStandalone());
|
||||
return menuBar;
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,6 @@ namespace rack {
|
|||
namespace app {
|
||||
|
||||
|
||||
widget::Widget* createMenuBar(bool isStandalone);
|
||||
|
||||
|
||||
struct ResizeHandle : widget::OpaqueWidget {
|
||||
math::Vec size;
|
||||
|
||||
|
@ -134,7 +131,7 @@ Scene::Scene() {
|
|||
|
||||
rack = rackScroll->rackWidget;
|
||||
|
||||
menuBar = createMenuBar(isStandalone());
|
||||
menuBar = createMenuBar();
|
||||
addChild(menuBar);
|
||||
|
||||
browser = browserCreate();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue