Index: src/diagram.cpp =================================================================== RCS file: /cvsroot/doxygen/src/diagram.cpp,v retrieving revision 1.47 diff -u -r1.47 diagram.cpp --- src/diagram.cpp 11 Jan 2005 19:39:21 -0000 1.47 +++ src/diagram.cpp 20 Mar 2006 04:46:34 -0000 @@ -1248,7 +1248,7 @@ epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", epsBaseName.data(),epsBaseName.data()); //printf("Converting eps using `%s'\n",epstopdfCmd.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); return; Index: src/dirdef.cpp =================================================================== RCS file: /cvsroot/doxygen/src/dirdef.cpp,v retrieving revision 1.13 diff -u -r1.13 dirdef.cpp --- src/dirdef.cpp 9 Nov 2005 21:17:04 -0000 1.13 +++ src/dirdef.cpp 20 Mar 2006 04:46:35 -0000 @@ -908,7 +908,7 @@ //QCString dotArgs(4096); //dotArgs.sprintf("%s -Tgif -o %s",path.data(),outFile.data()); - //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + //if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0) //{ // err("Problems running dot. Check your installation!\n"); //} Index: src/docparser.cpp =================================================================== RCS file: /cvsroot/doxygen/src/docparser.cpp,v retrieving revision 1.84 diff -u -r1.84 docparser.cpp --- src/docparser.cpp 15 Jan 2006 22:13:58 -0000 1.84 +++ src/docparser.cpp 20 Mar 2006 04:46:41 -0000 @@ -216,7 +216,7 @@ epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"", outputDir.data(), baseName.data(), outputDir.data(), baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); } Index: src/dot.cpp =================================================================== RCS file: /cvsroot/doxygen/src/dot.cpp,v retrieving revision 1.107 diff -u -r1.107 dot.cpp --- src/dot.cpp 24 Oct 2005 18:18:56 -0000 1.107 +++ src/dot.cpp 20 Mar 2006 04:46:44 -0000 @@ -415,7 +415,7 @@ dotArgs+=' '; dotArgs+=*s; } - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0) { goto error; } @@ -425,7 +425,7 @@ for (li.toFirst();(s=li.current());++li) { QCString dotArgs="\""+m_file+"\" "+*s; - if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs)!=0) + if (iSystem(Config_getString("DOT_PATH")+"dot",dotArgs,FALSE)!=0) { goto error; } @@ -1853,7 +1853,7 @@ QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2111,7 +2111,7 @@ QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2289,7 +2289,7 @@ QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2473,7 +2473,7 @@ QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); @@ -2644,7 +2644,7 @@ QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", outFile,outFile); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); } @@ -2986,7 +2986,7 @@ QCString epstopdfArgs(maxCmdLine); epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"", baseName.data(),baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) + if (iSystem("epstopdf",epstopdfArgs)!=0) { err("Error: Problems running epstopdf. Check your TeX installation!\n"); QDir::setCurrent(oldDir); Index: src/formula.cpp =================================================================== RCS file: /cvsroot/doxygen/src/formula.cpp,v retrieving revision 1.35 diff -u -r1.35 formula.cpp --- src/formula.cpp 28 Mar 2005 13:38:52 -0000 1.35 +++ src/formula.cpp 20 Mar 2006 04:46:46 -0000 @@ -172,56 +172,26 @@ int gy = (((int)((y2-y1)*scaleFactor))+3)&~2; // Then we run ghostscript to convert the postscript to a pixmap // The pixmap is a truecolor image, where only black and white are - // used. -#if defined(_WIN32) && !defined(__CYGWIN__) - char gsArgs[256]; - sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw " - "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps", - gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72), - formBase.data(),formBase.data() - ); - // 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 */ - NULL, /* window handle */ - NULL, /* action to perform: open */ - "gswin32.exe", /* file to execute */ - gsArgs, /* argument list */ - NULL, /* use current working dir */ - SW_HIDE, /* minimize on start-up */ - 0, /* application instance handle */ - NULL, /* ignored: id list */ - NULL, /* ignored: class name */ - NULL, /* ignored: key class */ - 0, /* ignored: hot key */ - NULL, /* ignored: icon */ - NULL /* resulting application handle */ - }; - if (!ShellExecuteEx(&sInfo)) - { - err("Problem running ghostscript. Check your installation!\n"); - return; - } - else if (sInfo.hProcess) /* executable was launched, wait for it to finish */ - { - WaitForSingleObject(sInfo.hProcess,INFINITE); - } -#else + // used. + +#if defined(_WIN32) && !defined(__CYGWIN__) + // used the c version of program, so standard in / standard out work. + const char *ghostscriptCommand = "gswin32c.exe"; +#else + const char *ghostscriptCommand = "gs"; +#endif + char gsArgs[4096]; sprintf(gsArgs,"-q -g%dx%d -r%dx%dx -sDEVICE=ppmraw " "-sOutputFile=%s.pnm -dNOPAUSE -dBATCH -- %s.ps", gx,gy,(int)(scaleFactor*72),(int)(scaleFactor*72), formBase.data(),formBase.data() ); - if (iSystem("gs",gsArgs)!=0) + if (iSystem(ghostscriptCommand,gsArgs)!=0) { - err("Problem running ghostscript. Check your installation!\n"); + err("Problem running ghostscript %s %s. Check your installation!\n",ghostscriptCommand,gsArgs); return; } -#endif f.setName(formBase+".pnm"); uint imageX=0,imageY=0; // we read the generated image again, to obtain the pixel data. Index: src/util.cpp =================================================================== RCS file: /cvsroot/doxygen/src/util.cpp,v retrieving revision 1.183 diff -u -r1.183 util.cpp --- src/util.cpp 27 Feb 2006 20:11:09 -0000 1.183 +++ src/util.cpp 20 Mar 2006 04:46:53 -0000 @@ -129,7 +129,7 @@ /*! 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 @@ 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 @@ #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 */ Index: src/util.h =================================================================== RCS file: /cvsroot/doxygen/src/util.h,v retrieving revision 1.97 diff -u -r1.97 util.h --- src/util.h 27 Feb 2006 20:11:09 -0000 1.97 +++ src/util.h 20 Mar 2006 04:46:57 -0000 @@ -232,7 +232,7 @@ QCString stripScope(const char *name); -int iSystem(const char *command,const char *args,bool isBatchFile=FALSE); +int iSystem(const char *command,const char *args,bool commandHasConsole=TRUE); QCString convertToHtml(const char *s);