Re: Absolute paths



kevin lyda wrote:

> trying to get the path of the current executable is a unix faq and the
> short answer is "you can't.  don't do it."  the slightly longer answer
> is "that's not the way to make your code location independent."

You are correct in general, but wrong in this particular case. The FAQ
says "There is no *portable* way to do it." And it's correct. But the key
word is portable.

There are OS's which provide this information reliably. Designing an
application around this feature (so that the app doesn't work on OS
which doesn't have it) is wrong. However, our sole purpose for dealing
with that question here is to provide a way to have location independent
binary package. So if I take an advantage of a particular OS and implement
some code which would allow me to create location independent binary package,
that would work fine on that particular OS. Users on other systems won't
have that option with their binary packages, but everything else will
work.

The whole purpose of implementing this stuff is to enable package
installation in a particular way. It has nothing to do with application or
library feature sets, so it doesn't do harm to anyone.

-- 
 .-.   .-.    I don't work for my employer.
(_  \ /  _)
     |        dave@srce.hr
     |        dave@fly.srk.fer.hr





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