comparison base/HelperExecPath.cpp @ 1713:978c143c767f

Merge from branch single-point
author Chris Cannam
date Fri, 17 May 2019 10:02:43 +0100
parents a9d0b5a2c242
children 008e413f6aaf
comparison
equal deleted inserted replaced
1709:ab4fd193262b 1713:978c143c767f
56 } 56 }
57 57
58 QStringList 58 QStringList
59 HelperExecPath::getHelperDirPaths() 59 HelperExecPath::getHelperDirPaths()
60 { 60 {
61 // Helpers are expected to exist either in the same directory as
62 // this executable was found, or in either a subdirectory called
63 // helpers, or on the Mac only, a sibling called Resources.
64
61 QStringList dirs; 65 QStringList dirs;
62 QString myDir = QCoreApplication::applicationDirPath(); 66 QString myDir = QCoreApplication::applicationDirPath();
67 #ifdef Q_OS_MAC
68 dirs.push_back(myDir + "/../Resources");
69 #else
63 dirs.push_back(myDir + "/helpers"); 70 dirs.push_back(myDir + "/helpers");
71 #endif
64 dirs.push_back(myDir); 72 dirs.push_back(myDir);
65 return dirs; 73 return dirs;
66 } 74 }
67 75
68 QStringList 76 QStringList
74 } 82 }
75 83
76 QList<HelperExecPath::HelperExec> 84 QList<HelperExecPath::HelperExec>
77 HelperExecPath::search(QString basename, QStringList &candidates) 85 HelperExecPath::search(QString basename, QStringList &candidates)
78 { 86 {
79 // Helpers are expected to exist either in the same directory as
80 // this executable was found, or in a subdirectory called helpers.
81
82 QString extension = ""; 87 QString extension = "";
83 #ifdef _WIN32 88 #ifdef _WIN32
84 extension = ".exe"; 89 extension = ".exe";
85 #endif 90 #endif
86 91