mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-10 21:24:12 +01:00
Don't give up when loading hardware/ profile directories with some invalid directories
This allows you to create hardware profiles that support both pre-1.5 and 1.5 onwards (boards.txt, cores, bootloader etc. in root for pre-1.5 and <architecture>/ directories containing 1.5 onward content. Still prints a warning if a hardware folder doesn't contain anything 1.5 compatible.
This commit is contained in:
parent
7959d85dd4
commit
b8c795e184
@ -47,8 +47,16 @@ public class TargetPackage {
|
|||||||
if (!subFolder.exists() || !subFolder.canRead())
|
if (!subFolder.exists() || !subFolder.canRead())
|
||||||
continue;
|
continue;
|
||||||
String arch = subFolder.getName();
|
String arch = subFolder.getName();
|
||||||
|
try {
|
||||||
TargetPlatform platform = new TargetPlatform(arch, subFolder, this);
|
TargetPlatform platform = new TargetPlatform(arch, subFolder, this);
|
||||||
platforms.put(arch, platform);
|
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?");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user