nx-libs
nx-libs copied to clipboard
hardcoded path in nxcomp
From nxcomp/Loop.cpp
:
const char *systemEnv = getenv("NX_SYSTEM");
if (systemEnv == NULL || *systemEnv == '\0')
{
nxinfo << "Loop: WARNING! No environment for NX_SYSTEM.\n"
<< std::flush;
systemEnv = "/usr/NX";
}
and from nxcomp/Misc.cpp
:
NX_SYSTEM The directory where NX programs and libraries reside.\n\
If not set, the value is assumed to be '/usr/NX'.\n\
Programs, libraries and data files are respectedly\n\
searched in the 'bin', 'lib' and 'share' subdirecto-\n\
ries.\n\
-> we should replace the hardcoded path during compilation.
@uli42: don't we have to live with this as legacy?
Yes, but we should move the path to a #define instead of hiding it in the code.