| 187 | } |
| 188 | |
| 189 | static const char* getPathForVST2() |
| 190 | { |
| 191 | static std::string path; |
| 192 | |
| 193 | if (path.empty()) |
| 194 | { |
| 195 | #if defined(CARLA_OS_HAIKU) |
| 196 | path = homeDir() + "/.vst:/system/add-ons/media/vstplugins"; |
| 197 | #elif defined(CARLA_OS_MAC) |
| 198 | path = homeDir() + "/Library/Audio/Plug-Ins/VST:/Library/Audio/Plug-Ins/VST"; |
| 199 | #elif defined(CARLA_OS_WASM) |
| 200 | path = "/vst"; |
| 201 | #elif defined(CARLA_OS_WIN) |
| 202 | path = getSpecialPath(kSpecialPathProgramFiles) + "\\VstPlugins;"; |
| 203 | path += getSpecialPath(kSpecialPathProgramFiles) + "\\Steinberg\\VstPlugins;"; |
| 204 | path += getSpecialPath(kSpecialPathCommonProgramFiles) + "\\VST2"; |
| 205 | #else |
| 206 | path = homeDir() + "/.vst:/usr/lib/vst:/usr/local/lib/vst"; |
| 207 | |
| 208 | std::string winePrefix; |
| 209 | if (const char* const envWINEPREFIX = std::getenv("WINEPREFIX")) |
| 210 | winePrefix = envWINEPREFIX; |
| 211 | |
| 212 | if (winePrefix.empty()) |
| 213 | winePrefix = homeDir() + "/.wine"; |
| 214 | |
| 215 | if (system::exists(winePrefix)) |
| 216 | { |
| 217 | path += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST2"; |
| 218 | path += ":" + winePrefix + "/drive_c/Program Files/VstPlugins"; |
| 219 | path += ":" + winePrefix + "/drive_c/Program Files/Steinberg/VstPlugins"; |
| 220 | #ifdef CARLA_OS_64BIT |
| 221 | path += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST2"; |
| 222 | path += ":" + winePrefix + "/drive_c/Program Files (x86)/VstPlugins"; |
| 223 | path += ":" + winePrefix + "/drive_c/Program Files (x86)/Steinberg/VstPlugins"; |
| 224 | #endif |
| 225 | } |
| 226 | #endif |
| 227 | } |
| 228 | |
| 229 | return path.c_str(); |
| 230 | } |
| 231 | |
| 232 | static const char* getPathForVST3() |
| 233 | { |
no test coverage detected