diff options
author | Robin Gareus <robin@gareus.org> | 2014-02-25 05:37:55 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-02-25 14:57:57 +0100 |
commit | 993ed5670175870c5b5930860e82db0efe158820 (patch) | |
tree | 1b3f6c0ceef4e98a03ef998e74e8e5ff40487c64 /libs/fst/scanner.cc | |
parent | 1c402f943f1f1c460f099f91aed011967f883bee (diff) |
prepare standalone VST scanner tool.. part one
Diffstat (limited to 'libs/fst/scanner.cc')
-rw-r--r-- | libs/fst/scanner.cc | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/libs/fst/scanner.cc b/libs/fst/scanner.cc new file mode 100644 index 0000000000..8225993b4e --- /dev/null +++ b/libs/fst/scanner.cc @@ -0,0 +1,59 @@ +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <vector> + +#include "ardour/filesystem_paths.h" +#include "ardour/linux_vst_support.h" +#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" +#include "../ardour/linux_vst_support.cc" +#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]; + std::vector<VSTInfo *> *infos; +#ifdef LXVST_SUPPORT + if (strstr (dllpath, ".so" ) == 0) { + infos = vstfx_get_info_lx(dllpath); + } +#endif + +#ifdef WINDOWS_VST_SUPPORT + if (strstr (dllpath, ".dll" ) == 0) { + infos = vstfx_get_info_fst(dllpath); + } +#endif + + if (infos->empty()) { + return EXIT_FAILURE; + } else { + return EXIT_SUCCESS; + } +} + |