# HG changeset patch # User Chris Cannam # Date 1568640197 -3600 # Node ID 008e413f6aaf6d95910a24904da450ff749c2b21 # Parent 6d6740b075c30472eb508dfb6987cf90813fb46c Update helper dir path to look in equivalent of /usr/lib/xxxx on Linux diff -r 6d6740b075c3 -r 008e413f6aaf base/HelperExecPath.cpp --- a/base/HelperExecPath.cpp Thu Sep 12 11:52:19 2019 +0100 +++ b/base/HelperExecPath.cpp Mon Sep 16 14:23:17 2019 +0100 @@ -58,15 +58,27 @@ QStringList HelperExecPath::getHelperDirPaths() { - // Helpers are expected to exist either in the same directory as - // this executable was found, or in either a subdirectory called - // helpers, or on the Mac only, a sibling called Resources. + // Helpers are expected to exist in one of the following, in order + // from most strongly preferred to least: + // + // 1. (on Mac only) in /../Resources + // + // 2. (on non-Windows non-Mac platforms only) in + // /../lib/application-name/ + // + // 3. (on non-Mac platforms only) in /helpers + // + // 4. in QStringList dirs; + QString appName = QCoreApplication::applicationName(); QString myDir = QCoreApplication::applicationDirPath(); #ifdef Q_OS_MAC dirs.push_back(myDir + "/../Resources"); #else +#ifndef Q_OS_WIN32 + dirs.push_back(myDir + "/../lib/" + appName); +#endif dirs.push_back(myDir + "/helpers"); #endif dirs.push_back(myDir);