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

Function getPathForJSFX

plugins/Cardinal/src/Ildaeil.cpp:308–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306}
307
308static 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
334static const char* getPluginPath(const PluginType ptype)
335{

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