#include <string.h>
#include <vector>
+#ifdef COMPILER_MSVC
+#include <sys/utime.h>
+#else
+#include <utime.h>
+#endif
+
+#include <glib.h>
+
#include "pbd/pbd.h"
#include "pbd/transmitter.h"
#include "pbd/receiver.h"
+#ifdef __MINGW64__
+#define NO_OLDNAMES // no backwards compat _pid_t, conflict with w64 pthread/sched
+#endif
+
#include "ardour/filesystem_paths.h"
#ifdef LXVST_SUPPORT
#include "ardour/linux_vst_support.h"
#ifdef LXVST_SUPPORT
#include "../ardour/linux_vst_support.cc"
#endif
+#ifdef MACVST_SUPPORT
+#include "../ardour/mac_vst_support.cc"
+#endif
#include "../ardour/filesystem_paths.cc"
#include "../ardour/directory_names.cc"
+#include "../ardour/vst_state.cc"
#ifdef LXVST_SUPPORT
void
char *dllpath = NULL;
if (argc == 3 && !strcmp("-f", argv[1])) {
dllpath = argv[2];
- if (strstr (dllpath, ".so" ) || strstr(dllpath, ".dll")) {
+ const size_t slen = strlen (dllpath);
+ if (
+ (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so"))
+ ||
+ (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll"))
+ ) {
vstfx_remove_infofile(dllpath);
vstfx_un_blacklist(dllpath);
}
std::vector<VSTInfo *> *infos = 0;
+ const size_t slen = strlen (dllpath);
if (0) { }
#ifdef LXVST_SUPPORT
- else if (strstr (dllpath, ".so")) {
+ else if (slen > 3 && 0 == g_ascii_strcasecmp (&dllpath[slen-3], ".so")) {
infos = vstfx_get_info_lx(dllpath);
}
#endif
#ifdef WINDOWS_VST_SUPPORT
- else if (strstr (dllpath, ".dll")) {
+ else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".dll")) {
infos = vstfx_get_info_fst(dllpath);
}
#endif
+
+#ifdef MACVST_SUPPORT
+ else if (slen > 4 && 0 == g_ascii_strcasecmp (&dllpath[slen-4], ".vst")) {
+ infos = vstfx_get_info_mac(dllpath);
+ }
+#endif
else {
fprintf(stderr, "'%s' is not a supported VST plugin.\n", dllpath);
}