From c5179c64cf6e7d25f84d19b5537d989186f0c29f Mon Sep 17 00:00:00 2001 From: dreamer Date: Wed, 3 Jun 2026 16:38:43 +0200 Subject: [PATCH 1/5] use gui selector with new NanoVG option --- Source/Heavy/DPFExporter.h | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Source/Heavy/DPFExporter.h b/Source/Heavy/DPFExporter.h index e9fb470a01..734af64a0a 100644 --- a/Source/Heavy/DPFExporter.h +++ b/Source/Heavy/DPFExporter.h @@ -19,6 +19,7 @@ class DPFExporter final : public ExporterBase { Value jackEnableValue = Value(var(0)); Value exportTypeValue = Value(var(1)); + Value guiTypeValue = Value(var(1)); Value pluginTypeValue = Value(var(1)); Value disableSIMD = Value(var(0)); @@ -32,7 +33,8 @@ class DPFExporter final : public ExporterBase { PropertiesArray properties; properties.add(new PropertiesPanel::EditableComponent("Maker Name (optional)", makerNameValue)); properties.add(new PropertiesPanel::EditableComponent("Project License (optional)", projectLicenseValue)); - properties.add(new PropertiesPanel::ComboComponent("Export type", exportTypeValue, { "Binary", "Binary + GUI", "Source code", "Source + GUI code" })); + properties.add(new PropertiesPanel::ComboComponent("Export type", exportTypeValue, { "Binary", "Source code" })); + properties.add(new PropertiesPanel::ComboComponent("Gui type", guiTypeValue, { "None", "ImGui", "NanoVG" })); properties.add(new PropertiesPanel::ComboComponent("Plugin type", pluginTypeValue, { "Effect", "Instrument", "Custom" })); midiinProperty = new PropertiesPanel::BoolComponent("Midi Input", midiinEnableValue, { "No", "yes" }); @@ -88,6 +90,7 @@ class DPFExporter final : public ExporterBase { state->setProperty("clap_enable_value", getValue(clapEnableValue)); state->setProperty("jack_enable_value", getValue(jackEnableValue)); state->setProperty("export_type_value", getValue(exportTypeValue)); + state->setProperty("gui_type_value", getValue(guiTypeValue)); state->setProperty("plugin_type_value", getValue(pluginTypeValue)); state->setProperty("disable_simd", getValue(disableSIMD)); globalState->setProperty("dpf", state); @@ -110,6 +113,7 @@ class DPFExporter final : public ExporterBase { clapEnableValue = state->getProperty("clap_enable_value"); jackEnableValue = state->getProperty("jack_enable_value"); exportTypeValue = state->getProperty("export_type_value"); + guiTypeValue = state->getProperty("gui_type_value"); pluginTypeValue = state->getProperty("plugin_type_value"); disableSIMD = state->getProperty("disable_simd"); } @@ -149,6 +153,7 @@ class DPFExporter final : public ExporterBase { auto const projectLicense = getValue(projectLicenseValue); auto const exportType = getValue(exportTypeValue); + auto const guiType = getValue(guiTypeValue); auto const midiin = getValue(midiinEnableValue); auto const midiout = getValue(midioutEnableValue); @@ -197,8 +202,11 @@ class DPFExporter final : public ExporterBase { metaDPF.getDynamicObject()->setProperty("midi_output", midiout); metaDPF.getDynamicObject()->setProperty("plugin_formats", formats); - if (exportType == 2 || exportType == 4) { - metaDPF.getDynamicObject()->setProperty("enable_ui", true); + if (guiType == 2) { + metaDPF.getDynamicObject()->setProperty("enable_ui", 1); + } else if (guiType == 3) { + metaDPF.getDynamicObject()->setProperty("enable_ui", 2); + args.add("--gui"); } metaJson->setProperty("dpf", metaDPF); @@ -235,12 +243,15 @@ class DPFExporter final : public ExporterBase { auto const DPF = toolchainDir.getChildFile("lib").getChildFile("dpf"); DPF.copyDirectoryTo(outputFile.getChildFile("dpf")); - if (exportType == 2 || exportType == 4) { + if (guiType == 2) { auto const DPFGui = toolchainDir.getChildFile("lib").getChildFile("dpf-widgets"); DPFGui.copyDirectoryTo(outputFile.getChildFile("dpf-widgets")); + } else if (guiType == 3) { + auto const DPFGui = toolchainDir.getChildFile("lib").getChildFile("pdvg"); + DPFGui.copyDirectoryTo(outputFile.getChildFile("pdvg")); } - if (exportType == 3 || exportType == 4) { + if (exportType == 2) { metaJsonFile.copyFileTo(outputFile.getChildFile("meta.json")); } @@ -249,7 +260,7 @@ class DPFExporter final : public ExporterBase { bool const generationExitCode = getExitCode(); // Check if we need to compile - if (!generationExitCode && (exportType == 1 || exportType == 2)) { + if (!generationExitCode && (exportType == 1)) { auto const workingDir = File::getCurrentWorkingDirectory(); outputFile.setAsCurrentWorkingDirectory(); @@ -304,7 +315,7 @@ class DPFExporter final : public ExporterBase { OSUtils::moveFileTo(outputFile.getChildFile("bin").getChildFile(name + ".clap"), outputFile.getChildFile(name + ".clap")); if (jack) { #if JUCE_MAC - if (exportType == 2) { + if (guiType == 2 || guiType == 3){ OSUtils::moveFileTo(outputFile.getChildFile("bin").getChildFile(name + ".app"), outputFile.getChildFile(name + ".app")); } else { OSUtils::moveFileTo(outputFile.getChildFile("bin").getChildFile(name), outputFile.getChildFile(name)); From 5faa8463d0dd13884e519008eb4d510c5a046188 Mon Sep 17 00:00:00 2001 From: dreamer Date: Wed, 3 Jun 2026 16:47:31 +0200 Subject: [PATCH 2/5] remove pdvg after compiling --- Source/Heavy/DPFExporter.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/Heavy/DPFExporter.h b/Source/Heavy/DPFExporter.h index 734af64a0a..a8723663a4 100644 --- a/Source/Heavy/DPFExporter.h +++ b/Source/Heavy/DPFExporter.h @@ -333,6 +333,7 @@ class DPFExporter final : public ExporterBase { if (!compilationExitCode) { outputFile.getChildFile("dpf").deleteRecursively(); outputFile.getChildFile("dpf-widgets").deleteRecursively(); + outputFile.getChildFile("pdvg").deleteRecursively(); outputFile.getChildFile("build").deleteRecursively(); outputFile.getChildFile("plugin").deleteRecursively(); outputFile.getChildFile("bin").deleteRecursively(); From 0d1788f6e7a55d8b22aa3977e8034249a1a3fe4e Mon Sep 17 00:00:00 2001 From: dreamer Date: Thu, 4 Jun 2026 08:44:52 +0200 Subject: [PATCH 3/5] something with theme colors --- Source/Heavy/DPFExporter.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/Heavy/DPFExporter.h b/Source/Heavy/DPFExporter.h index a8723663a4..6b405097ec 100644 --- a/Source/Heavy/DPFExporter.h +++ b/Source/Heavy/DPFExporter.h @@ -202,11 +202,24 @@ class DPFExporter final : public ExporterBase { metaDPF.getDynamicObject()->setProperty("midi_output", midiout); metaDPF.getDynamicObject()->setProperty("plugin_formats", formats); + File themeJsonFile; + if (guiType == 2) { metaDPF.getDynamicObject()->setProperty("enable_ui", 1); } else if (guiType == 3) { metaDPF.getDynamicObject()->setProperty("enable_ui", 2); args.add("--gui"); + + DynamicObject::Ptr const themeJson(new DynamicObject()); + + themeJson->setProperty("cnv_color", "#" + PlugDataColours::canvasBackgroundColour.toDisplayString(false)); + // themeJson->setProperty("text_color", PlugDataColours::canvasTextColour.toDisplayString(false)); + // themeJson->setProperty("io_color", PlugDataColours::ioletAreaColour.toDisplayString(false)); + // themeJson->setProperty("bg_color", PlugdataColours::); + // themeJson->setProperty("sel_color", PlugdataColours::); + // themeJson->setProperty("out_color", PlugdataColours::); + + themeJsonFile = createThemeJson(themeJson); } metaJson->setProperty("dpf", metaDPF); @@ -253,6 +266,10 @@ class DPFExporter final : public ExporterBase { if (exportType == 2) { metaJsonFile.copyFileTo(outputFile.getChildFile("meta.json")); + if (guiType == 3) { + // themeJsonFile.copyFileTo(outputFile.getChildFile(pdPatch.quoted() + "-theme.json")); + themeJsonFile.copyFileTo(outputFile.getChildFile(String("bladie") + String("-theme.json"))); + } } // Delay to get correct exit code From 1d723cd86a16c3e6399e352ef988c7a13adda127 Mon Sep 17 00:00:00 2001 From: dreamer Date: Wed, 10 Jun 2026 12:09:03 +0200 Subject: [PATCH 4/5] export theme to meta.json --- Source/Heavy/DPFExporter.h | 44 ++++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/Source/Heavy/DPFExporter.h b/Source/Heavy/DPFExporter.h index 6b405097ec..49bc9419ab 100644 --- a/Source/Heavy/DPFExporter.h +++ b/Source/Heavy/DPFExporter.h @@ -20,10 +20,12 @@ class DPFExporter final : public ExporterBase { Value exportTypeValue = Value(var(1)); Value guiTypeValue = Value(var(1)); + Value useThemeValue = Value(var(1)); Value pluginTypeValue = Value(var(1)); Value disableSIMD = Value(var(0)); + PropertiesPanelProperty* useThemeProperty; PropertiesPanelProperty* midiinProperty; PropertiesPanelProperty* midioutProperty; @@ -35,6 +37,8 @@ class DPFExporter final : public ExporterBase { properties.add(new PropertiesPanel::EditableComponent("Project License (optional)", projectLicenseValue)); properties.add(new PropertiesPanel::ComboComponent("Export type", exportTypeValue, { "Binary", "Source code" })); properties.add(new PropertiesPanel::ComboComponent("Gui type", guiTypeValue, { "None", "ImGui", "NanoVG" })); + useThemeProperty = new PropertiesPanel::BoolComponent("Use theme", useThemeValue, { "No", "Yes" }); + properties.add(useThemeProperty); properties.add(new PropertiesPanel::ComboComponent("Plugin type", pluginTypeValue, { "Effect", "Instrument", "Custom" })); midiinProperty = new PropertiesPanel::BoolComponent("Midi Input", midiinEnableValue, { "No", "yes" }); @@ -66,6 +70,7 @@ class DPFExporter final : public ExporterBase { property->setPreferredHeight(28); } + guiTypeValue.addListener(this); pluginTypeValue.addListener(this); midiinEnableValue.addListener(this); midioutEnableValue.addListener(this); @@ -91,6 +96,7 @@ class DPFExporter final : public ExporterBase { state->setProperty("jack_enable_value", getValue(jackEnableValue)); state->setProperty("export_type_value", getValue(exportTypeValue)); state->setProperty("gui_type_value", getValue(guiTypeValue)); + state->setProperty("use_theme_value", getValue(useThemeValue)); state->setProperty("plugin_type_value", getValue(pluginTypeValue)); state->setProperty("disable_simd", getValue(disableSIMD)); globalState->setProperty("dpf", state); @@ -114,6 +120,7 @@ class DPFExporter final : public ExporterBase { jackEnableValue = state->getProperty("jack_enable_value"); exportTypeValue = state->getProperty("export_type_value"); guiTypeValue = state->getProperty("gui_type_value"); + useThemeValue = state->getProperty("use_theme_value"); pluginTypeValue = state->getProperty("plugin_type_value"); disableSIMD = state->getProperty("disable_simd"); } @@ -122,6 +129,9 @@ class DPFExporter final : public ExporterBase { { ExporterBase::valueChanged(v); + int const guiType = getValue(guiTypeValue); + useThemeProperty->setEnabled(guiType == 3); + int const pluginType = getValue(pluginTypeValue); midiinProperty->setEnabled(pluginType == 3); midioutProperty->setEnabled(pluginType == 3); @@ -154,6 +164,7 @@ class DPFExporter final : public ExporterBase { auto const exportType = getValue(exportTypeValue); auto const guiType = getValue(guiTypeValue); + auto const useTheme = getValue(useThemeValue); auto const midiin = getValue(midiinEnableValue); auto const midiout = getValue(midioutEnableValue); @@ -202,24 +213,29 @@ class DPFExporter final : public ExporterBase { metaDPF.getDynamicObject()->setProperty("midi_output", midiout); metaDPF.getDynamicObject()->setProperty("plugin_formats", formats); - File themeJsonFile; - if (guiType == 2) { metaDPF.getDynamicObject()->setProperty("enable_ui", 1); } else if (guiType == 3) { metaDPF.getDynamicObject()->setProperty("enable_ui", 2); args.add("--gui"); - DynamicObject::Ptr const themeJson(new DynamicObject()); - - themeJson->setProperty("cnv_color", "#" + PlugDataColours::canvasBackgroundColour.toDisplayString(false)); - // themeJson->setProperty("text_color", PlugDataColours::canvasTextColour.toDisplayString(false)); - // themeJson->setProperty("io_color", PlugDataColours::ioletAreaColour.toDisplayString(false)); - // themeJson->setProperty("bg_color", PlugdataColours::); - // themeJson->setProperty("sel_color", PlugdataColours::); - // themeJson->setProperty("out_color", PlugdataColours::); - - themeJsonFile = createThemeJson(themeJson); + if (useTheme) { + var const metaTheme(new DynamicObject()); + metaTheme.getDynamicObject()->setProperty("obj_corner_radius", Corners::objectCornerRadius); + metaTheme.getDynamicObject()->setProperty("cnv_color", "#" + PlugDataColours::canvasBackgroundColour.toDisplayString(false)); + metaTheme.getDynamicObject()->setProperty("cnv_txt_color", "#" + PlugDataColours::canvasTextColour.toDisplayString(false)); + metaTheme.getDynamicObject()->setProperty("io_color", "#" + PlugDataColours::guiObjectInternalOutlineColour.toDisplayString(false)); + metaTheme.getDynamicObject()->setProperty("bg_color", "#" + PlugDataColours::guiObjectBackgroundColour.toDisplayString(false)); + metaTheme.getDynamicObject()->setProperty("sel_color", "#" + PlugDataColours::objectSelectedOutlineColour.toDisplayString(false)); + metaTheme.getDynamicObject()->setProperty("com_txt_color", "#" + PlugDataColours::commentTextColour.toDisplayString(false)); + metaTheme.getDynamicObject()->setProperty("out_color", "#" + PlugDataColours::outlineColour.toDisplayString(false)); + + metaDPF.getDynamicObject()->setProperty("ui_theme", "default"); + + var const metaThemes(new DynamicObject()); + metaThemes.getDynamicObject()->setProperty("default", metaTheme); + metaDPF.getDynamicObject()->setProperty("ui_themes", metaThemes); + } } metaJson->setProperty("dpf", metaDPF); @@ -266,10 +282,6 @@ class DPFExporter final : public ExporterBase { if (exportType == 2) { metaJsonFile.copyFileTo(outputFile.getChildFile("meta.json")); - if (guiType == 3) { - // themeJsonFile.copyFileTo(outputFile.getChildFile(pdPatch.quoted() + "-theme.json")); - themeJsonFile.copyFileTo(outputFile.getChildFile(String("bladie") + String("-theme.json"))); - } } // Delay to get correct exit code From 1aa00ba661c9bb8d30555a38353c1cab59befe91 Mon Sep 17 00:00:00 2001 From: dreamer Date: Sun, 14 Jun 2026 08:52:19 +0200 Subject: [PATCH 5/5] always set corner radius and canvas text color for NanoVG GUI --- Source/Heavy/DPFExporter.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/Source/Heavy/DPFExporter.h b/Source/Heavy/DPFExporter.h index 49bc9419ab..ed56fbbd1c 100644 --- a/Source/Heavy/DPFExporter.h +++ b/Source/Heavy/DPFExporter.h @@ -23,7 +23,7 @@ class DPFExporter final : public ExporterBase { Value useThemeValue = Value(var(1)); Value pluginTypeValue = Value(var(1)); - Value disableSIMD = Value(var(0)); + Value disableSIMD = Value(var(2)); PropertiesPanelProperty* useThemeProperty; PropertiesPanelProperty* midiinProperty; @@ -219,23 +219,24 @@ class DPFExporter final : public ExporterBase { metaDPF.getDynamicObject()->setProperty("enable_ui", 2); args.add("--gui"); + var const metaTheme(new DynamicObject()); + metaTheme.getDynamicObject()->setProperty("obj_corner_radius", Corners::objectCornerRadius); + metaTheme.getDynamicObject()->setProperty("cnv_txt_color", "#" + PlugDataColours::canvasTextColour.toDisplayString(false)); + if (useTheme) { - var const metaTheme(new DynamicObject()); - metaTheme.getDynamicObject()->setProperty("obj_corner_radius", Corners::objectCornerRadius); metaTheme.getDynamicObject()->setProperty("cnv_color", "#" + PlugDataColours::canvasBackgroundColour.toDisplayString(false)); - metaTheme.getDynamicObject()->setProperty("cnv_txt_color", "#" + PlugDataColours::canvasTextColour.toDisplayString(false)); metaTheme.getDynamicObject()->setProperty("io_color", "#" + PlugDataColours::guiObjectInternalOutlineColour.toDisplayString(false)); metaTheme.getDynamicObject()->setProperty("bg_color", "#" + PlugDataColours::guiObjectBackgroundColour.toDisplayString(false)); metaTheme.getDynamicObject()->setProperty("sel_color", "#" + PlugDataColours::objectSelectedOutlineColour.toDisplayString(false)); metaTheme.getDynamicObject()->setProperty("com_txt_color", "#" + PlugDataColours::commentTextColour.toDisplayString(false)); metaTheme.getDynamicObject()->setProperty("out_color", "#" + PlugDataColours::outlineColour.toDisplayString(false)); - metaDPF.getDynamicObject()->setProperty("ui_theme", "default"); - - var const metaThemes(new DynamicObject()); - metaThemes.getDynamicObject()->setProperty("default", metaTheme); - metaDPF.getDynamicObject()->setProperty("ui_themes", metaThemes); } + metaDPF.getDynamicObject()->setProperty("ui_theme", "default"); + + var const metaThemes(new DynamicObject()); + metaThemes.getDynamicObject()->setProperty("default", metaTheme); + metaDPF.getDynamicObject()->setProperty("ui_themes", metaThemes); } metaJson->setProperty("dpf", metaDPF);