Mercurial > hg > svcore
comparison base/HelperExecPath.cpp @ 1694:a9d0b5a2c242 single-point
Also look for helpers in Resources folder on the Mac
author | Chris Cannam |
---|---|
date | Thu, 25 Apr 2019 15:55:51 +0100 |
parents | 75aefcc9f07d |
children | 008e413f6aaf |
comparison
equal
deleted
inserted
replaced
1693:718ce5fb9fec | 1694:a9d0b5a2c242 |
---|---|
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 |