Fix finding jsfx on Windows
Closes #265 Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
parent
697e5ea677
commit
5f558c0d84
3 changed files with 8 additions and 1 deletions
|
|
@ -60,6 +60,7 @@ namespace rack {
|
||||||
enum SpecialPath {
|
enum SpecialPath {
|
||||||
kSpecialPathUserProfile,
|
kSpecialPathUserProfile,
|
||||||
kSpecialPathCommonProgramFiles,
|
kSpecialPathCommonProgramFiles,
|
||||||
|
kSpecialPathProgramFiles,
|
||||||
kSpecialPathAppData,
|
kSpecialPathAppData,
|
||||||
};
|
};
|
||||||
std::string getSpecialPath(const SpecialPath type);
|
std::string getSpecialPath(const SpecialPath type);
|
||||||
|
|
@ -122,6 +123,8 @@ static const char* getPathForJSFX()
|
||||||
path = homeDir() + "/Library/Application Support/REAPER/Effects";
|
path = homeDir() + "/Library/Application Support/REAPER/Effects";
|
||||||
#elif defined(CARLA_OS_WIN)
|
#elif defined(CARLA_OS_WIN)
|
||||||
path = getSpecialPath(kSpecialPathAppData) + "\\REAPER\\Effects";
|
path = getSpecialPath(kSpecialPathAppData) + "\\REAPER\\Effects";
|
||||||
|
if (! system::exists(path))
|
||||||
|
path = getSpecialPath(kSpecialPathProgramFiles) + "\\REAPER\\InstallData\\Effects";
|
||||||
#else
|
#else
|
||||||
if (const char* const configHome = std::getenv("XDG_CONFIG_HOME"))
|
if (const char* const configHome = std::getenv("XDG_CONFIG_HOME"))
|
||||||
path = configHome;
|
path = configHome;
|
||||||
|
|
|
||||||
|
|
@ -77,8 +77,11 @@ std::string getSpecialPath(const SpecialPath type)
|
||||||
case kSpecialPathCommonProgramFiles:
|
case kSpecialPathCommonProgramFiles:
|
||||||
csidl = CSIDL_PROGRAM_FILES_COMMON;
|
csidl = CSIDL_PROGRAM_FILES_COMMON;
|
||||||
break;
|
break;
|
||||||
|
case kSpecialPathProgramFiles:
|
||||||
|
csidl = CSIDL_PROGRAM_FILES;
|
||||||
|
break;
|
||||||
case kSpecialPathAppData:
|
case kSpecialPathAppData:
|
||||||
csidl = CSIDL_COMMON_APPDATA;
|
csidl = CSIDL_APPDATA;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return {};
|
return {};
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ bool isStandalone();
|
||||||
enum SpecialPath {
|
enum SpecialPath {
|
||||||
kSpecialPathUserProfile,
|
kSpecialPathUserProfile,
|
||||||
kSpecialPathCommonProgramFiles,
|
kSpecialPathCommonProgramFiles,
|
||||||
|
kSpecialPathProgramFiles,
|
||||||
kSpecialPathAppData,
|
kSpecialPathAppData,
|
||||||
};
|
};
|
||||||
std::string getSpecialPath(SpecialPath type);
|
std::string getSpecialPath(SpecialPath type);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue