Re: How to create a self contained GTK+ Application for Linux



On Wed, 2007-05-23 at 15:12 -0700, Daniel Yek wrote:
(Sorry for being busy-body here...; and keep in mind that I might have not 
read up the thread messages in details.)

No more than the rest of us. :)


If it is to the executable path, it is easier -- by reading the symbolic 
link target of:
   /proc/<pid>/exe
if the symbolic link exists.

For DSOs, is it an option to get the module load address and parse:
   /proc/<pid>/maps
to find out the module load address, in the name of making bundled modules 
work more reliably?

That is not portable at all.  AIX 4 has no /proc, and older unixes may
have /proc, but not the maps stuff.  Unless Posix has an API for doing
this (I don't believe it does), it's not a viable solution.

Really, the only issue here is having a way for GTK to find the loadable
modules and plugins and things.  The linker can find the libraries based
on LD_LIBRARY_PATH, and GTK, Pango, and others can (hopefully) be set to
check environment variables to find their modules and data files.
That's the most portable way to do this, the cleanest, and least
dependent on OS-specific behavior.








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