From 0e316414099d36b96f5ea06dbd2c631c6ebdc14d Mon Sep 17 00:00:00 2001 From: Austin Blanton Date: Fri, 28 Feb 2014 13:15:25 -0500 Subject: [PATCH] Append system paths to list of paths to check --- openbr/openbr_plugin.cpp | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 80f0559..91c4d70 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -899,8 +899,12 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG { qInstallMessageHandler(messageHandler); + QString sep; #ifndef _WIN32 useGui = useGui && (getenv("DISPLAY") != NULL); + sep = ":"; +#else + sep = ";"; #endif // not _WIN32 // We take in argc as a reference due to: @@ -944,6 +948,7 @@ void br::Context::initialize(int &argc, char *argv[], QString sdkPath, bool useG // Search for SDK if (sdkPath.isEmpty()) { QStringList checkPaths; checkPaths << QDir::currentPath() << QCoreApplication::applicationDirPath(); + checkPaths << QString(getenv("PATH")).split(sep, QString::SkipEmptyParts); bool foundSDK = false; foreach (const QString &path, checkPaths) { -- libgit2 0.21.4