Angus Leeming wrote:

> Georg Baum wrote:
>>> Surely, argv[0] is by definition either an absolute path or is relative
>>> to CWD. The shell expands everything else. No?
>> 
>> I am not sure. Maybe there are some weird shells or OSes that behave
>> differently? Then points 1. and 2. make sense. Or the author of it did
>> simply not know that he does not need to expand the path manually.
> 
> Indeed, that would make sense. However, this code is from os_unix.C. It
> makes no sense at all for a unix shell, does it?

AFAIK no, but you are the expert here.

> I ask because ExpandPath requires that os::homepath() be set. Since these
> paths are exactly what is being set in this body of code, it suggests that
> the result will be fragile to changes in the order of which os::homepath()
> and the "absolute path to the lyx executable" are set.

Then I would suggest to remove this stuff unless somebody remembers why it
is there.

BTW, while you are at it: Could you change the code so that calling lyx-qt,
lyx-xforms etc. directly works? It is rather annoying that we install these
executables in prefix/bin but they must be called via a symlink named
'lyx'. Then we could split the rpm package into lyx-common, lyx-qt,
lyx-xforms etc. and allow to install lyx-qt and lyx-xforms in parallel. A
dummy package lyx could then contain a symlink lyx > preferred frontend
executable.


Georg

Reply via email to