Re: Recommended Way to locate executable folder and preferences folder on Linux

Michael Herger <slim-b/[email protected]> Tue, 25 Oct 2022 15:40:50 +0200
Newsgroups gmane.music.equipment.slimdevices.devel
Message-ID <[email protected]>
> That is what I have been trying to do. I managed to get the plugin
> working on LMS on piCorePlayer but that was by using a symlink script on
> startup that mapped the links each time. I thought it was quite a neat
> hack ;). But I would prefer a solution which worked out of the box so to
> speak.

I must be missing something... are you trying to get a binary working 
that ships with your plugin? You shouldn't have to move it anywhere. I'm 
simply creating a Bin/<platform> sub-folder inside my Plugin hierarchy. 
Then I do something like (inside the Plugin.pm):

my $pluginData = Slim::Utils::PluginManager->dataForPlugin($class);
Slim::Utils::Misc::addFindBinPaths(catdir($pluginData->{basedir}, 'Bin', 
<platform>));

Thereafter you should be able to get the binary:

my $binary = Slim::Utils::Misc::findbin('spotty');