From 109a6a427f5d85644d6abfb8edb5fb66367965fd Mon Sep 17 00:00:00 2001 From: baldurk Date: Thu, 8 Aug 2024 13:25:46 +0100 Subject: [PATCH] Allow executables to launch to be found via PATH. Closes #3403 --- qrenderdoc/Windows/Dialogs/CaptureDialog.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp index 1adbdfff2..39510b87e 100644 --- a/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp +++ b/qrenderdoc/Windows/Dialogs/CaptureDialog.cpp @@ -1204,10 +1204,12 @@ void CaptureDialog::TriggerCapture() // for non-remote captures, check the executable locally if(!m_Ctx.Replay().CurrentRemote().IsValid()) { - if(!QFileInfo::exists(exe)) + if(!QFileInfo::exists(exe) && QStandardPaths::findExecutable(exe).isEmpty()) { - RDDialog::critical(this, tr("Invalid executable"), - tr("Invalid application executable: %1").arg(exe)); + RDDialog::critical( + this, tr("Invalid executable"), + tr("Invalid executable: %1\nCan't locate this path or a matching executable in PATH") + .arg(exe)); return; } }