diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2006-05-07 18:20:12 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2006-05-07 18:20:12 (GMT) |
commit | de0997f3baf049e0c312ac4fc9b9b762fdc40e00 (patch) | |
tree | 2d15670fa3b1c4279e9d9439de2606f91f865d8b /src/util.cpp | |
parent | f8bf8307e131fd6e3057635f0553ce6d6bb9794f (diff) | |
download | Doxygen-de0997f3baf049e0c312ac4fc9b9b762fdc40e00.zip Doxygen-de0997f3baf049e0c312ac4fc9b9b762fdc40e00.tar.gz Doxygen-de0997f3baf049e0c312ac4fc9b9b762fdc40e00.tar.bz2 |
Release-1.4.6-20060507
Diffstat (limited to 'src/util.cpp')
-rw-r--r-- | src/util.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/util.cpp b/src/util.cpp index 4164398..f2b643d 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2005 by Dimitri van Heesch. + * Copyright (C) 1997-2006 by Dimitri van Heesch. * * Permission to use, copy, modify, and distribute this software and its * documentation under the terms of the GNU General Public License is hereby @@ -129,7 +129,7 @@ void TextGeneratorOLImpl::writeLink(const char *extRef,const char *file, /*! Implements an interruptable system call on Unix/Windows */ -int iSystem(const char *command,const char *args,bool isBatchFile) +int iSystem(const char *command,const char *args,bool commandHasConsole) { QTime time; time.start(); @@ -148,7 +148,7 @@ int iSystem(const char *command,const char *args,bool isBatchFile) Debug::print(Debug::ExtCmd,0,"Executing external command `%s`\n",fullCmd.data()); #if !defined(_WIN32) || defined(__CYGWIN__) - isBatchFile=isBatchFile; + commandHasConsole=commandHasConsole; /*! taken from the system() manpage on my Linux box */ int pid,status=0; @@ -211,15 +211,19 @@ int iSystem(const char *command,const char *args,bool isBatchFile) #endif // _OS_SOLARIS #else // Win32 specific - if (isBatchFile) + if (commandHasConsole) { return system(fullCmd); } else { + // gswin32 is a GUI api which will pop up a window and run + // asynchronously. To prevent both, we use ShellExecuteEx and + // WaitForSingleObject (thanks to Robert Golias for the code) + SHELLEXECUTEINFO sInfo = { sizeof(SHELLEXECUTEINFO), /* structure size */ - SEE_MASK_NOCLOSEPROCESS, /* leave the process running */ + SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI, /* leave the process running */ NULL, /* window handle */ NULL, /* action to perform: open */ command, /* file to execute */ |