@@ -211,24 +211,27 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
211211 // Note: I was not able to run cmd.exe and command.com
212212 // with QProcess
213213
214- QString msysPath = mAppDir + " /msys/msys.bat" ;
214+ QString msysPath = mAppDir + " /msys/bin/rxvt.exe" ;
215+ QString myArguments = " -backspacekey ^H -sl 2500 -fg white -bg black -sr -fn Courier-16 -tn msys -geometry 80x25 -e /bin/sh --login -i" ;
215216 QFile file ( msysPath );
216217
217218 if ( !file.exists () )
218219 {
219- QMessageBox::warning ( 0 , " Warning" ,
220- " Cannot find MSYS (" + msysPath + " )" );
220+ QMessageBox::warning ( 0 , " Warning" ,
221+ " Cannot find MSYS (" + msysPath + " )" );
221222 }
222223 else
223224 {
224- QProcess *proc = new QProcess (this );
225- proc->start (msysPath);
226- proc->waitForStarted ();
227- if ( proc->state () != QProcess::Running )
228- {
229- QMessageBox::warning ( 0 , " Warning" ,
225+ QProcess *proc = new QProcess (this );
226+ // allow msys to exist in a path with spaces
227+ msysPath = " \" " + msysPath + " \" " ;
228+ proc->start (msysPath + " " + myArguments);
229+ proc->waitForStarted ();
230+ if ( proc->state () != QProcess::Running )
231+ {
232+ QMessageBox::warning ( 0 , " Warning" ,
230233 " Cannot start MSYS (" + msysPath + " )" );
231- }
234+ }
232235 }
233236 return ;
234237#else
0 commit comments