Skip to content

Commit 6f24fa6

Browse files
facchinmcmaglie
authored andcommitted
Pass runtime tools to arduino-builder
1 parent fa0678f commit 6f24fa6

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

arduino-core/src/cc/arduino/Compiler.java

+7
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
import java.util.ArrayList;
5252
import java.util.Collections;
5353
import java.util.List;
54+
import java.util.Map;
5455
import java.util.regex.Pattern;
5556
import java.util.stream.Collectors;
5657
import java.util.stream.Stream;
@@ -235,6 +236,12 @@ private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, Targ
235236

236237
commandLine.addArgument("-prefs=build.warn_data_percentage=" + PreferencesData.get("build.warn_data_percentage"));
237238

239+
for (Map.Entry<String, String> entry : BaseNoGui.getBoardPreferences().entrySet()) {
240+
if (entry.getKey().startsWith("runtime.tools")) {
241+
commandLine.addArgument("-prefs=" + entry.getKey() + "=" + entry.getValue());
242+
}
243+
}
244+
238245
//commandLine.addArgument("-debug-level=10", false);
239246

240247
if (verbose) {

arduino-core/src/processing/app/BaseNoGui.java

+1
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ static public PreferencesMap getBoardPreferences() {
169169
for (ContributedTool tool : platform.getResolvedTools()) {
170170
File folder = tool.getDownloadableContribution(getPlatform()).getInstalledFolder();
171171
String toolPath = folder.getAbsolutePath();
172+
prefs.put(prefix + tool.getName() + ".path", toolPath);
172173
PreferencesData.set(prefix + tool.getName() + ".path", toolPath);
173174
PreferencesData.set(prefix + tool.getName() + "-" + tool.getVersion() + ".path", toolPath);
174175
}

0 commit comments

Comments
 (0)