MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / getPathForVST3

Function getPathForVST3

plugins/Cardinal/src/Ildaeil.cpp:232–268  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232static const char* getPathForVST3()
233{
234 static std::string path;
235
236 if (path.empty())
237 {
238 #if defined(CARLA_OS_HAIKU)
239 path = homeDir() + "/.vst3:/system/add-ons/media/dssiplugins";
240 #elif defined(CARLA_OS_MAC)
241 path = homeDir() + "/Library/Audio/Plug-Ins/VST3:/Library/Audio/Plug-Ins/VST3";
242 #elif defined(CARLA_OS_WASM)
243 path = "/vst3";
244 #elif defined(CARLA_OS_WIN)
245 path = getSpecialPath(kSpecialPathAppData) + "\\VST3;";
246 path += getSpecialPath(kSpecialPathCommonProgramFiles) + "\\VST3";
247 #else
248 path = homeDir() + "/.vst3:/usr/lib/vst3:/usr/local/lib/vst3";
249
250 std::string winePrefix;
251 if (const char* const envWINEPREFIX = std::getenv("WINEPREFIX"))
252 winePrefix = envWINEPREFIX;
253
254 if (winePrefix.empty())
255 winePrefix = homeDir() + "/.wine";
256
257 if (system::exists(winePrefix))
258 {
259 path += ":" + winePrefix + "/drive_c/Program Files/Common Files/VST3";
260 #ifdef CARLA_OS_64BIT
261 path += ":" + winePrefix + "/drive_c/Program Files (x86)/Common Files/VST3";
262 #endif
263 }
264 #endif
265 }
266
267 return path.c_str();
268}
269
270static const char* getPathForCLAP()
271{

Callers 1

getPluginPathFunction · 0.85

Calls 4

c_strMethod · 0.80
homeDirFunction · 0.50
getSpecialPathFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected