diff --git a/SpiralSynthModular.C b/SpiralSynthModular.C index f7087d4..bca78ad 100644 --- a/SpiralSynthModular.C +++ b/SpiralSynthModular.C @@ -383,7 +383,7 @@ SpiralWindowType *SynthModular::CreateWindow() ////////////////////////////////////////////////////////// -void SynthModular::LoadPlugins() +void SynthModular::LoadPlugins(string pluginPath) { int Width = 40; @@ -423,7 +423,15 @@ void SynthModular::LoadPlugins() for (vector::iterator i=SpiralSynthModularInfo::PLUGINVEC.begin(); i!=SpiralSynthModularInfo::PLUGINVEC.end(); i++) { - string Fullpath=SpiralSynthModularInfo::PLUGIN_PATH+*i; + string Fullpath; + if (pluginPath=="") + { + Fullpath=SpiralSynthModularInfo::PLUGIN_PATH+*i; + } + else + { + Fullpath=pluginPath+*"/"+*i; + } ID=PluginManager::Get()->LoadPlugin(Fullpath.c_str()); if (ID!=PluginError) diff --git a/SpiralSynthModular.h b/SpiralSynthModular.h index 2116da8..dec1a3d 100644 --- a/SpiralSynthModular.h +++ b/SpiralSynthModular.h @@ -64,7 +64,7 @@ public: ~SynthModular(); SpiralWindowType * CreateWindow(); - void LoadPlugins(); + void LoadPlugins(string pluginPath); void Update(); void AddDevice(int n, int x, int y); void AddComment(int n); diff --git a/main.cpp b/main.cpp index dab19ac..215cab6 100644 --- a/main.cpp +++ b/main.cpp @@ -70,6 +70,7 @@ int main(int argc, char **argv) // get args string cmd_filename=""; bool cmd_specd = false; + string cmd_pluginPath=""; // parse the args if (argc>1) @@ -87,13 +88,19 @@ int main(int argc, char **argv) <<"-v : print version"< : look for plugins in the specified directory"<CreateWindow(); - synth->LoadPlugins(); + synth->LoadPlugins(cmd_pluginPath); win->xclass(""); if (GUI) win->show(1, argv); // prevents stuff happening before the plugins have loaded