mirror of https://github.com/noisymime/Arduino.git
Libraries search path now include platform specific versions
This commit is contained in:
parent
821481fcd7
commit
7684a2fe85
|
@ -959,17 +959,20 @@ public class Base {
|
||||||
//Choose which library to add by chip platform
|
//Choose which library to add by chip platform
|
||||||
|
|
||||||
try {
|
try {
|
||||||
//Find the current target. Get the platform, and then select the correct name and core path.
|
// Find the current target. Get the platform, and then select the correct
|
||||||
String platformname = getBoardPreferences().get("platform");
|
// name and core path.
|
||||||
String targetname = getPlatformPreferences(platformname).get("name");
|
String platformname = getBoardPreferences().get("platform");
|
||||||
String libraryPath = getPlatformPreferences(platformname).get("library.core.path");
|
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) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,5 +65,5 @@ sam.compiler.upload.cmd=
|
||||||
sam.compiler.upload.flags=
|
sam.compiler.upload.flags=
|
||||||
sam.compiler.define=-DARDUINO=
|
sam.compiler.define=-DARDUINO=
|
||||||
sam.library.path=./hardware/sam/cores/sam
|
sam.library.path=./hardware/sam/cores/sam
|
||||||
sam.library.core.path=./libraries
|
sam.library.core.path=./libraries;./hardware/sam/libraries
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue