Get 3d plugins working for running from build dir

This commit is contained in:
Marek Roszko
2022-09-08 21:49:10 -04:00
parent b154e47774
commit 087550ebd3
2 changed files with 36 additions and 33 deletions
+9 -1
View File
@@ -289,7 +289,15 @@ wxString PATHS::GetStockPlugins3DPath()
#elif defined( __WXMAC__ )
fn.Assign( wxStandardPaths::Get().GetPluginsDir(), wxEmptyString );
#else
fn.AssignDir( Pgm().GetExecutablePath() );
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
fn.AssignDir( getWindowsKiCadRoot() );
}
else
{
fn.AssignDir( Pgm().GetExecutablePath() );
}
fn.AppendDir( wxT( "plugins" ) );
#endif