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