Fix windows process execution so that it pops up the windows
This commit is contained in:
parent
f0facf6584
commit
47769671fe
|
@ -170,11 +170,12 @@ bool cmWin32ProcessExecution::BorlandRunCommand(
|
||||||
si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
|
si.dwFlags = STARTF_USESTDHANDLES|STARTF_USESHOWWINDOW;
|
||||||
si.hStdOutput = newstdout;
|
si.hStdOutput = newstdout;
|
||||||
si.hStdError = newstdout;
|
si.hStdError = newstdout;
|
||||||
si.wShowWindow = SW_HIDE;
|
si.wShowWindow = SW_SHOWDEFAULT; // SW_HIDE;
|
||||||
|
|
||||||
//set the new handles for the child process si.hStdInput = newstdin;
|
//set the new handles for the child process si.hStdInput = newstdin;
|
||||||
char* commandAndArgs = strcpy(new char[strlen(command)+1], command);
|
char* commandAndArgs = strcpy(new char[strlen(command)+1], command);
|
||||||
if (!CreateProcess(NULL,commandAndArgs,NULL,NULL,TRUE,CREATE_NEW_CONSOLE,
|
if (!CreateProcess(NULL,commandAndArgs,NULL,NULL,TRUE,
|
||||||
|
0, // CREATE_NEW_CONSOLE,
|
||||||
NULL,dir,&si,&pi))
|
NULL,dir,&si,&pi))
|
||||||
{
|
{
|
||||||
std::cerr << "CreateProcess failed " << commandAndArgs << std::endl;
|
std::cerr << "CreateProcess failed " << commandAndArgs << std::endl;
|
||||||
|
@ -403,7 +404,7 @@ static BOOL RealPopenCreateProcess(const char *cmdstring,
|
||||||
siStartInfo.hStdInput = hStdin;
|
siStartInfo.hStdInput = hStdin;
|
||||||
siStartInfo.hStdOutput = hStdout;
|
siStartInfo.hStdOutput = hStdout;
|
||||||
siStartInfo.hStdError = hStderr;
|
siStartInfo.hStdError = hStderr;
|
||||||
siStartInfo.wShowWindow = SW_HIDE;
|
siStartInfo.wShowWindow = SW_SHOWDEFAULT; // SW_HIDE;
|
||||||
|
|
||||||
//std::cout << "Create process: " << s2 << std::endl;
|
//std::cout << "Create process: " << s2 << std::endl;
|
||||||
if (CreateProcess(NULL,
|
if (CreateProcess(NULL,
|
||||||
|
@ -411,7 +412,7 @@ static BOOL RealPopenCreateProcess(const char *cmdstring,
|
||||||
NULL,
|
NULL,
|
||||||
NULL,
|
NULL,
|
||||||
TRUE,
|
TRUE,
|
||||||
CREATE_NEW_CONSOLE,
|
0, //CREATE_NEW_CONSOLE,
|
||||||
NULL,
|
NULL,
|
||||||
path,
|
path,
|
||||||
&siStartInfo,
|
&siStartInfo,
|
||||||
|
|
Loading…
Reference in New Issue