diff --git a/apps/launcher/maindialog.cpp b/apps/launcher/maindialog.cpp
index 903cbe457..dcef48c98 100644
--- a/apps/launcher/maindialog.cpp
+++ b/apps/launcher/maindialog.cpp
@@ -173,17 +173,46 @@ void MainDialog::play()
#endif
QProcess process;
+ QFileInfo info(file);
if (!file.exists()) {
- // TODO: Throw error!
- qDebug() << "Could not start process";
+ QMessageBox msgBox;
+ msgBox.setWindowTitle("Error starting OpenMW");
+ msgBox.setIcon(QMessageBox::Warning);
+ msgBox.setStandardButtons(QMessageBox::Ok);
+ msgBox.setText(tr("
Could not find OpenMW
\
+ The OpenMW application is not found.
\
+ Please make sure OpenMW is installed and try again.
"));
+ msgBox.exec();
+
return;
}
- if(!process.startDetached(game)) {
- // TODO: Throw error!;
- qDebug() << "Could not start process";
- qDebug() << "reason was:" << process.errorString();
+ if (!info.isExecutable()) {
+ QMessageBox msgBox;
+ msgBox.setWindowTitle("Error starting OpenMW");
+ msgBox.setIcon(QMessageBox::Critical);
+ msgBox.setStandardButtons(QMessageBox::Ok);
+ msgBox.setText(tr("
Could not start OpenMW
\
+ The OpenMW application is not executable.
\
+ Please make sure you have the right permissions and try again.
"));
+ msgBox.exec();
+
+ return;
+ }
+
+ if (!process.startDetached(game)) {
+ QMessageBox msgBox;
+ msgBox.setWindowTitle("Error starting OpenMW");
+ msgBox.setIcon(QMessageBox::Critical);
+ msgBox.setStandardButtons(QMessageBox::Ok);
+ msgBox.setText(tr("
Could not start OpenMW
\
+ An error occurred while starting OpenMW.
\
+ Press \"Show Details...\" for more information.
"));
+ msgBox.setDetailedText(process.errorString());
+ msgBox.exec();
+
+ return;
} else {
close();
}