test_search_path ()
{
#ifdef PLATFORM_WINDOWS
- std::vector<std::string> path_tok;
- path_tok.push_back (g_win32_get_package_installation_directory_of_module(NULL));
- path_tok.push_back ("share");
- path_tok.push_back ("ardour3");
- path_tok.push_back ("patchfiles");
- return Glib::build_filename (path_tok);
-#else
- return Glib::getenv("MIDIPP_TEST_PATH");
+ if (!getenv("MIDIPP_TEST_PATH")) {
+ std::vector<std::string> path_tok;
+ path_tok.push_back (g_win32_get_package_installation_directory_of_module(NULL));
+ path_tok.push_back ("share");
+ path_tok.push_back ("ardour3");
+ path_tok.push_back ("patchfiles");
+ return Glib::build_filename (path_tok);
+ }
#endif
+ return Glib::getenv("MIDIPP_TEST_PATH");
}
void
}
}
-void
+void
MidnamTest::load_all_midnams_test ()
{
vector<std::string> result;
cout << "Loading " << result.size() << " MIDI patches from " << test_search_path ().to_string () << endl;
for (vector<std::string>::iterator i = result.begin(); i != result.end(); ++i) {
- cout << "Processing file " << *i << endl;
+ cout << "Processing file " << Glib::path_get_basename(*i) << endl;
boost::shared_ptr<MIDINameDocument> document(new MIDINameDocument(*i));
XMLTree xmldoc(*i);