Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit25890cc

Browse files
authored
Merge pull request#65 from earlephilhower/fix2.6.0
Fix uploader for python3 compat and core 2.6.x
2 parents33969c9 +6408285 commit25890cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎src/ESP8266FS.java‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ private void createAndUpload(){
208208
Fileespota =newFile(platform.getFolder()+"/tools");
209209
Fileesptool =newFile(platform.getFolder()+"/tools");
210210
StringserialPort =PreferencesData.get("serial.port");
211-
StringpythonCmd =PreferencesData.get("runtime.os").contentEquals("windows") ?"python.exe" :"python";
211+
StringpythonCmd =PreferencesData.get("runtime.os").contentEquals("windows") ?"python3.exe" :"python3";
212212
StringuploadCmd ="";
213213

214214
//make sure the serial port or IP is defined
@@ -224,15 +224,15 @@ private void createAndUpload(){
224224
uploadCmd =uploadPyFile.getAbsolutePath();
225225
}
226226
// 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") };
228228
for (Strings:paths) {
229229
FiletoolPyFile =newFile(s,pythonCmd);
230230
if (toolPyFile.exists() &&toolPyFile.isFile() &&toolPyFile.canExecute()) {
231231
pythonCmd =toolPyFile.getAbsolutePath();
232232
break;
233233
}
234234
}
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)"
236236

237237
//find espota if IP else find esptool
238238
if(serialPort.split("\\.").length ==4){
@@ -331,7 +331,7 @@ private void createAndUpload(){
331331
}
332332
System.out.println();
333333
if (!uploadCmd.isEmpty()) {
334-
sysExec(newString[]{pythonCmd,uploadCmd,"--chip","esp8266","--port",serialPort,"--baud",uploadSpeed,"write_flash",uploadAddress,imagePath,"--end"});
334+
sysExec(newString[]{pythonCmd,uploadCmd,"--chip","esp8266","--port",serialPort,"--baud",uploadSpeed,"write_flash",uploadAddress,imagePath});
335335
}else {
336336
sysExec(newString[]{esptool.getAbsolutePath(),"-cd",resetMethod,"-cb",uploadSpeed,"-cp",serialPort,"-ca",uploadAddress,"-cf",imagePath});
337337
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp