[openal] Making OpenAL Soft more "portable"?

Daniel Gibson metalcaedes at gmail.com
Sat Jun 4 11:01:40 EDT 2016


On 06/04/2016 02:00 AM, Chris Robinson wrote:
>
> The main issue is that the "game folder" isn't a particularly
> well-defined place. On Windows it's relatively easy to get (IIRC,
> there's a function call to get the full path to the process's
> executable), but on Linux, the idea of a game folder is actually pretty
> hazy since executables, data, and configs are installed in separate
> places -- and even in cases where the whole game is in a self-contained
> directory, there's no safe and portable way to get the full path to the
> executable, as far as I'm aware. On OSX, I don't know where to even start.

On Linux there is a way to get the executable path, see 
https://github.com/DanielGibson/Snippets/blob/master/DG_misc.h#L239 
(after that you only need to remove everything right of the last slash 
to remove the executable name itself from the path).

On OSX things can be contained in .app bundles, but I'm not very 
familiar with that.

Cheers,
Daniel



More information about the openal mailing list