From 383f02ee2b01b6cd6fdc7812bff6d9e5f036081f Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 4 Nov 2021 23:58:43 +0000 Subject: [PATCH 1/9] Filter out VCV logo from Core files at runtime --- src/Makefile | 3 ++ src/Makefile.cardinal.mk | 2 +- src/override/dep.cpp | 104 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index 1dd43ff..3fce996 100644 --- a/src/Makefile +++ b/src/Makefile @@ -68,6 +68,9 @@ BUILD_C_FLAGS += -std=gnu11 BUILD_C_FLAGS += -fno-finite-math-only BUILD_CXX_FLAGS += -fno-finite-math-only +# use our custom function to filter out VCV trademarks +BUILD_CXX_FLAGS += -DnsvgParseFromFile=nsvgParseFromFileCardinal + # -------------------------------------------------------------- # Rack files to build diff --git a/src/Makefile.cardinal.mk b/src/Makefile.cardinal.mk index a42e0dd..1302ec9 100644 --- a/src/Makefile.cardinal.mk +++ b/src/Makefile.cardinal.mk @@ -170,7 +170,7 @@ all: jack lv2 vst2 vst3 resources ifeq ($(NAME),Cardinal) -CORE_RESOURCES = $(subst ../Rack/res/,,$(wildcard ../Rack/res/*)) template.vcv +CORE_RESOURCES = $(filter-out icon.png,$(subst ../Rack/res/,,$(wildcard ../Rack/res/*))) template.vcv PLUGIN_RESOURCES += $(CORE_RESOURCES:%=$(TARGET_DIR)/Cardinal.lv2/resources/%) ifeq ($(MACOS),true) diff --git a/src/override/dep.cpp b/src/override/dep.cpp index 8fd9e03..3dac141 100644 --- a/src/override/dep.cpp +++ b/src/override/dep.cpp @@ -16,6 +16,7 @@ */ #include +#include // fix blendish build, missing symbol in debug mode #ifdef DEBUG @@ -39,4 +40,107 @@ float FollowerBase::efGainMaxDecibelsDebug = 12.0f; // Compile those nice implementation-in-header little libraries #define NANOSVG_IMPLEMENTATION #define NANOSVG_ALL_COLOR_KEYWORDS +#undef nsvgParseFromFile #include + +// Custom Cardinal filtering +static const struct { + const char* filename; + const char* shapes[4]; +} pathsToFilterOut[] = { + { + "Core/AudioInterface.svg", + {"path39377","path39381","path39383","path39379"} + }, + { + "Core/AudioInterface2.svg", + {"path18733","path18737","path18731","path18735"} + }, + { + "Core/AudioInterface16.svg", + {"path40283","path40287","path40289","path40285"} + }, + { + "Core/CV-CC.svg", + {"path12881","path12885","path12887","path12883"} + }, + { + "Core/CV-Gate.svg", + {"path13127","path13131","path13133","path13129"} + }, + { + "Core/CV-MIDI.svg", + {"path12747","path12751","path12753","path12749"} + }, + { + "Core/MIDI-CC.svg", + {"path9740","path9744","path9746","path9742"} + }, + { + "Core/MIDI-CV.svg", + {"path11803","path11807","path11809","path11805"} + }, + { + "Core/MIDI-Gate.svg", + {"path11634","path11638","path11640","path11636"} + }, + { + "Core/MIDI-Map.svg", + {"path21209","path21213","path21215","path21211"} + }, + { + "Core/Notes.svg", + {"path6935","path6939","path6941","path6937"} + }, +}; + +static void removeShape(NSVGimage* const handle, const char* const id) +{ + for (NSVGshape *shape = handle->shapes, *old = nullptr; shape; old = shape, shape = shape->next) + { + if (strcmp(shape->id, id) != 0) + continue; + + if (old != nullptr) + old->next = shape->next; + else + handle->shapes = shape->next; + + nsvg__deletePaths(shape->paths); + free(shape); + break; + } +} + +extern "C" { +NSVGimage* nsvgParseFromFileCardinal(const char* filename, const char* units, float dpi); +} + +NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* const units, const float dpi) +{ + if (NSVGimage* const handle = nsvgParseFromFile(filename, units, dpi)) + { + for (size_t i = 0; i < sizeof(pathsToFilterOut)/sizeof(pathsToFilterOut[0]); ++i) + { + const char* const pathToFilterOut = pathsToFilterOut[i].filename; + const size_t filenamelen = std::strlen(filename); + const size_t filterlen = std::strlen(pathToFilterOut); + + if (filenamelen < filterlen) + continue; + + if (std::strncmp(filename + (filenamelen-filterlen), pathToFilterOut, filterlen) == 0) + { + printf("Removing CC-ND deadlock from file...\n"); + removeShape(handle, pathsToFilterOut[i].shapes[0]); + removeShape(handle, pathsToFilterOut[i].shapes[1]); + removeShape(handle, pathsToFilterOut[i].shapes[2]); + removeShape(handle, pathsToFilterOut[i].shapes[3]); + } + } + + return handle; + } + + return nullptr; +} From fe4c0f61271e211f1ddb9811babaa28a532af861 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 00:21:10 +0000 Subject: [PATCH 2/9] Use puts instead of printf to keep mingw happy --- src/override/dep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/override/dep.cpp b/src/override/dep.cpp index 3dac141..b75b4be 100644 --- a/src/override/dep.cpp +++ b/src/override/dep.cpp @@ -131,7 +131,7 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con if (std::strncmp(filename + (filenamelen-filterlen), pathToFilterOut, filterlen) == 0) { - printf("Removing CC-ND deadlock from file...\n"); + puts("Removing CC-ND deadlock from file...\n"); removeShape(handle, pathsToFilterOut[i].shapes[0]); removeShape(handle, pathsToFilterOut[i].shapes[1]); removeShape(handle, pathsToFilterOut[i].shapes[2]); From 667cf05361ac0a54bdf25a9613754c11a9fe4856 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 10:34:49 +0000 Subject: [PATCH 3/9] Filter out Fundamental VCV logos too; Cleanup Signed-off-by: falkTX --- src/override/dep.cpp | 138 +++++++++++++++++++++++++++++++++++++++---- 1 file changed, 125 insertions(+), 13 deletions(-) diff --git a/src/override/dep.cpp b/src/override/dep.cpp index b75b4be..33278e7 100644 --- a/src/override/dep.cpp +++ b/src/override/dep.cpp @@ -92,24 +92,136 @@ static const struct { "Core/Notes.svg", {"path6935","path6939","path6941","path6937"} }, + { + "Fundamental/res/8vert.svg", + {"path69642","path69646","path69640","path69644"} + }, + { + "Fundamental/res/ADSR.svg", + {"path33693","path33697","path33699","path33695"} + }, + { + "Fundamental/res/Delay.svg", + {"path25369","path25373","path25375","path25371"} + }, + { + "Fundamental/res/LFO-1.svg", + {"path35889","path35893","path35895","path35891"} + }, + { + "Fundamental/res/LFO-2.svg", + {"path36131","path36135","path36137","path36133"} + }, + { + "Fundamental/res/Merge.svg", + {"path29991","path29995","path29989","path29993"} + }, + { + "Fundamental/res/MidSide.svg", + {"path44181","path44185","path44179","path44183"} + }, + { + "Fundamental/res/Mutes.svg", + {"path21613","path21617","path21611","path21615"} + }, + { + "Fundamental/res/Noise.svg", + {"path105594","path105598","path105592","path105596"} + }, + { + "Fundamental/res/Octave.svg", + {"path38471","path38475","path38469","path38473"} + }, + { + "Fundamental/res/Pulses.svg", + {"path46241","path46245","path46239","path46243"} + }, + { + "Fundamental/res/Quantizer.svg", + {"path38549","path38553","path38547","path38551"} + }, + { + "Fundamental/res/Random.svg", + {"path89732","path89736","path89730","path89734"} + }, + { + "Fundamental/res/SEQ3.svg", + {"path35687","path35691","path35693","path35689"} + }, + { + "Fundamental/res/Scope.svg", + {"path33887","path33891","path33893","path33889"} + }, + /* These 2 do not have logos on them? + { + "Fundamental/res/SequentialSwitch1.svg", + {"_______","_______","_______","_______"} + }, + { + "Fundamental/res/SequentialSwitch2.svg", + {"_______","_______","_______","_______"} + }, + */ + { + "Fundamental/res/Split.svg", + {"path29999","path30003","path29997","path30001"} + }, + { + "Fundamental/res/Sum.svg", + {"path10913","path10917","path10911","path10915"} + }, + { + "Fundamental/res/Unity.svg", + {"path21219","path21223","path21217","path21221"} + }, + /* These 2 do not have logos on them? + { + "Fundamental/res/VCA-1.svg", + {"_______","_______","_______","_______"} + }, + { + "Fundamental/res/VCA.svg", + {"_______","_______","_______","_______"} + }, + */ + { + "Fundamental/res/VCF.svg", + {"path25239","path25243","path25245","path25241"} + }, + { + "Fundamental/res/VCMixer.svg", + {"path125839","path125843","path125845","path125841"} + }, + { + "Fundamental/res/VCO-1.svg", + {"path33533","path33537","path33539","path33535"} + }, + { + "Fundamental/res/VCO-2.svg", + {"path37557","path37561","path37563","path37559"} + }, + { + "Fundamental/res/Viz.svg", + {"path41769","path41773","path41767","path41771"} + }, }; static void removeShape(NSVGimage* const handle, const char* const id) { - for (NSVGshape *shape = handle->shapes, *old = nullptr; shape; old = shape, shape = shape->next) - { - if (strcmp(shape->id, id) != 0) - continue; + for (NSVGshape *shape = handle->shapes, *old = nullptr; shape; old = shape, shape = shape->next) + { + if (strcmp(shape->id, id) != 0) + continue; - if (old != nullptr) - old->next = shape->next; - else - handle->shapes = shape->next; + if (old != nullptr) + old->next = shape->next; + else + handle->shapes = shape->next; - nsvg__deletePaths(shape->paths); - free(shape); - break; - } + nsvg__deletePaths(shape->paths); + free(shape); + break; + } } extern "C" { @@ -131,7 +243,7 @@ NSVGimage* nsvgParseFromFileCardinal(const char* const filename, const char* con if (std::strncmp(filename + (filenamelen-filterlen), pathToFilterOut, filterlen) == 0) { - puts("Removing CC-ND deadlock from file...\n"); + puts("Removing CC-ND deadlock from file..."); removeShape(handle, pathsToFilterOut[i].shapes[0]); removeShape(handle, pathsToFilterOut[i].shapes[1]); removeShape(handle, pathsToFilterOut[i].shapes[2]); From 0e3b41362f1a7904e4ae67132bd7f7977e76cd23 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 10:51:30 +0000 Subject: [PATCH 4/9] Alternative way to look for resources Signed-off-by: falkTX --- plugins/res/AS | 1 + plugins/res/AmalgamatedHarmonics | 1 + plugins/res/AnimatedCircuits | 1 + plugins/res/AudibleInstruments | 1 + plugins/res/Befaco | 1 + plugins/res/Bidoo | 1 + plugins/res/BogaudioModules | 1 + plugins/res/Cardinal | 1 + plugins/res/DrumKit | 1 + plugins/res/ESeries | 1 + plugins/res/Fundamental | 1 + plugins/res/GrandeModular | 1 + plugins/res/ImpromptuModular | 1 + plugins/res/JW-Modules | 1 + plugins/res/MindMeldModular | 1 + plugins/res/ValleyAudio | 1 + plugins/res/ZetaCarinaeModules | 1 + plugins/res/cf | 1 + plugins/res/rackwindows | 1 + src/override/asset.cpp | 8 ++--- src/override/dep.cpp | 54 ++++++++++++++++---------------- 21 files changed, 48 insertions(+), 33 deletions(-) create mode 120000 plugins/res/AS create mode 120000 plugins/res/AmalgamatedHarmonics create mode 120000 plugins/res/AnimatedCircuits create mode 120000 plugins/res/AudibleInstruments create mode 120000 plugins/res/Befaco create mode 120000 plugins/res/Bidoo create mode 120000 plugins/res/BogaudioModules create mode 120000 plugins/res/Cardinal create mode 120000 plugins/res/DrumKit create mode 120000 plugins/res/ESeries create mode 120000 plugins/res/Fundamental create mode 120000 plugins/res/GrandeModular create mode 120000 plugins/res/ImpromptuModular create mode 120000 plugins/res/JW-Modules create mode 120000 plugins/res/MindMeldModular create mode 120000 plugins/res/ValleyAudio create mode 120000 plugins/res/ZetaCarinaeModules create mode 120000 plugins/res/cf create mode 120000 plugins/res/rackwindows diff --git a/plugins/res/AS b/plugins/res/AS new file mode 120000 index 0000000..5fda03b --- /dev/null +++ b/plugins/res/AS @@ -0,0 +1 @@ +../AS/res \ No newline at end of file diff --git a/plugins/res/AmalgamatedHarmonics b/plugins/res/AmalgamatedHarmonics new file mode 120000 index 0000000..b1f95f5 --- /dev/null +++ b/plugins/res/AmalgamatedHarmonics @@ -0,0 +1 @@ +../AmalgamatedHarmonics/res \ No newline at end of file diff --git a/plugins/res/AnimatedCircuits b/plugins/res/AnimatedCircuits new file mode 120000 index 0000000..58d1e12 --- /dev/null +++ b/plugins/res/AnimatedCircuits @@ -0,0 +1 @@ +../AnimatedCircuits/res \ No newline at end of file diff --git a/plugins/res/AudibleInstruments b/plugins/res/AudibleInstruments new file mode 120000 index 0000000..55a5eaa --- /dev/null +++ b/plugins/res/AudibleInstruments @@ -0,0 +1 @@ +../AudibleInstruments/res \ No newline at end of file diff --git a/plugins/res/Befaco b/plugins/res/Befaco new file mode 120000 index 0000000..dda4da3 --- /dev/null +++ b/plugins/res/Befaco @@ -0,0 +1 @@ +../Befaco/res \ No newline at end of file diff --git a/plugins/res/Bidoo b/plugins/res/Bidoo new file mode 120000 index 0000000..5be434f --- /dev/null +++ b/plugins/res/Bidoo @@ -0,0 +1 @@ +../Bidoo/res \ No newline at end of file diff --git a/plugins/res/BogaudioModules b/plugins/res/BogaudioModules new file mode 120000 index 0000000..bb3ce9b --- /dev/null +++ b/plugins/res/BogaudioModules @@ -0,0 +1 @@ +../BogaudioModules/res \ No newline at end of file diff --git a/plugins/res/Cardinal b/plugins/res/Cardinal new file mode 120000 index 0000000..1f944cf --- /dev/null +++ b/plugins/res/Cardinal @@ -0,0 +1 @@ +../Cardinal/res \ No newline at end of file diff --git a/plugins/res/DrumKit b/plugins/res/DrumKit new file mode 120000 index 0000000..0f28388 --- /dev/null +++ b/plugins/res/DrumKit @@ -0,0 +1 @@ +../DrumKit/res \ No newline at end of file diff --git a/plugins/res/ESeries b/plugins/res/ESeries new file mode 120000 index 0000000..999be60 --- /dev/null +++ b/plugins/res/ESeries @@ -0,0 +1 @@ +../ESeries/res \ No newline at end of file diff --git a/plugins/res/Fundamental b/plugins/res/Fundamental new file mode 120000 index 0000000..31d6e5a --- /dev/null +++ b/plugins/res/Fundamental @@ -0,0 +1 @@ +../Fundamental/res \ No newline at end of file diff --git a/plugins/res/GrandeModular b/plugins/res/GrandeModular new file mode 120000 index 0000000..2883349 --- /dev/null +++ b/plugins/res/GrandeModular @@ -0,0 +1 @@ +../GrandeModular/res \ No newline at end of file diff --git a/plugins/res/ImpromptuModular b/plugins/res/ImpromptuModular new file mode 120000 index 0000000..a276730 --- /dev/null +++ b/plugins/res/ImpromptuModular @@ -0,0 +1 @@ +../ImpromptuModular/res \ No newline at end of file diff --git a/plugins/res/JW-Modules b/plugins/res/JW-Modules new file mode 120000 index 0000000..964f22b --- /dev/null +++ b/plugins/res/JW-Modules @@ -0,0 +1 @@ +../JW-Modules/res \ No newline at end of file diff --git a/plugins/res/MindMeldModular b/plugins/res/MindMeldModular new file mode 120000 index 0000000..59dffe7 --- /dev/null +++ b/plugins/res/MindMeldModular @@ -0,0 +1 @@ +../MindMeldModular/res \ No newline at end of file diff --git a/plugins/res/ValleyAudio b/plugins/res/ValleyAudio new file mode 120000 index 0000000..4381856 --- /dev/null +++ b/plugins/res/ValleyAudio @@ -0,0 +1 @@ +../ValleyAudio/res \ No newline at end of file diff --git a/plugins/res/ZetaCarinaeModules b/plugins/res/ZetaCarinaeModules new file mode 120000 index 0000000..ddd2191 --- /dev/null +++ b/plugins/res/ZetaCarinaeModules @@ -0,0 +1 @@ +../ZetaCarinaeModules/res \ No newline at end of file diff --git a/plugins/res/cf b/plugins/res/cf new file mode 120000 index 0000000..42eb2c0 --- /dev/null +++ b/plugins/res/cf @@ -0,0 +1 @@ +../cf/res \ No newline at end of file diff --git a/plugins/res/rackwindows b/plugins/res/rackwindows new file mode 120000 index 0000000..799200a --- /dev/null +++ b/plugins/res/rackwindows @@ -0,0 +1 @@ +../rackwindows/res \ No newline at end of file diff --git a/src/override/asset.cpp b/src/override/asset.cpp index 01e2820..2be346c 100644 --- a/src/override/asset.cpp +++ b/src/override/asset.cpp @@ -37,12 +37,8 @@ std::string bundlePath; // points to plugin manifests dir (or empty) // get rid of "res/" prefix static inline std::string& trim(std::string& s) { - if (std::strncmp(s.c_str(), "res" DISTRHO_OS_SEP_STR, 4) == 0) - s = s.substr(4, s.size()-4); -#if DISTRHO_OS_SEP != '/' if (std::strncmp(s.c_str(), "res/", 4) == 0) s = s.substr(4, s.size()-4); -#endif return s; } @@ -59,7 +55,7 @@ std::string system(std::string filename) { // get plugin resource, also trims "res/" as needed std::string plugin(plugin::Plugin* plugin, std::string filename) { DISTRHO_SAFE_ASSERT_RETURN(plugin != nullptr, {}); - return system::join(plugin->path, bundlePath.empty() ? filename : trim(filename)); + return system::join(plugin->path, trim(filename)); } // path to plugin manifest @@ -79,7 +75,7 @@ std::string pluginPath(const std::string& dirname) { { if (dirname == "Core") return systemDir; - return system::join(systemDir, "..", "..", "plugins", dirname); + return system::join(systemDir, "..", "..", "plugins", "res", dirname); } return system::join(systemDir, dirname); } diff --git a/src/override/dep.cpp b/src/override/dep.cpp index 33278e7..7438ef0 100644 --- a/src/override/dep.cpp +++ b/src/override/dep.cpp @@ -93,115 +93,115 @@ static const struct { {"path6935","path6939","path6941","path6937"} }, { - "Fundamental/res/8vert.svg", + "Fundamental/8vert.svg", {"path69642","path69646","path69640","path69644"} }, { - "Fundamental/res/ADSR.svg", + "Fundamental/ADSR.svg", {"path33693","path33697","path33699","path33695"} }, { - "Fundamental/res/Delay.svg", + "Fundamental/Delay.svg", {"path25369","path25373","path25375","path25371"} }, { - "Fundamental/res/LFO-1.svg", + "Fundamental/LFO-1.svg", {"path35889","path35893","path35895","path35891"} }, { - "Fundamental/res/LFO-2.svg", + "Fundamental/LFO-2.svg", {"path36131","path36135","path36137","path36133"} }, { - "Fundamental/res/Merge.svg", + "Fundamental/Merge.svg", {"path29991","path29995","path29989","path29993"} }, { - "Fundamental/res/MidSide.svg", + "Fundamental/MidSide.svg", {"path44181","path44185","path44179","path44183"} }, { - "Fundamental/res/Mutes.svg", + "Fundamental/Mutes.svg", {"path21613","path21617","path21611","path21615"} }, { - "Fundamental/res/Noise.svg", + "Fundamental/Noise.svg", {"path105594","path105598","path105592","path105596"} }, { - "Fundamental/res/Octave.svg", + "Fundamental/Octave.svg", {"path38471","path38475","path38469","path38473"} }, { - "Fundamental/res/Pulses.svg", + "Fundamental/Pulses.svg", {"path46241","path46245","path46239","path46243"} }, { - "Fundamental/res/Quantizer.svg", + "Fundamental/Quantizer.svg", {"path38549","path38553","path38547","path38551"} }, { - "Fundamental/res/Random.svg", + "Fundamental/Random.svg", {"path89732","path89736","path89730","path89734"} }, { - "Fundamental/res/SEQ3.svg", + "Fundamental/SEQ3.svg", {"path35687","path35691","path35693","path35689"} }, { - "Fundamental/res/Scope.svg", + "Fundamental/Scope.svg", {"path33887","path33891","path33893","path33889"} }, /* These 2 do not have logos on them? { - "Fundamental/res/SequentialSwitch1.svg", + "Fundamental/SequentialSwitch1.svg", {"_______","_______","_______","_______"} }, { - "Fundamental/res/SequentialSwitch2.svg", + "Fundamental/SequentialSwitch2.svg", {"_______","_______","_______","_______"} }, */ { - "Fundamental/res/Split.svg", + "Fundamental/Split.svg", {"path29999","path30003","path29997","path30001"} }, { - "Fundamental/res/Sum.svg", + "Fundamental/Sum.svg", {"path10913","path10917","path10911","path10915"} }, { - "Fundamental/res/Unity.svg", + "Fundamental/Unity.svg", {"path21219","path21223","path21217","path21221"} }, /* These 2 do not have logos on them? { - "Fundamental/res/VCA-1.svg", + "Fundamental/VCA-1.svg", {"_______","_______","_______","_______"} }, { - "Fundamental/res/VCA.svg", + "Fundamental/VCA.svg", {"_______","_______","_______","_______"} }, */ { - "Fundamental/res/VCF.svg", + "Fundamental/VCF.svg", {"path25239","path25243","path25245","path25241"} }, { - "Fundamental/res/VCMixer.svg", + "Fundamental/VCMixer.svg", {"path125839","path125843","path125845","path125841"} }, { - "Fundamental/res/VCO-1.svg", + "Fundamental/VCO-1.svg", {"path33533","path33537","path33539","path33535"} }, { - "Fundamental/res/VCO-2.svg", + "Fundamental/VCO-2.svg", {"path37557","path37561","path37563","path37559"} }, { - "Fundamental/res/Viz.svg", + "Fundamental/Viz.svg", {"path41769","path41773","path41767","path41771"} }, }; From ec2d383d9587a3916e0ba332a65ccf2cd01a820e Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 11:17:08 +0000 Subject: [PATCH 5/9] Update DrumKit Signed-off-by: falkTX --- plugins/DrumKit | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/DrumKit b/plugins/DrumKit index 58755a3..53205f4 160000 --- a/plugins/DrumKit +++ b/plugins/DrumKit @@ -1 +1 @@ -Subproject commit 58755a32837522a64b6b886b764dbefc9a2b8fd3 +Subproject commit 53205f4f58d84ed02ebdc23d80ef86d90ce2d61b From 83d2f852dda67ab578af6742ace122af42a0d109 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 12:44:06 +0000 Subject: [PATCH 6/9] Use new isDummyInstance DPF method and get rid of xvfb Signed-off-by: falkTX --- .github/workflows/build.yml | 64 +++++++++++++++++-------------------- dpf | 2 +- src/CardinalPlugin.cpp | 4 ++- 3 files changed, 33 insertions(+), 37 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 29f428d..53621bb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -26,7 +26,7 @@ jobs: echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-arm64.list sudo apt-get update -qq - sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static xvfb + sudo apt-get install -yqq g++-aarch64-linux-gnu libasound2-dev:arm64 libcairo2-dev:arm64 libgl1-mesa-dev:arm64 liblo-dev:arm64 libpulse-dev:arm64 libx11-dev:arm64 libxcursor-dev:arm64 libxext-dev:arm64 libxrandr-dev:arm64 qemu-user-static # extra for vcv deps sudo apt-get install -yqq libxi-dev:arm64 libxinerama-dev:arm64 - name: Build linux arm64 cross-compiled @@ -38,7 +38,7 @@ jobs: LIBGL_ALWAYS_SOFTWARE: "true" run: | make features - xvfb-run -a -- make WITH_LTO=true -j $(nproc) + make WITH_LTO=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -65,7 +65,7 @@ jobs: echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-updates main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal-backports main restricted universe multiverse" | sudo tee -a /etc/apt/sources.list.d/ports-armhf.list sudo apt-get update -qq - sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static xvfb + sudo apt-get install -yqq g++-arm-linux-gnueabihf libasound2-dev:armhf libcairo2-dev:armhf libgl1-mesa-dev:armhf liblo-dev:armhf libpulse-dev:armhf libx11-dev:armhf libxcursor-dev:armhf libxext-dev:armhf libxrandr-dev:armhf qemu-user-static # extra for vcv deps sudo apt-get install -yqq libxi-dev:armhf libxinerama-dev:armhf - name: Build linux armhf cross-compiled @@ -77,7 +77,7 @@ jobs: LIBGL_ALWAYS_SOFTWARE: "true" run: | make features - xvfb-run -a -- make WITH_LTO=true -j $(nproc) + make WITH_LTO=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -100,7 +100,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libcairo2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 xvfb + sudo apt-get install -yqq g++-i686-linux-gnu libasound2-dev:i386 libcairo2-dev:i386 libgl1-mesa-dev:i386 liblo-dev:i386 libpulse-dev:i386 libx11-dev:i386 libxcursor-dev:i386 libxext-dev:i386 libxrandr-dev:i386 # extra for vcv deps sudo apt-get install -yqq libxi-dev:i386 libxinerama-dev:i386 - name: Build linux x86 @@ -114,7 +114,7 @@ jobs: LIBGL_ALWAYS_SOFTWARE: "true" run: | make features - xvfb-run -a -- make WITH_LTO=true -j $(nproc) + make WITH_LTO=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -136,7 +136,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb + sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev # extra for vcv deps sudo apt-get install -yqq libxi-dev libxinerama-dev - name: Build linux x86_64 @@ -145,7 +145,7 @@ jobs: LIBGL_ALWAYS_SOFTWARE: "true" run: | make features - xvfb-run -a -- make WITH_LTO=true -j $(nproc) + make WITH_LTO=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -167,7 +167,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb + sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev # extra for vcv deps sudo apt-get install -yqq libxi-dev libxinerama-dev - name: Build linux x86_64 (debug) @@ -176,7 +176,7 @@ jobs: LIBGL_ALWAYS_SOFTWARE: "true" run: | make features - xvfb-run -a -- make DEBUG=true -j $(nproc) + make DEBUG=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -227,7 +227,7 @@ jobs: run: | sudo dpkg --add-architecture i386 sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 xvfb + sudo apt-get install -yqq binutils-mingw-w64-i686 g++-mingw-w64-i686 mingw-w64 wine-stable:i386 - name: Build win32 cross-compiled env: CC: i686-w64-mingw32-gcc @@ -240,10 +240,7 @@ jobs: WINEDLLOVERRIDES: "mscoree,mshtml=" run: | make features - xvfb-run wineboot -u - echo -e '[HKEY_CURRENT_USER\Software\Wine\WineDbg]\n"ShowCrashDialog"=dword:00000000\n' > nodiag.reg - xvfb-run regedit nodiag.reg - xvfb-run -a -- make WITH_LTO=true -j $(nproc) + make WITH_LTO=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -265,7 +262,7 @@ jobs: - name: Set up dependencies run: | sudo apt-get update -qq - sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable xvfb + sudo apt-get install -yqq binutils-mingw-w64-x86-64 g++-mingw-w64-x86-64 mingw-w64 wine-stable - name: Build win64 cross-compiled env: CC: x86_64-w64-mingw32-gcc @@ -278,10 +275,7 @@ jobs: WINEDLLOVERRIDES: "mscoree,mshtml=" run: | make features - xvfb-run wineboot -u - echo -e '[HKEY_CURRENT_USER\Software\Wine\WineDbg]\n"ShowCrashDialog"=dword:00000000\n' > nodiag.reg - xvfb-run regedit nodiag.reg - xvfb-run -a -- make WITH_LTO=true -j $(nproc) + make WITH_LTO=true -j $(nproc) - name: Set sha8 id: slug run: echo "::set-output name=sha8::$(echo ${{ github.sha }} | cut -c1-8)" @@ -307,7 +301,7 @@ jobs: sudo dpkg -i kxstudio-repos_10.0.3_all.deb sudo apt-get update -qq # build-deps - sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev xvfb + sudo apt-get install -yqq libasound2-dev libcairo2-dev libgl1-mesa-dev liblo-dev libpulse-dev libx11-dev libxcursor-dev libxext-dev libxrandr-dev # extra for vcv deps sudo apt-get install -yqq libxi-dev libxinerama-dev # runtime testing @@ -320,7 +314,7 @@ jobs: LIBGL_ALWAYS_SOFTWARE: "true" run: | make features - xvfb-run -a -- make NOOPT=true SKIP_STRIPPING=true -j $(nproc) + make NOOPT=true SKIP_STRIPPING=true -j $(nproc) - name: Validate LV2 ttl syntax run: | lv2_validate \ @@ -329,16 +323,16 @@ jobs: /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \ /usr/lib/lv2/kx-programs.lv2/*.ttl \ ./bin/*.lv2/*.ttl - #- name: Validate LV2 metadata and binaries - #env: - #LIBGL_ALWAYS_SOFTWARE: "true" - #run: | - #export LV2_PATH=/tmp/lv2-path - #mkdir ${LV2_PATH} - #cp -r bin/*.lv2 \ - #/usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ - #${LV2_PATH} - #xvfb-run lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) + - name: Validate LV2 metadata and binaries + env: + LIBGL_ALWAYS_SOFTWARE: "true" + run: | + export LV2_PATH=/tmp/lv2-path + mkdir ${LV2_PATH} + cp -r bin/*.lv2 \ + /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ + ${LV2_PATH} + lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) - name: Test LV2 plugin env: LIBGL_ALWAYS_SOFTWARE: "true" @@ -346,7 +340,7 @@ jobs: export LV2_PATH=/tmp/lv2-path for p in $(lv2ls); do \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ - xvfb-run valgrind \ + valgrind \ --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ @@ -359,7 +353,7 @@ jobs: run: | for p in $(ls bin/ | grep vst.so); do \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ - xvfb-run valgrind \ + valgrind \ --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ @@ -372,7 +366,7 @@ jobs: run: | for p in $(ls bin/ | grep vst3); do \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ - xvfb-run valgrind \ + valgrind \ --error-exitcode=255 \ --leak-check=no \ --track-origins=yes \ diff --git a/dpf b/dpf index 0f31c24..ad05572 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 0f31c24917043d6841fcc16efcb0e4e85bc51a89 +Subproject commit ad055720fc348478717037017edb003072278d6d diff --git a/src/CardinalPlugin.cpp b/src/CardinalPlugin.cpp index 42da423..01b2780 100644 --- a/src/CardinalPlugin.cpp +++ b/src/CardinalPlugin.cpp @@ -379,7 +379,9 @@ public: context->event = new rack::widget::EventState; context->scene = new rack::app::Scene; context->event->rootWidget = context->scene; - context->window = new rack::window::Window; + + if (! isDummyInstance()) + context->window = new rack::window::Window; context->patch->loadTemplate(); context->scene->rackScroll->reset(); From 41621d193ded9da146b2cfebb28504f52eeaede2 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 13:12:37 +0000 Subject: [PATCH 7/9] lv2lint does not work yet Signed-off-by: falkTX --- .github/workflows/build.yml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 53621bb..fe6969a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,6 +10,7 @@ on: env: DEBIAN_FRONTEND: noninteractive HOMEBREW_NO_AUTO_UPDATE: 1 + LIBGL_ALWAYS_SOFTWARE: "true" jobs: linux-arm64: @@ -35,7 +36,6 @@ jobs: CXX: aarch64-linux-gnu-g++ LDFLAGS: -static-libgcc -static-libstdc++ PKG_CONFIG_PATH: /usr/lib/aarch64-linux-gnu/pkgconfig - LIBGL_ALWAYS_SOFTWARE: "true" run: | make features make WITH_LTO=true -j $(nproc) @@ -74,7 +74,6 @@ jobs: CXX: arm-linux-gnueabihf-g++ LDFLAGS: -static-libgcc -static-libstdc++ PKG_CONFIG_PATH: /usr/lib/arm-linux-gnueabihf/pkgconfig - LIBGL_ALWAYS_SOFTWARE: "true" run: | make features make WITH_LTO=true -j $(nproc) @@ -111,7 +110,6 @@ jobs: CXXFLAGS: -m32 LDFLAGS: -m32 -static-libgcc -static-libstdc++ PKG_CONFIG_PATH: /usr/lib/i386-linux-gnu/pkgconfig - LIBGL_ALWAYS_SOFTWARE: "true" run: | make features make WITH_LTO=true -j $(nproc) @@ -142,7 +140,6 @@ jobs: - name: Build linux x86_64 env: LDFLAGS: -static-libgcc -static-libstdc++ - LIBGL_ALWAYS_SOFTWARE: "true" run: | make features make WITH_LTO=true -j $(nproc) @@ -173,7 +170,6 @@ jobs: - name: Build linux x86_64 (debug) env: LDFLAGS: -static-libgcc -static-libstdc++ - LIBGL_ALWAYS_SOFTWARE: "true" run: | make features make DEBUG=true -j $(nproc) @@ -234,7 +230,6 @@ jobs: CXX: i686-w64-mingw32-g++ EXE_WRAPPER: wine PKG_CONFIG: "false" - LIBGL_ALWAYS_SOFTWARE: "true" WINEARCH: "win32" WINEDEBUG: "-all" WINEDLLOVERRIDES: "mscoree,mshtml=" @@ -269,7 +264,6 @@ jobs: CXX: x86_64-w64-mingw32-g++ EXE_WRAPPER: wine PKG_CONFIG: "false" - LIBGL_ALWAYS_SOFTWARE: "true" WINEARCH: "win64" WINEDEBUG: "-all" WINEDLLOVERRIDES: "mscoree,mshtml=" @@ -311,7 +305,6 @@ jobs: CFLAGS: -g CXXFLAGS: -g -DDPF_ABORT_ON_ERROR LDFLAGS: -static-libgcc -static-libstdc++ - LIBGL_ALWAYS_SOFTWARE: "true" run: | make features make NOOPT=true SKIP_STRIPPING=true -j $(nproc) @@ -324,8 +317,6 @@ jobs: /usr/lib/lv2/kx-programs.lv2/*.ttl \ ./bin/*.lv2/*.ttl - name: Validate LV2 metadata and binaries - env: - LIBGL_ALWAYS_SOFTWARE: "true" run: | export LV2_PATH=/tmp/lv2-path mkdir ${LV2_PATH} @@ -334,8 +325,6 @@ jobs: ${LV2_PATH} lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) - name: Test LV2 plugin - env: - LIBGL_ALWAYS_SOFTWARE: "true" run: | export LV2_PATH=/tmp/lv2-path for p in $(lv2ls); do \ @@ -348,8 +337,6 @@ jobs: /usr/lib/carla/carla-bridge-native lv2 "" ${p} 1>/dev/null; \ done - name: Test VST2 plugin - env: - LIBGL_ALWAYS_SOFTWARE: "true" run: | for p in $(ls bin/ | grep vst.so); do \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ @@ -361,8 +348,6 @@ jobs: /usr/lib/carla/carla-bridge-native vst2 ./bin/${p} "" 1>/dev/null; \ done - name: Test VST3 plugin - env: - LIBGL_ALWAYS_SOFTWARE: "true" run: | for p in $(ls bin/ | grep vst3); do \ env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ From 07eca4326a6adfdd504cef179d87171e56d469da Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 13:31:49 +0000 Subject: [PATCH 8/9] I said, lv2lint does not work yet Signed-off-by: falkTX --- .github/workflows/build.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fe6969a..d8d0574 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -316,14 +316,14 @@ jobs: /usr/lib/lv2/kx-control-input-port-change-request.lv2/*.ttl \ /usr/lib/lv2/kx-programs.lv2/*.ttl \ ./bin/*.lv2/*.ttl - - name: Validate LV2 metadata and binaries - run: | - export LV2_PATH=/tmp/lv2-path - mkdir ${LV2_PATH} - cp -r bin/*.lv2 \ - /usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ - ${LV2_PATH} - lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) + #- name: Validate LV2 metadata and binaries + #run: | + #export LV2_PATH=/tmp/lv2-path + #mkdir ${LV2_PATH} + #cp -r bin/*.lv2 \ + #/usr/lib/lv2/{atom,buf-size,core,data-access,kx-control-input-port-change-request,kx-programs,instance-access,midi,parameters,port-groups,port-props,options,patch,presets,resize-port,state,time,ui,units,urid,worker}.lv2 \ + #${LV2_PATH} + #lv2lint -s lv2_generate_ttl -l ld-linux-x86-64.so.2 -M nopack $(lv2ls) - name: Test LV2 plugin run: | export LV2_PATH=/tmp/lv2-path From 8290112680ae75c04e2eef0340d5a95b2f3f46d7 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 14:56:16 +0000 Subject: [PATCH 9/9] Do not test vst3 plugins for now --- .github/workflows/build.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d8d0574..67c0e33 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -347,14 +347,14 @@ jobs: --suppressions=./dpf/utils/valgrind-dpf.supp \ /usr/lib/carla/carla-bridge-native vst2 ./bin/${p} "" 1>/dev/null; \ done - - name: Test VST3 plugin - run: | - for p in $(ls bin/ | grep vst3); do \ - env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ - valgrind \ - --error-exitcode=255 \ - --leak-check=no \ - --track-origins=yes \ - --suppressions=./dpf/utils/valgrind-dpf.supp \ - /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \ - done + # - name: Test VST3 plugin + # run: | + # for p in $(ls bin/ | grep vst3); do \ + # env CARLA_BRIDGE_DUMMY=1 CARLA_BRIDGE_TESTING=native \ + # valgrind \ + # --error-exitcode=255 \ + # --leak-check=no \ + # --track-origins=yes \ + # --suppressions=./dpf/utils/valgrind-dpf.supp \ + # /usr/lib/carla/carla-bridge-native vst3 ./bin/${p} "" 1>/dev/null; \ + # done