setting environment for process
Hi everyone,
I've been trying to append a directory to the path, but what I've tried hasn't worked so far. I've seen the example on QProcess but that is for windows, and it is to replace the whole PATH variable. I only want to append something to it.
Code:
env << "CWPROOT=" + environment;
// env << "PATH=$PATH:" + environment + "/bin";
env.
replaceInStrings(QRegExp("^PATH=(.*)", Qt
::CaseInsensitive),
"PATH=/1:/bin:" + environment
+ "/bin");
syncImage.setEnvironment(env);