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

Fix uploader for python3 compat and core 2.6.x#65

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
me-no-dev merged 1 commit intoesp8266:masterfromearlephilhower:fix2.6.0
Nov 25, 2019
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletionssrc/ESP8266FS.java
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -208,7 +208,7 @@ private void createAndUpload(){
File espota = new File(platform.getFolder()+"/tools");
File esptool = new File(platform.getFolder()+"/tools");
String serialPort = PreferencesData.get("serial.port");
String pythonCmd = PreferencesData.get("runtime.os").contentEquals("windows") ? "python.exe" : "python";
String pythonCmd = PreferencesData.get("runtime.os").contentEquals("windows") ? "python3.exe" : "python3";
String uploadCmd = "";

//make sure the serial port or IP is defined
Expand All@@ -224,15 +224,15 @@ private void createAndUpload(){
uploadCmd = uploadPyFile.getAbsolutePath();
}
// Find python.exe if present, don't fail if not found for backwards compat
String[] paths = { platform.getFolder()+"/tools", platform.getFolder()+"/tools/python", PreferencesData.get("runtime.tools.python.path") };
String[] paths = { platform.getFolder()+"/tools", platform.getFolder()+"/tools/python3", PreferencesData.get("runtime.tools.python3.path") };
for (String s: paths) {
File toolPyFile = new File(s, pythonCmd);
if (toolPyFile.exists() && toolPyFile.isFile() && toolPyFile.canExecute()) {
pythonCmd = toolPyFile.getAbsolutePath();
break;
}
}
// pythonCmd now points to either an installed exe with full path or just plain "python(.exe)"
// pythonCmd now points to either an installed exe with full path or just plain "python3(.exe)"

//find espota if IP else find esptool
if(serialPort.split("\\.").length == 4){
Expand DownExpand Up@@ -331,7 +331,7 @@ private void createAndUpload(){
}
System.out.println();
if (!uploadCmd.isEmpty()) {
sysExec(new String[]{pythonCmd, uploadCmd, "--chip", "esp8266", "--port", serialPort, "--baud", uploadSpeed, "write_flash", uploadAddress, imagePath, "--end"});
sysExec(new String[]{pythonCmd, uploadCmd, "--chip", "esp8266", "--port", serialPort, "--baud", uploadSpeed, "write_flash", uploadAddress, imagePath});
} else {
sysExec(new String[]{esptool.getAbsolutePath(), "-cd", resetMethod, "-cb", uploadSpeed, "-cp", serialPort, "-ca", uploadAddress, "-cf", imagePath});
}
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp