diff --git a/plugins/Makefile b/plugins/Makefile index 616c612..0197731 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1308,7 +1308,7 @@ ifneq ($(HEADLESS),true) endif clean: - rm -f $(TARGETS) + rm -f *.a rm -rf $(BUILD_DIR) rm -rf surgext/build @@ -1465,6 +1465,10 @@ resources: $(JACK_RESOURCES) $(LV2_RESOURCES) $(VST2_RESOURCES) $(VST3_RESOURCES $(SILENT)ln -sf $(abspath $<) $@ ifeq ($(MOD_BUILD),true) +../bin/Cardinal.lv2/resources/%.svg: %.svg ../deps/svg2stub.py + -@mkdir -p "$(shell dirname $@)" + $(SILENT)python3 ../deps/svg2stub.py $< $@ + ../bin/CardinalFX.lv2/resources/%.svg: %.svg ../deps/svg2stub.py -@mkdir -p "$(shell dirname $@)" $(SILENT)python3 ../deps/svg2stub.py $< $@ diff --git a/src/CardinalCommon.cpp b/src/CardinalCommon.cpp index d3177c8..2e1ea73 100644 --- a/src/CardinalCommon.cpp +++ b/src/CardinalCommon.cpp @@ -346,7 +346,10 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB if (asset::systemDir.empty()) { if (const char* const bundlePath = (plugin != nullptr ? plugin->getBundlePath() : - ui != nullptr ? ui->getBundlePath() : nullptr)) + #if DISTRHO_PLUGIN_HAS_UI + ui != nullptr ? ui->getBundlePath() : + #endif + nullptr)) { if (const char* const resourcePath = getResourcePath(bundlePath)) { @@ -399,8 +402,10 @@ Initializer::Initializer(const CardinalBasePlugin* const plugin, const CardinalB INFO("Binary filename: %s", getBinaryFilename()); if (plugin != nullptr) { INFO("Bundle path: %s", plugin->getBundlePath()); + #if DISTRHO_PLUGIN_HAS_UI } else if (ui != nullptr) { INFO("Bundle path: %s", ui->getBundlePath()); + #endif } INFO("System directory: %s", asset::systemDir.c_str()); INFO("User directory: %s", asset::userDir.c_str()); diff --git a/src/CardinalMini/DistrhoPluginInfo.h b/src/CardinalMini/DistrhoPluginInfo.h index ac6a942..ac93536 100644 --- a/src/CardinalMini/DistrhoPluginInfo.h +++ b/src/CardinalMini/DistrhoPluginInfo.h @@ -52,4 +52,8 @@ #define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:UtilityPlugin" #define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Generator" +// #ifdef __MOD_DEVICES__ +// # define DISTRHO_PLUGIN_USES_MODGUI 1 +// #endif + #endif // DISTRHO_PLUGIN_INFO_H_INCLUDED diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index cd011dc..77917a4 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -78,7 +78,7 @@ bool d_isDiffHigherThanLimit(const T& v1, const T& v2, const T& limit) return v1 != v2 ? (v1 > v2 ? v1 - v2 : v2 - v1) > limit : false; } -#if ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS +#if DISTRHO_PLUGIN_HAS_UI && ! DISTRHO_PLUGIN_WANT_DIRECT_ACCESS const char* UI::getBundlePath() const noexcept { return nullptr; } #endif diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index 93ba533..525dcc9 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -217,11 +217,13 @@ endif # Install modgui resources if MOD build ifeq ($(MOD_BUILD),true) +ifneq ($(CARDINAL_VARIANT),mini) LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/Plateau_Reverb.ttl LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui.ttl LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui/documentation.pdf LV2_RESOURCES += $(TARGET_DIR)/$(NAME).lv2/modgui endif +endif # Cardinal main variant is not available as VST2 due to lack of CV ports ifneq ($(CARDINAL_VARIANT),main) @@ -246,7 +248,7 @@ endif # mini variant UI ifeq ($(CARDINAL_VARIANT),mini) -ifneq ($(HEADLESS)$(MOD_BUILD),true) +ifneq ($(HEADLESS),true) FILES_UI = CardinalUI.cpp FILES_UI += CardinalCommon-UI.cpp FILES_UI += common.cpp