Merge branch 'ide-1.5.x-thirdpartyboardprofiles' of github.com:projectgus/Arduino into projectgus-ide-1.5.x-thirdpartyboardprofiles

Conflicts:
	app/src/processing/app/debug/BasicUploader.java
This commit is contained in:
Cristian Maglie 2013-07-15 21:06:02 +02:00
commit 3a68385c07
2 changed files with 17 additions and 3 deletions

View File

@ -51,7 +51,13 @@ public class BasicUploader extends Uploader {
TargetPlatform targetPlatform = Base.getTargetPlatform();
PreferencesMap prefs = Preferences.getMap();
prefs.putAll(Base.getBoardPreferences());
prefs.putAll(targetPlatform.getTool(prefs.getOrExcept("upload.tool")));
String tool = prefs.getOrExcept("upload.tool");
if (tool.contains(":")) {
String[] split = tool.split(":", 2);
targetPlatform = Base.getCurrentTargetPlatformFromPackage(split[0]);
tool = split[1];
}
prefs.putAll(targetPlatform.getTool(tool));
// if no protocol is specified for this board, assume it lacks a
// bootloader and upload using the selected programmer.

View File

@ -47,8 +47,16 @@ public class TargetPackage {
if (!subFolder.exists() || !subFolder.canRead())
continue;
String arch = subFolder.getName();
TargetPlatform platform = new TargetPlatform(arch, subFolder, this);
platforms.put(arch, platform);
try {
TargetPlatform platform = new TargetPlatform(arch, subFolder, this);
platforms.put(arch, platform);
} catch (TargetPlatformException e) {
continue;
}
}
if(platforms.size() == 0) {
throw new TargetPlatformException("No architecture directories with boards.txt files were found in hardware folder " + _folder.getName() + ". Is it pre-1.5?");
}
}