@@ -208,7 +208,7 @@ private void createAndUpload(){
208
208
File espota = new File (platform .getFolder ()+"/tools" );
209
209
File esptool = new File (platform .getFolder ()+"/tools" );
210
210
String serialPort = PreferencesData .get ("serial.port" );
211
- String pythonCmd = PreferencesData .get ("runtime.os" ).contentEquals ("windows" ) ? "python .exe" : "python " ;
211
+ String pythonCmd = PreferencesData .get ("runtime.os" ).contentEquals ("windows" ) ? "python3 .exe" : "python3 " ;
212
212
String uploadCmd = "" ;
213
213
214
214
//make sure the serial port or IP is defined
@@ -224,15 +224,15 @@ private void createAndUpload(){
224
224
uploadCmd = uploadPyFile .getAbsolutePath ();
225
225
}
226
226
// Find python.exe if present, don't fail if not found for backwards compat
227
- String [] paths = { platform .getFolder ()+"/tools" , platform .getFolder ()+"/tools/python " , PreferencesData .get ("runtime.tools.python .path" ) };
227
+ String [] paths = { platform .getFolder ()+"/tools" , platform .getFolder ()+"/tools/python3 " , PreferencesData .get ("runtime.tools.python3 .path" ) };
228
228
for (String s : paths ) {
229
229
File toolPyFile = new File (s , pythonCmd );
230
230
if (toolPyFile .exists () && toolPyFile .isFile () && toolPyFile .canExecute ()) {
231
231
pythonCmd = toolPyFile .getAbsolutePath ();
232
232
break ;
233
233
}
234
234
}
235
- // pythonCmd now points to either an installed exe with full path or just plain "python (.exe)"
235
+ // pythonCmd now points to either an installed exe with full path or just plain "python3 (.exe)"
236
236
237
237
//find espota if IP else find esptool
238
238
if (serialPort .split ("\\ ." ).length == 4 ){
@@ -331,7 +331,7 @@ private void createAndUpload(){
331
331
}
332
332
System .out .println ();
333
333
if (!uploadCmd .isEmpty ()) {
334
- sysExec (new String []{pythonCmd , uploadCmd , "--chip" , "esp8266" , "--port" , serialPort , "--baud" , uploadSpeed , "write_flash" , uploadAddress , imagePath , "--end" });
334
+ sysExec (new String []{pythonCmd , uploadCmd , "--chip" , "esp8266" , "--port" , serialPort , "--baud" , uploadSpeed , "write_flash" , uploadAddress , imagePath });
335
335
} else {
336
336
sysExec (new String []{esptool .getAbsolutePath (), "-cd" , resetMethod , "-cb" , uploadSpeed , "-cp" , serialPort , "-ca" , uploadAddress , "-cf" , imagePath });
337
337
}
0 commit comments