From 0e3b41362f1a7904e4ae67132bd7f7977e76cd23 Mon Sep 17 00:00:00 2001 From: falkTX Date: Fri, 5 Nov 2021 10:51:30 +0000 Subject: [PATCH] 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"} }, };