mirror of
https://github.com/esp8266/Arduino.git
synced 2025-06-16 11:21:18 +03:00
When build.core is not defined, fall back to "arduino". Fixes #2635
This commit is contained in:
@ -688,7 +688,7 @@ public class BaseNoGui {
|
|||||||
// Add library folder for the current selected platform
|
// Add library folder for the current selected platform
|
||||||
TargetPlatform targetPlatform = getTargetPlatform();
|
TargetPlatform targetPlatform = getTargetPlatform();
|
||||||
if (targetPlatform != null) {
|
if (targetPlatform != null) {
|
||||||
String core = getBoardPreferences().get("build.core");
|
String core = getBoardPreferences().get("build.core", "arduino");
|
||||||
if (core.contains(":")) {
|
if (core.contains(":")) {
|
||||||
String referencedCore = core.split(":")[0];
|
String referencedCore = core.split(":")[0];
|
||||||
TargetPlatform referencedPlatform = getTargetPlatform(referencedCore, targetPlatform.getId());
|
TargetPlatform referencedPlatform = getTargetPlatform(referencedCore, targetPlatform.getId());
|
||||||
|
@ -426,7 +426,7 @@ public class Compiler implements MessageConsumer {
|
|||||||
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
|
TargetPlatform targetPlatform = BaseNoGui.getTargetPlatform();
|
||||||
TargetPlatform corePlatform = null;
|
TargetPlatform corePlatform = null;
|
||||||
PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences();
|
PreferencesMap boardPreferences = BaseNoGui.getBoardPreferences();
|
||||||
String core = boardPreferences.get("build.core");
|
String core = boardPreferences.get("build.core", "arduino");
|
||||||
if (core.contains(":")) {
|
if (core.contains(":")) {
|
||||||
String[] split = core.split(":");
|
String[] split = core.split(":");
|
||||||
core = split[1];
|
core = split[1];
|
||||||
|
@ -319,4 +319,12 @@ public class PreferencesMap extends LinkedHashMap<String, String> {
|
|||||||
return new Boolean(prev);
|
return new Boolean(prev);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String get(String key, String defaultValue) {
|
||||||
|
String value = get(key);
|
||||||
|
if (value != null) {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
return defaultValue;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user