Add patch from Jacobo Aragunde Perez <Log of opened and closed applications in KiCad launcher>

This commit is contained in:
Jacobo Aragunde Perez
2013-01-18 11:42:23 +01:00
committed by jean-pierre charras
parent 07273ac439
commit 295b5b5dea
7 changed files with 128 additions and 37 deletions
+10 -7
View File
@@ -415,7 +415,8 @@ wxString FindKicadFile( const wxString& shortname )
}
int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& param )
int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& param,
wxProcess *callback )
{
wxString FullFileName;
@@ -425,19 +426,21 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, const wxString& para
#ifdef __WXMAC__
if( wxFileExists( FullFileName ) || wxDir::Exists( FullFileName ) )
{
ProcessExecute( wxGetApp().GetExecutablePath() + wxT("/") + ExecFile + wxT(" ") + param );
} else {
ProcessExecute( wxT("/usr/bin/open ") + param );
return ProcessExecute( wxGetApp().GetExecutablePath() + wxT( "/" )
+ ExecFile + wxT( " " )
+ param, wxEXEC_ASYNC, callback );
}
else
{
return ProcessExecute( wxT( "/usr/bin/open " ) + param, wxEXEC_ASYNC, callback );
}
return 0;
#else
if( wxFileExists( FullFileName ) )
{
if( !param.IsEmpty() )
FullFileName += wxT( " " ) + param;
ProcessExecute( FullFileName );
return 0;
return ProcessExecute( FullFileName, wxEXEC_ASYNC, callback );
}
#endif
wxString msg;