Re: [PATCH v3 4/8] kernel-shark: Add logic for the plugins search path

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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;
> +}
> +



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux