[texworks] [patch] using env PATH on Unix instead of compiled defaults
Norbert Preining
preining at logic.at
Mon May 18 16:41:50 CEST 2009
On Mo, 18 Mai 2009, Norbert Preining wrote:
> Here is a patch that accomplishes that on Unix (Windows I have no idea
> but maybe getenv also returns something useful there?). It is a
> one-liner:
On Windows it seems to return the PATH, too, but only with ; (info from
a Windows master), so I propose:
Index: src/TWApp.cpp
===================================================================
--- src/TWApp.cpp (revision 295)
+++ src/TWApp.cpp (working copy)
@@ -417,16 +417,9 @@
*binaryPaths = *defaultBinPaths;
else {
#ifdef Q_WS_WIN
- *binaryPaths
- << "c:/texlive/2009/bin"
- << "c:/texlive/2008/bin"
- << "c:/texlive/2007/bin"
- << "c:/w32tex/bin"
- << "c:/Program Files/MiKTeX 2.7/miktex/bin"
- << "c:/Program Files (x86)/MiKTeX 2.7/miktex/bin"
- ;
+ *binaryPaths = QString(getenv("PATH")).split(';');
#else
- *binaryPaths = QString(DEFAULT_BIN_PATHS).split(':');
+ *binaryPaths = QString(getenv("PATH")).split(':');
#endif
}
for (int i = binaryPaths->count() - 1; i >= 0; --i) {
Best wishes
Norbert
-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at> Vienna University of Technology
Debian Developer <preining at debian.org> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
KINGSTON BAGPUISE (n.)
A forty-year-old sixteen-stone man trying to commit suicide by
jogging.
--- Douglas Adams, The Meaning of Liff
More information about the texworks
mailing list