Traverse 3D viewer plugin subdirectories in debug build directory

Before the change, the plugins had to be installed to one of the default
search paths, but it should not be necessary for developers working on
3D viewer plugins.
This commit is contained in:
Maciej Suminski 2017-08-21 14:17:01 +02:00
parent 91ed3e2bae
commit 55c7d9816e
1 changed files with 12 additions and 0 deletions

View File

@ -131,6 +131,18 @@ void S3D_PLUGIN_MANAGER::loadPlugins( void )
std::string testpath = std::string( fn.GetPathWithSep().ToUTF8() ); std::string testpath = std::string( fn.GetPathWithSep().ToUTF8() );
checkPluginPath( testpath, searchpaths ); checkPluginPath( testpath, searchpaths );
// add subdirectories too
wxDir debugPluginDir( testpath );
wxString subdir;
if( debugPluginDir.GetFirst( &subdir, wxEmptyString, wxDIR_DIRS ) )
{
checkPluginPath( testpath + subdir, searchpaths );
while( debugPluginDir.GetNext( &subdir ) )
checkPluginPath( testpath + subdir, searchpaths );
}
#endif #endif
#ifndef _WIN32 #ifndef _WIN32