Hi Pritpal, > I am looking for functionality in hbMK2 where > it invokes a shell command in its own process space > like: > >> hbMK2 demowvg.prg -call=["%ProgramFiles%\Microsoft Visual Studio >> 8\VC\vcvarsall.bat" x86] > > The reason is hbIDE can set the env variables for called process, > in this case hbMK2 but cannot call another process for main one. > If you implement above feature, hbIDE can be invoked from anywhere > and user can select from a list of compilers.
I'm sorry, but I can't see why this would be necessary, moreover, I doubt it would work this way. If hbmk2 invokes a subprocess, such as vcvarsall.bat, I see no way that the environment it leaves behind could be kept for compiler tools invoked afterwards. If you need such functionality I think you should pack all your commands (call vcvarsall && hbmk2 ...) in one .bat / .sh file (depending on host platform) or one commandline with multiple commands, and invoke that. Also notice that in order to make "%ProgramFiles%" expression work, you definitely need to invoke the OS shell. The other option is to stick to envvars, and in this case you can set these using hb_setenv() before invoking hbmk2 subprocess. (I do this in hbmk2 to setup some tools automatically) I don't know if this works with QProcess. Brgds, Viktor _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour