Mercurial > hg > piper-cpp
comparison vamp-stubber/stubber.cpp @ 241:fdab0a246298
Report and fail if no plugins found (i.e. wrong library name, usually)
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Tue, 13 Jun 2017 16:24:24 +0100 |
parents | d00199f3b010 |
children |
comparison
equal
deleted
inserted
replaced
240:d00199f3b010 | 241:fdab0a246298 |
---|---|
320 usage(); | 320 usage(); |
321 } | 321 } |
322 } | 322 } |
323 | 323 |
324 string libname = arg; | 324 string libname = arg; |
325 | 325 |
326 auto li = libname.rfind('.'); | |
327 if (li != std::string::npos) { | |
328 cerr << "NOTE: library name is to be specified without extension, dropping \"" << libname.substr(li) << "\"" << endl; | |
329 libname = libname.substr(0, li); | |
330 } | |
331 | |
326 try { | 332 try { |
327 initFds(false); | 333 initFds(false); |
328 } catch (exception &e) { | 334 } catch (exception &e) { |
329 cerr << "ERROR: " << e.what() << endl; | 335 cerr << "ERROR: " << e.what() << endl; |
330 exit(1); | 336 exit(1); |
334 | 340 |
335 ListResponse resp = makeRequest(libname); | 341 ListResponse resp = makeRequest(libname); |
336 | 342 |
337 resumeOutput(); | 343 resumeOutput(); |
338 | 344 |
345 if (resp.available.empty()) { | |
346 cerr << "ERROR: No plugin(s) found in library named \"" | |
347 << libname << "\"\nCheck that the library name is correct and the right files are in $VAMP_PATH.\nThat would mean either " | |
348 << libname << ".so, " << libname << ".dll, or " << libname | |
349 << ".dylib (depending on your platform), as well as " | |
350 << libname << ".n3 and " << libname << ".cat." | |
351 << endl; | |
352 exit(1); | |
353 } | |
354 | |
339 emitFor(libname, resp); | 355 emitFor(libname, resp); |
340 | 356 |
341 exit(0); | 357 exit(0); |
342 } | 358 } |