From 57c269e6de7ff6d6381c1cb68d6294a6ceabbb43 Mon Sep 17 00:00:00 2001 From: VoxelTek <53562267+VoxelTek@users.noreply.github.com> Date: Thu, 26 Jun 2025 16:28:47 +1000 Subject: [PATCH] Add error popup if unable to find game executable --- CONFIG/MainDlg.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/CONFIG/MainDlg.cpp b/CONFIG/MainDlg.cpp index e187e88d..9f105f33 100644 --- a/CONFIG/MainDlg.cpp +++ b/CONFIG/MainDlg.cpp @@ -11,6 +11,7 @@ #include "res/resource.h" #include +#include #include #include #include @@ -164,9 +165,21 @@ void CMainDialog::launch() } QDir::setCurrent(QCoreApplication::applicationDirPath()); #ifdef _WIN32 - QProcess::startDetached("./isle.exe"); + if (!QProcess::startDetached("./isle.exe")) { + QMessageBox msgBox; + msgBox.setText("Unable to locate isle executable!"); + msgBox.setWindowTitle("Error"); + msgBox.exec(); + } #else - QProcess::startDetached("./isle"); + if (!QProcess::startDetached("./isle")) { // Check in isle-config directory + if (!QProcess::startDetached("isle")) { // Check in $PATH + QMessageBox msgBox; + msgBox.setText("Unable to locate isle executable!"); + msgBox.setWindowTitle("Error"); + msgBox.exec(); + } + } #endif QDialog::accept(); }