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




At 02:44 PM 5/23/2007, David =?iso-8859-2?B?TmXoYXMgKFlldGkp?= wrote:
On Wed, May 23, 2007 at 03:12:54PM -0600, Michael L Torrie wrote:
> The current directory as defined by the
> directory the gtk dlls are in, yes.

The current [working] directory is what getwd() returns.
At least that's what everyone else seems to mean by the
current directory.

> It works very, very well for the win32 GTK libraries.

Finding self is normally based on GetModuleHandleW()
+ GetModuleFileNameW() on Win32.  I asked how you do this on
other systems.

Moreover, Win32 has some habit of looking for libraries in
the executable's directory, and that's both weird and the
only reason why it works.

Yeti

(Sorry for being busy-body here...; and keep in mind that I might have not read up the thread messages in details.)

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?


--
Daniel Yek




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