Angus, Georg and Angus 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
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes:
Angus> Indeed, that would make sense. However, this code is from
Angus> os_unix.C. It makes no sense at all for a unix shell, does it?
Go for the simpler version.
JMarc
Georg Baum wrote:
> 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
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 t
Georg Baum wrote:
>> To be specific, I don't see why
>> 1. ExpandPath is needed at all.
>> 2. What the thing inside the if block is meant to be achieving.
>> 3. What the idea behind removing "/.libs/" is all about. Surely, the LyX
>> executable is to be found at build_dir/src/lyx if it's being run
Angus Leeming wrote:
> To be specific, I don't see why
> 1. ExpandPath is needed at all.
> 2. What the thing inside the if block is meant to be achieving.
> 3. What the idea behind removing "/.libs/" is all about. Surely, the LyX
> executable is to be found at build_dir/src/lyx if it's being run i
I'm trying to understand why all this is needed to ascertain the full path
to argv[0], passed to LyX from the command line.
string arg0 = internal_path(argv[0]);
// Expand "./" and "~/"
string expanded_arg0 = ExpandPath(arg0);
if (!os::is_absolute_path(expanded_arg0)) {
//