Enable JSFX plugin support in Ildaeil

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-05-25 14:19:05 +01:00
parent 70d73741ee
commit 20e6f30bcc
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
5 changed files with 71 additions and 17 deletions

View file

@ -55,6 +55,7 @@
const std::string CARDINAL_VERSION = "22.05";
namespace rack {
namespace settings {
int rateLimit = 0;
}
@ -76,6 +77,9 @@ std::string getSpecialPath(const SpecialPath type)
case kSpecialPathCommonProgramFiles:
csidl = CSIDL_PROGRAM_FILES_COMMON;
break;
case kSpecialPathAppData:
csidl = CSIDL_COMMON_APPDATA;
break;
default:
return {};
}
@ -88,8 +92,22 @@ std::string getSpecialPath(const SpecialPath type)
return {};
}
#endif
std::string homeDir()
{
# ifdef ARCH_WIN
return getSpecialPath(kSpecialPathUserProfile);
# else
if (const char* const home = getenv("HOME"))
return home;
if (struct passwd* const pwd = getpwuid(getuid()))
return pwd->pw_dir;
# endif
return {};
}
} // namespace rack
namespace patchUtils
{
@ -103,19 +121,6 @@ static void promptClear(const char* const message, const std::function<void()> a
asyncDialog::create(message, action);
}
static std::string homeDir()
{
# ifdef ARCH_WIN
return getSpecialPath(kSpecialPathUserProfile);
# else
if (const char* const home = getenv("HOME"))
return home;
if (struct passwd* const pwd = getpwuid(getuid()))
return pwd->pw_dir;
# endif
return {};
}
#endif
void loadDialog()

View file

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

View file

@ -43,6 +43,7 @@ CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/sfzero.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a
CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a
endif # STATIC_BUILD