1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-05 15:25:49 +02:00

[Arduino] Get things working on Windows again.

Change-Id: I0bc70a504fcc36cca36d646f35791c6c6fe08345
This commit is contained in:
Doug Schaefer 2015-09-08 13:58:40 -04:00
parent d3e0ebc390
commit cd7319b883
3 changed files with 4 additions and 2 deletions

View file

@ -206,7 +206,7 @@ public class ArduinoLibrary {
} }
} else { } else {
if (ArduinoBuildConfiguration.isSource(file.getName())) { if (ArduinoBuildConfiguration.isSource(file.getName())) {
sources.add(file.getAbsolutePath()); sources.add(ArduinoBuildConfiguration.pathString(file.toPath()));
} }
} }
} }

View file

@ -93,6 +93,7 @@ public class ArduinoManager {
.resolve(Paths.get(packageUrl.getPath()).getFileName()); .resolve(Paths.get(packageUrl.getPath()).getFileName());
File packageFile = packagePath.toFile(); File packageFile = packagePath.toFile();
if (download) { if (download) {
Files.createDirectories(ArduinoPreferences.getArduinoHome());
Files.copy(packageUrl.openStream(), packagePath, StandardCopyOption.REPLACE_EXISTING); Files.copy(packageUrl.openStream(), packagePath, StandardCopyOption.REPLACE_EXISTING);
} }
if (packageFile.exists()) { if (packageFile.exists()) {
@ -125,6 +126,7 @@ public class ArduinoManager {
.resolve(Paths.get(librariesUrl.getPath()).getFileName()); .resolve(Paths.get(librariesUrl.getPath()).getFileName());
File librariesFile = librariesPath.toFile(); File librariesFile = librariesPath.toFile();
if (download) { if (download) {
Files.createDirectories(ArduinoPreferences.getArduinoHome());
Files.copy(librariesUrl.openStream(), librariesPath, StandardCopyOption.REPLACE_EXISTING); Files.copy(librariesUrl.openStream(), librariesPath, StandardCopyOption.REPLACE_EXISTING);
} }
if (librariesFile.exists()) { if (librariesFile.exists()) {

View file

@ -204,7 +204,7 @@ public class ArduinoPlatform {
} }
} else { } else {
if (ArduinoBuildConfiguration.isSource(file.getName())) { if (ArduinoBuildConfiguration.isSource(file.getName())) {
sources.add(file.getAbsolutePath()); sources.add(ArduinoBuildConfiguration.pathString(file.toPath()));
} }
} }
} }