2014-02-24 23:37:55 -05:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "ardour/filesystem_paths.h"
|
2014-03-04 09:25:58 -05:00
|
|
|
#ifdef LXVST_SUPPORT
|
2014-02-24 23:37:55 -05:00
|
|
|
#include "ardour/linux_vst_support.h"
|
2014-03-04 09:25:58 -05:00
|
|
|
#endif
|
2014-02-24 23:37:55 -05:00
|
|
|
#include "ardour/vst_info_file.h"
|
|
|
|
|
|
|
|
/* make stupid waf happy.
|
|
|
|
* waf cannot build multiple variants of .o object files from the same
|
|
|
|
* source using different wscripts.. it mingles e.g.
|
|
|
|
* build/libs/ardour/vst_info_file.cc.1.o for
|
|
|
|
* both lib/ardour/wscript and lib/fst/wscript
|
|
|
|
*
|
|
|
|
* ...but waf does track include dependencies.
|
|
|
|
*/
|
|
|
|
#include "../ardour/vst_info_file.cc"
|
2014-03-04 09:25:58 -05:00
|
|
|
#ifdef LXVST_SUPPORT
|
2014-02-24 23:37:55 -05:00
|
|
|
#include "../ardour/linux_vst_support.cc"
|
2014-03-04 09:25:58 -05:00
|
|
|
#endif
|
2014-02-24 23:37:55 -05:00
|
|
|
#include "../ardour/filesystem_paths.cc"
|
|
|
|
#include "../ardour/directory_names.cc"
|
|
|
|
#include "../pbd/error.cc"
|
|
|
|
#include "../pbd/basename.cc"
|
|
|
|
#include "../pbd/search_path.cc"
|
|
|
|
#include "../pbd/transmitter.cc"
|
|
|
|
#include "../pbd/whitespace.cc"
|
|
|
|
|
|
|
|
#ifdef LXVST_SUPPORT
|
|
|
|
void
|
|
|
|
vstfx_destroy_editor (VSTState* /*vstfx*/) { }
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int main (int argc, char **argv) {
|
|
|
|
if (argc != 2) {
|
|
|
|
fprintf(stderr, "usage: %s <vst>\n", argv[0]);
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
}
|
|
|
|
|
|
|
|
char *dllpath = argv[1];
|
2014-03-18 15:38:37 -04:00
|
|
|
std::vector<VSTInfo *> *infos = 0;
|
2014-02-24 23:37:55 -05:00
|
|
|
#ifdef LXVST_SUPPORT
|
2014-02-25 03:43:40 -05:00
|
|
|
if (strstr (dllpath, ".so")) {
|
2014-02-24 23:37:55 -05:00
|
|
|
infos = vstfx_get_info_lx(dllpath);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WINDOWS_VST_SUPPORT
|
2014-02-25 03:43:40 -05:00
|
|
|
if (strstr (dllpath, ".dll")) {
|
2014-02-24 23:37:55 -05:00
|
|
|
infos = vstfx_get_info_fst(dllpath);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2014-03-18 15:38:37 -04:00
|
|
|
if (!infos || infos->empty()) {
|
2014-02-24 23:37:55 -05:00
|
|
|
return EXIT_FAILURE;
|
|
|
|
} else {
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|