From 723393227cc274746a1023c8f22e306875e25fb0 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Tue, 2 Aug 2016 15:09:09 +0200 Subject: [PATCH] Require tools from referenced core platform if used --- arduino-core/src/processing/app/BaseNoGui.java | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arduino-core/src/processing/app/BaseNoGui.java b/arduino-core/src/processing/app/BaseNoGui.java index 5aa0c1895..28826070e 100644 --- a/arduino-core/src/processing/app/BaseNoGui.java +++ b/arduino-core/src/processing/app/BaseNoGui.java @@ -171,6 +171,16 @@ public class BaseNoGui { if (platform != null) requiredTools.addAll(platform.getResolvedTools()); + // Add all tools dependencies from the (possibily) referenced core + String core = prefs.get("build.core"); + if (core.contains(":")) { + String split[] = core.split(":"); + TargetPlatform referenced = BaseNoGui.getCurrentTargetPlatformFromPackage(split[0]); + ContributedPlatform referencedPlatform = indexer.getContributedPlaform(referenced); + if (referencedPlatform != null) + requiredTools.addAll(referencedPlatform.getResolvedTools()); + } + String prefix = "runtime.tools."; for (ContributedTool tool : requiredTools) { File folder = tool.getDownloadableContribution(getPlatform()).getInstalledFolder();