Browse Source

Allow launching standalone procs from build dir

newinvert
Jon Evans 2 years ago
parent
commit
181100fe44
  1. 12
      common/gestfich.cpp

12
common/gestfich.cpp

@ -64,6 +64,16 @@ wxString FindKicadFile( const wxString& shortname )
if( wxFileExists( fullFileName ) )
return fullFileName;
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
{
wxFileName buildDir( Pgm().GetExecutablePath(), shortname );
buildDir.RemoveLastDir();
buildDir.AppendDir( shortname );
if( wxFileExists( buildDir.GetFullPath() ) )
return buildDir.GetFullPath();
}
// Test the presence of the file in the directory shortname
// defined by the environment variable KiCad.
if( Pgm().IsKicadEnvVariableDefined() )
@ -340,4 +350,4 @@ bool RmDirRecursive( const wxString& aFileName, wxString* aErrors )
}
return true;
}
}
Loading…
Cancel
Save