Friends, I also find the problem of not using system() calls to start processes. And the path_prefix is not the only configure variable affected by this problem. All path variables in the preference dialog will be affected, for example \thesaurusdir_path. So, If I use some environment variables in a path setting, it will be expanded in the preference dialog. When I change some preference settings (even unrelated ones) and save, the expanded value is saved. It is not what I expected. I hope the preference dialog not to expand the environment variables. These paths are expanded only when they are used. But it apparently is a large patch for may places. Anyone can figure out a better solution?

In addition to this exact path_prefix problem, it causes another problem on Windows: If the external uitility is a .bat/.cmd wrapper, it will fail. For example, ps2pdf13 is a wrapper in gs/lib dir on Windows Ghostscript. I have to fix the configure.py to specially detect .bat/.cmd utilities and prefix "cmd.exe /c" before it. So may it be possible to return to system(), or may we have a better fix?

Regards,
Hangzai

Now I think effectively it's a bug. In the past the external utilities where started with system() calls. Then the shell interpreted the environment variables. This was replaced by QProcess::start. I'm almost sure since then the environment variables has in path_prefix (if existent) will not expanded anymore.
If we do it explicitly when calling prependEnvPath() it works for me.

The attached patch should solve the problem.

Reply via email to