|
From: Bastian M. <bma...@we...> - 2006-06-20 05:04:17
|
Timoth=E9e Lecomte wrote: > Timoth=E9e Lecomte wrote: >> Daniel J Sebald wrote: >> =20 >>> Dr. Johannes Zellner wrote: >>> =20 >>> =20 >>>> in trm/post.trm there's a really ugly hardcoded path: >>>> >>>> #ifndef GNUPLOT_PS_DIR >>>> #define GNUPLOT_PS_DIR "/usr/local/share/gnuplot/4.1/PostScript" >>>> #endif >>>> =20 >> (...) >> >> I don't have any opinion on what to do when GNUPLOT_PS_DIR is not=20 >> defined (ie when not using ./configure), the best is to make sure that= =20 >> all custom makefile's do that properly (something else to do before 4.= 2=20 >> I think). >> =20 > In fact this would be wrong for Windows and probably other platforms=20 > (OS/2 ?), where there are no standard filesystem directories. On these = > platforms, hardcoding a path at compile time is completely wrong. >=20 > Two alternatives for them : > - Encode the paths relatively to the binary. Windows has a function for= =20 > that : GetModuleFileName(). I think, to achieve the same functionality as on other platforms this would be the way to do it. Btw. shouldn't argv[0] contain the path to the executable in a bit more platform independent way? Bastian |