@@ -211,24 +211,27 @@ void QgsGrassTools::moduleClicked( Q3ListViewItem * item )
211
211
// Note: I was not able to run cmd.exe and command.com
212
212
// with QProcess
213
213
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" ;
215
216
QFile file ( msysPath );
216
217
217
218
if ( !file.exists () )
218
219
{
219
- QMessageBox::warning ( 0 , " Warning" ,
220
- " Cannot find MSYS (" + msysPath + " )" );
220
+ QMessageBox::warning ( 0 , " Warning" ,
221
+ " Cannot find MSYS (" + msysPath + " )" );
221
222
}
222
223
else
223
224
{
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" ,
230
233
" Cannot start MSYS (" + msysPath + " )" );
231
- }
234
+ }
232
235
}
233
236
return ;
234
237
#else
0 commit comments