On Fri, 19 Apr 2019 16:50:32 +0300 Yordan Karadzhov <ykaradzhov@xxxxxxxxxx> wrote: > +char *KsPluginManager::_pluginLibFromName(const QString &plugin, int &n) > +{ > + QString path = QCoreApplication::applicationFilePath(); > + std::string pluginStr = plugin.toStdString(); > + char *lib; > + > + if (path.contains(KS_DIR)) { I'd rather not use the hardcoded path. If I build the code on one machine, tarball it up and move it to another machine and extract it, and then run that code from that machine, I want it to still use the plugins for that machine. I was hoping to test: string = cmdline_path() + "../../kernel-shark/lib/"; If that exists, then we know that we are in the source directory. -- Steve > + n = asprintf(&lib, "%s/lib/plugin-%s.so", > + KS_DIR, pluginStr.c_str()); > + } else { > + n = asprintf(&lib, "%s/lib/kshark/plugins/plugin-%s.so", > + _INSTALL_PREFIX, pluginStr.c_str()); > + } > + > + return lib; > +} > +
![]() |