emulator: probe shared library search path
This patch modifies the 'emulator' launcher program to probe
for a adequate directory containing shared libraries that will
be required by the emulator core to implement GLES emulation
properly.
It does that by looking for a library named libOpenglRender.so
(or .dll, or .dylib depending on the platform) in various directories
around the one containing the executable program.
When such a directory is found, it modifies the value of the PATH
or LD_LIBRARY_PATH environment variable before calling exec()
This is necessary because there is no way to change the list
of search directories at runtime, i.e. between the program's start
and the moment it calls dlopen() to load such a library.
Change-Id: I7346d26597382f44931cdf08936b051e74d3641a
1 file changed