Libraries search path now include platform specific versions

This commit is contained in:
Cristian Maglie 2011-10-24 11:58:52 +02:00
parent 821481fcd7
commit 7684a2fe85
2 changed files with 14 additions and 11 deletions

View File

@ -959,17 +959,20 @@ public class Base {
//Choose which library to add by chip platform
try {
//Find the current target. Get the platform, and then select the correct name and core path.
String platformname = getBoardPreferences().get("platform");
String targetname = getPlatformPreferences(platformname).get("name");
String libraryPath = getPlatformPreferences(platformname).get("library.core.path");
// Find the current target. Get the platform, and then select the correct
// name and core path.
String platformname = getBoardPreferences().get("platform");
Map<String, String> platformPrefs = getPlatformPreferences(platformname);
String targetname = platformPrefs.get("name");
String libraryPath = platformPrefs.get("library.core.path");
JMenuItem platformItem = new JMenuItem(targetname);
platformItem.setEnabled(false);
importMenu.add(platformItem);
importMenu.addSeparator();
for (String p : libraryPath.split(";"))
addLibraries(importMenu, getCoreLibraries(p));
JMenuItem platformItem = new JMenuItem(targetname);
platformItem.setEnabled(false);
importMenu.add(platformItem);
importMenu.addSeparator();
addLibraries(importMenu, getCoreLibraries(libraryPath));
} catch (IOException e) {
e.printStackTrace();
}

View File

@ -65,5 +65,5 @@ sam.compiler.upload.cmd=
sam.compiler.upload.flags=
sam.compiler.define=-DARDUINO=
sam.library.path=./hardware/sam/cores/sam
sam.library.core.path=./libraries
sam.library.core.path=./libraries;./hardware/sam/libraries