| 306 | } |
| 307 | |
| 308 | static const char* getPathForJSFX() |
| 309 | { |
| 310 | static std::string path; |
| 311 | |
| 312 | if (path.empty()) |
| 313 | { |
| 314 | #if defined(CARLA_OS_MAC) |
| 315 | path = homeDir() + "/Library/Application Support/REAPER/Effects"; |
| 316 | #elif defined(CARLA_OS_WASM) |
| 317 | path = "/jsfx"; |
| 318 | #elif defined(CARLA_OS_WIN) |
| 319 | path = getSpecialPath(kSpecialPathAppData) + "\\REAPER\\Effects"; |
| 320 | if (! system::exists(path)) |
| 321 | path = getSpecialPath(kSpecialPathProgramFiles) + "\\REAPER\\InstallData\\Effects"; |
| 322 | #else |
| 323 | if (const char* const configHome = std::getenv("XDG_CONFIG_HOME")) |
| 324 | path = configHome; |
| 325 | else |
| 326 | path = homeDir() + "/.config"; |
| 327 | path += "/REAPER/Effects"; |
| 328 | #endif |
| 329 | } |
| 330 | |
| 331 | return path.c_str(); |
| 332 | } |
| 333 | |
| 334 | static const char* getPluginPath(const PluginType ptype) |
| 335 | { |
no test coverage detected