static
| 242 | |
| 243 | // static |
| 244 | void ModuleManager::FindModules(FilePaths &files) |
| 245 | { |
| 246 | const auto &audacityPathList = FileNames::AudacityPathList(); |
| 247 | FilePaths pathList; |
| 248 | wxString pathVar; |
| 249 | |
| 250 | // Code from LoadLadspa that might be useful in load modules. |
| 251 | pathVar = wxGetenv(wxT("AUDACITY_MODULES_PATH")); |
| 252 | if (!pathVar.empty()) |
| 253 | FileNames::AddMultiPathsToPathList(pathVar, pathList); |
| 254 | |
| 255 | for (const auto &path : audacityPathList) { |
| 256 | wxString prefix = path + wxFILE_SEP_PATH; |
| 257 | FileNames::AddUniquePathToPathList(prefix + wxT("modules"), |
| 258 | pathList); |
| 259 | if (files.size()) { |
| 260 | break; |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | #if defined(__WXMSW__) |
| 265 | FileNames::FindFilesInPathList(wxT("*.dll"), pathList, files); |
| 266 | #else |
| 267 | FileNames::FindFilesInPathList(wxT("*.so"), pathList, files); |
| 268 | #endif |
| 269 | } |
| 270 | |
| 271 | void ModuleManager::TryLoadModules( |
| 272 | const FilePaths &files, FilePaths &decided, DelayedErrors &errors) |
nothing calls this directly
no test coverage detected