----- Original Message ----- From: "Angus Leeming" <[EMAIL PROTECTED]>
To: <lyx-users@lists.lyx.org>
Sent: Tuesday, December 13, 2005 11:11 AM
Subject: Re: There's Something About Textclass.lst [WinXP, installing into]


Stephen Harris wrote:
On my computer, the contents of \path_prefix are a subset of the
Windows PATH environment variable because I've manually added
them. Checking the contents of PATH and comparing it to LyX's
\path_prefix to determine accuracy seems awfully smart, like AI.

The installer searches the Registry in various ways in order to find the
whereabouts of sh.exe, gswinc.exe, python.exe, etc. It's blindingly
obvious that it should first ascertain whether these things are already in
the PATH. Never mind ;-)


I wish I were smarter so that it would be blindingly obvious to me too.
I envision four(5) scenarios:

1. A program has been uninstalled and neither the registry or PATH
trace was removed by the uninstall. There will be a high correlation
between these two events because it arises from a common cause,
a faulty uninstaller, so there is no independent confirmation. I think
it is obvious that there will be no additional benefit from ascertaining
that the program is in the PATH, in this case.

2. A program has been removed that removes its trace in the registry
but fails to erase its PATH entry (if it has been added). Should the
LyX installer decide that the program exists just from its PATH
entry? Probably not. If the answer is probably not, then the LyX
installer can decide to install the program just from the program's
lack of a registry entry. Ascertaining the PATH provides no extra
information, the decision is based on just the registry reporting in
this case also.

3. A program exists in the registry, that does not appear in the PATH.
This happens when the program is not manually added to the PATH,
and does not automatically write itself to the PATH. Not having a
corresponding PATH entry doesn't tell the LyX installer that the
program needs to be installed. Should the program be written to the
PATH based on this information in this case. Probably not. So
ascertaining the PATH does not provide additional information for
a decision.

4. A program exists in the registry and in the PATH. The PATH
confirms this case only when it will already work so there is no
additional information provided in this case; the PATH is not
doing something in this case to distinguish its input from the
cases when the PATH reports false positives. It just happens
to be aligned in this case.

(5.) I've had programs like flpsed and preview that have substituted
for gsview and they aren't written to the registry or PATH. I did put
them as file format viewers. If I had put either one in the PATH,
the LyX installer would not have know to use them in place of
gsview if I did not have that on the hard drive. This last point (5)
is quite minor, I just added it to explain my AI remark.

I had an earlier version of ghostscript 8.13 which did not remove
itself from the registry and remained in the PATH. I'm pretty sure
that I've added C:\texmf and C:\localtexmf to the PATH manually.
I am not sure, but I don't think when I uninstalled Miktex in order to
test TexLive, that the uninstall of Miktex removed those directories
or removed them from the PATH. (perhaps a potential problem)

Perhaps there are some benefits to using the PATH in addition
to checking the registry, but they do not appear to me to be
overwhelmingly obvious, sufficient to glaringly refute the inability
to provide/add confirming evidence to the registry report that I've
mentioned above.

I think checking for the existence of the relevant executable on
the hard drive with the registry, provides a lot more confirming
evidence than the PATH, which purposely or accidentally may
not have been written to during a LyX helper program installation.
Though of course it would have a time trade-off.

[snip]


SH: Isn't he referring to his Windows PATH environment variable?

Yes. He means he's tweaked this from the Start menu. Any process that's
subsequently spawned will have access to a copy of the WindowsOS process'
environment variables.

If you can trim some items of the \path_prefix content because
"everything needed" is already in the Windows PATH, why can't
you trim all the items in \path_prefix if you have all of the contents
of \path_prefix already included in your Windows PATH variable?

You can. If LyX can find gswinc.exe already there's no need for
\path_prefix to tell it where gswinc.exe is.

I questioned his statement because I thought LyX relied on its own
\path_prefix and was independent of the Windows PATH for operation
of LyX function, not that LyX is independent of an OS, or a key part of
it. What does "... I already have everything needed in my path" mean?

Is this question now answered?


Yes, and you can be sure I tested it! Thanks for the detailed explanation.

Quoting that poem -- I'm beginning to suspect you have Scot ancestry,
Stephen

Reply via email to