Browse Source

Alternative way to look for resources

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.02
falkTX 4 years ago
parent
commit
0e3b41362f
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
21 changed files with 48 additions and 33 deletions
  1. +1
    -0
      plugins/res/AS
  2. +1
    -0
      plugins/res/AmalgamatedHarmonics
  3. +1
    -0
      plugins/res/AnimatedCircuits
  4. +1
    -0
      plugins/res/AudibleInstruments
  5. +1
    -0
      plugins/res/Befaco
  6. +1
    -0
      plugins/res/Bidoo
  7. +1
    -0
      plugins/res/BogaudioModules
  8. +1
    -0
      plugins/res/Cardinal
  9. +1
    -0
      plugins/res/DrumKit
  10. +1
    -0
      plugins/res/ESeries
  11. +1
    -0
      plugins/res/Fundamental
  12. +1
    -0
      plugins/res/GrandeModular
  13. +1
    -0
      plugins/res/ImpromptuModular
  14. +1
    -0
      plugins/res/JW-Modules
  15. +1
    -0
      plugins/res/MindMeldModular
  16. +1
    -0
      plugins/res/ValleyAudio
  17. +1
    -0
      plugins/res/ZetaCarinaeModules
  18. +1
    -0
      plugins/res/cf
  19. +1
    -0
      plugins/res/rackwindows
  20. +2
    -6
      src/override/asset.cpp
  21. +27
    -27
      src/override/dep.cpp

+ 1
- 0
plugins/res/AS View File

@@ -0,0 +1 @@
../AS/res

+ 1
- 0
plugins/res/AmalgamatedHarmonics View File

@@ -0,0 +1 @@
../AmalgamatedHarmonics/res

+ 1
- 0
plugins/res/AnimatedCircuits View File

@@ -0,0 +1 @@
../AnimatedCircuits/res

+ 1
- 0
plugins/res/AudibleInstruments View File

@@ -0,0 +1 @@
../AudibleInstruments/res

+ 1
- 0
plugins/res/Befaco View File

@@ -0,0 +1 @@
../Befaco/res

+ 1
- 0
plugins/res/Bidoo View File

@@ -0,0 +1 @@
../Bidoo/res

+ 1
- 0
plugins/res/BogaudioModules View File

@@ -0,0 +1 @@
../BogaudioModules/res

+ 1
- 0
plugins/res/Cardinal View File

@@ -0,0 +1 @@
../Cardinal/res

+ 1
- 0
plugins/res/DrumKit View File

@@ -0,0 +1 @@
../DrumKit/res

+ 1
- 0
plugins/res/ESeries View File

@@ -0,0 +1 @@
../ESeries/res

+ 1
- 0
plugins/res/Fundamental View File

@@ -0,0 +1 @@
../Fundamental/res

+ 1
- 0
plugins/res/GrandeModular View File

@@ -0,0 +1 @@
../GrandeModular/res

+ 1
- 0
plugins/res/ImpromptuModular View File

@@ -0,0 +1 @@
../ImpromptuModular/res

+ 1
- 0
plugins/res/JW-Modules View File

@@ -0,0 +1 @@
../JW-Modules/res

+ 1
- 0
plugins/res/MindMeldModular View File

@@ -0,0 +1 @@
../MindMeldModular/res

+ 1
- 0
plugins/res/ValleyAudio View File

@@ -0,0 +1 @@
../ValleyAudio/res

+ 1
- 0
plugins/res/ZetaCarinaeModules View File

@@ -0,0 +1 @@
../ZetaCarinaeModules/res

+ 1
- 0
plugins/res/cf View File

@@ -0,0 +1 @@
../cf/res

+ 1
- 0
plugins/res/rackwindows View File

@@ -0,0 +1 @@
../rackwindows/res

+ 2
- 6
src/override/asset.cpp View File

@@ -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);
}


+ 27
- 27
src/override/dep.cpp View File

@@ -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"}
},
};


Loading…
Cancel
Save