On 2/20/10, Mark Pottorff <[email protected]> wrote:
> When users designate a specific data directory and separate the executables
> from the data, it becomes unclear how to find the executables if they are
> not in the default locations.
>
> I would like to find a reliable means of locating (on all supported
> platforms) the full path to the boinccmd executable from an application
> running in a slots directory. But I don't see any environment variables
> established at runtime that point back to the core client code path. Is
> there some reliable means of locating the proper path for boinccmd
> programmatically?
>
> ...I should be more specific. I want to determine the path from the shell of
> the client machine, not in an application that is compiled with the BOINC
> APIs. So all I'll really have available is environment variables, or files
> up in the data directory. But I don't see any identications in either of
> where to find boinccmd (for the cases where it is not at the base of the
> data directory).

On Windows, by default the programs will be in %PROGRAMFILES%\BOINC.
But to know for sure, even if the user changed the directory during
installation, look at the following registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Space Sciences Laboratory, U.C.
Berkeley\BOINC Setup\INSTALLDIR

On Linux, you should look for boinccmd and boinc_cmd in the
directories listed in $PATH. The execlp function will do the lookup
for you.

If the user unpacked the .sh into a local directory like $HOME/boinc
(as opposed to using his distro's package manager), I think there
there is no reliable way to find the executables.

On Mac, I think boinccmd isn't installed at all in the default package.

-- 
Nicolas
_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to