Browse Source

Fix finding jsfx on Windows

Closes #265

Signed-off-by: falkTX <falktx@falktx.com>
tags/22.06
falkTX 1 month ago
parent
commit
5f558c0d84
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 8 additions and 1 deletions
  1. +3
    -0
      plugins/Cardinal/src/Ildaeil.cpp
  2. +4
    -1
      src/CardinalCommon.cpp
  3. +1
    -0
      src/CardinalCommon.hpp

+ 3
- 0
plugins/Cardinal/src/Ildaeil.cpp View File

@@ -60,6 +60,7 @@ namespace rack {
enum SpecialPath {
kSpecialPathUserProfile,
kSpecialPathCommonProgramFiles,
kSpecialPathProgramFiles,
kSpecialPathAppData,
};
std::string getSpecialPath(const SpecialPath type);
@@ -122,6 +123,8 @@ static const char* getPathForJSFX()
path = homeDir() + "/Library/Application Support/REAPER/Effects";
#elif defined(CARLA_OS_WIN)
path = getSpecialPath(kSpecialPathAppData) + "\\REAPER\\Effects";
if (! system::exists(path))
path = getSpecialPath(kSpecialPathProgramFiles) + "\\REAPER\\InstallData\\Effects";
#else
if (const char* const configHome = std::getenv("XDG_CONFIG_HOME"))
path = configHome;


+ 4
- 1
src/CardinalCommon.cpp View File

@@ -77,8 +77,11 @@ std::string getSpecialPath(const SpecialPath type)
case kSpecialPathCommonProgramFiles:
csidl = CSIDL_PROGRAM_FILES_COMMON;
break;
case kSpecialPathProgramFiles:
csidl = CSIDL_PROGRAM_FILES;
break;
case kSpecialPathAppData:
csidl = CSIDL_COMMON_APPDATA;
csidl = CSIDL_APPDATA;
break;
default:
return {};


+ 1
- 0
src/CardinalCommon.hpp View File

@@ -47,6 +47,7 @@ bool isStandalone();
enum SpecialPath {
kSpecialPathUserProfile,
kSpecialPathCommonProgramFiles,
kSpecialPathProgramFiles,
kSpecialPathAppData,
};
std::string getSpecialPath(SpecialPath type);


Loading…
Cancel
Save