[texworks] [patch] using env PATH on Unix instead of compiled defaults
Norbert Preining
preining at logic.at
Mon May 18 16:03:11 CEST 2009
Hi Jonathan,
doesn't it make sense to use the current PATH setting on Unix as a
default for paths instead of the compile time generated value?
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:
Index: src/TWApp.cpp
===================================================================
--- src/TWApp.cpp (revision 295)
+++ src/TWApp.cpp (working copy)
@@ -426,7 +426,7 @@
<< "c:/Program Files (x86)/MiKTeX 2.7/miktex/bin"
;
#else
- *binaryPaths = QString(DEFAULT_BIN_PATHS).split(':');
+ *binaryPaths = QString(getenv("PATH")).split(':');
#endif
}
for (int i = binaryPaths->count() - 1; i >= 0; --i) {
I consider that much more useful than the compile time defaults. If we
want we can add *in*addition* the compile time paths, too.
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
-------------------------------------------------------------------------------
ARTHUR It's not a question of whose habitat it is, it's a question of
how hard you hit it.
--- Arthur pointing out one of the disadvantages of gravity,
--- Fit the Tenth.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy
More information about the texworks
mailing list