Commit 4e18b14f authored by jean-pierre charras's avatar jean-pierre charras

Finishing dialog_freeroute_exchange.cpp changes to run freeroute.jar if found in kicad binaries.

Very minor other fix
parent 121494d3
...@@ -259,7 +259,7 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem ...@@ -259,7 +259,7 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem
i = busNumber.Find( '[' ); i = busNumber.Find( '[' );
i++; i++;
while( busNumber[i] != '.' && i < busNumber.Len() ) while( i < busNumber.Len() && busNumber[i] != '.' )
{ {
tmp.Append( busNumber[i] ); tmp.Append( busNumber[i] );
i++; i++;
...@@ -267,12 +267,12 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem ...@@ -267,12 +267,12 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem
tmp.ToLong( &begin ); tmp.ToLong( &begin );
while( busNumber[i] == '.' && i < busNumber.Len() ) while( i < busNumber.Len() && busNumber[i] == '.' )
i++; i++;
tmp.Empty(); tmp.Empty();
while( busNumber[i] != ']' && i < busNumber.Len() ) while( i < busNumber.Len() && busNumber[i] != ']' )
{ {
tmp.Append( busNumber[i] ); tmp.Append( busNumber[i] );
i++; i++;
......
...@@ -203,10 +203,14 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event ) ...@@ -203,10 +203,14 @@ void DIALOG_FREEROUTE::OnLaunchButtonClick( wxCommandEvent& event )
#else #else
#warning Kicad needs wxWidgets >= 2.9.4. version 2.8 is only supported for testing purposes #warning Kicad needs wxWidgets >= 2.9.4. version 2.8 is only supported for testing purposes
#endif // wxCHECK_VERSION( 2, 9, 0 ) #endif // wxCHECK_VERSION( 2, 9, 0 )
#endif // __WINDOWS__
if( m_freeRouterIsLocal ) if( m_freeRouterIsLocal )
command << wxT("bin\\") << javaCommand; command << wxT("bin\\") << javaCommand;
#else // __WINDOWS__
if( m_freeRouterIsLocal )
command << javaCommand;
#endif
else else
// Wrap FullFileName in double quotes in case it has C:\Program Files in it. // Wrap FullFileName in double quotes in case it has C:\Program Files in it.
// The space is interpreted as an argument separator. // The space is interpreted as an argument separator.
...@@ -254,7 +258,11 @@ wxString DIALOG_FREEROUTE::CmdRunFreeRouterLocal() ...@@ -254,7 +258,11 @@ wxString DIALOG_FREEROUTE::CmdRunFreeRouterLocal()
wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX ); wxFileName jarfileName( FindKicadFile( wxT( "freeroute.jar" ) ), wxPATH_UNIX );
wxString command = wxT("java -jar "); wxString command = wxT("java -jar ");
command << wxChar( '"' ) << jarfileName.GetFullPath() << wxT( "\" -de " ); // add "freeroute.jar" to command line:
command << wxChar( '"' ) << jarfileName.GetFullPath() << wxChar( '"' );
// add option to load the .dsn file
command << wxT( " -de " );
// add *.dsn full filename (quoted):
command << wxChar( '"' ) << fullFileName << wxChar( '"' ); command << wxChar( '"' ) << fullFileName << wxChar( '"' );
return command; return command;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment