mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-18 12:54:25 +01:00
Libraries search path now include platform specific versions
This commit is contained in:
parent
821481fcd7
commit
7684a2fe85
@ -959,16 +959,19 @@ 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();
|
||||
addLibraries(importMenu, getCoreLibraries(libraryPath));
|
||||
JMenuItem platformItem = new JMenuItem(targetname);
|
||||
platformItem.setEnabled(false);
|
||||
importMenu.add(platformItem);
|
||||
importMenu.addSeparator();
|
||||
for (String p : libraryPath.split(";"))
|
||||
addLibraries(importMenu, getCoreLibraries(p));
|
||||
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user