Skip to content

update arduino-builder to 1.3.25 #6100

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions app/src/cc/arduino/view/preferences/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ private void initComponents() {
enableCodeFoldingBox = new javax.swing.JCheckBox();
verifyUploadBox = new javax.swing.JCheckBox();
externalEditorBox = new javax.swing.JCheckBox();
cacheCompiledCore = new javax.swing.JCheckBox();
checkUpdatesBox = new javax.swing.JCheckBox();
updateExtensionBox = new javax.swing.JCheckBox();
saveVerifyUploadBox = new javax.swing.JCheckBox();
Expand Down Expand Up @@ -244,6 +245,9 @@ public void mouseEntered(java.awt.event.MouseEvent evt) {
externalEditorBox.setText(tr("Use external editor"));
checkboxesContainer.add(externalEditorBox);

cacheCompiledCore.setText(tr("Aggressively cache compiled core"));
checkboxesContainer.add(cacheCompiledCore);

checkUpdatesBox.setText(tr("Check for updates on startup"));
checkboxesContainer.add(checkUpdatesBox);

Expand Down Expand Up @@ -678,6 +682,7 @@ private void autoScaleCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {//
private javax.swing.JCheckBox enableCodeFoldingBox;
private javax.swing.JButton extendedAdditionalUrlFieldWindow;
private javax.swing.JCheckBox externalEditorBox;
private javax.swing.JCheckBox cacheCompiledCore;
private javax.swing.JTextField fontSizeField;
private javax.swing.JLabel fontSizeLabel;
private javax.swing.JLabel jLabel1;
Expand Down Expand Up @@ -772,6 +777,8 @@ private void savePreferencesData() {

PreferencesData.setBoolean("editor.external", externalEditorBox.isSelected());

PreferencesData.setBoolean("compiler.cache_core", cacheCompiledCore.isSelected());

PreferencesData.setBoolean("update.check", checkUpdatesBox.isSelected());

PreferencesData.setBoolean("editor.update_extension", updateExtensionBox.isSelected());
Expand Down Expand Up @@ -832,6 +839,8 @@ private void showPrerefencesData() {

externalEditorBox.setSelected(PreferencesData.getBoolean("editor.external"));

cacheCompiledCore.setSelected(PreferencesData.get("compiler.cache_core") == null || PreferencesData.getBoolean("compiler.cache_core"));

checkUpdatesBox.setSelected(PreferencesData.getBoolean("update.check"));

updateExtensionBox.setSelected(PreferencesData.get("editor.update_extension") == null || PreferencesData.getBoolean("editor.update_extension"));
Expand Down
9 changes: 8 additions & 1 deletion arduino-core/src/cc/arduino/Compiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ enum BuilderAction {
private final File pathToSketch;
private final Sketch sketch;
private String buildPath;
private File buildCache;
private final boolean verbose;
private RunnerException exception;

Expand All @@ -156,9 +157,10 @@ public String build(CompilerProgressListener progListener, boolean exportHex) th
listeners.add(progListener);
return this.build(listeners, exportHex);
}

public String build(ArrayList<CompilerProgressListener> progListeners, boolean exportHex) throws RunnerException, PreferencesMapException, IOException {
this.buildPath = sketch.getBuildPath().getAbsolutePath();
this.buildCache = BaseNoGui.getCachePath();

TargetBoard board = BaseNoGui.getTargetBoard();
if (board == null) {
Expand Down Expand Up @@ -258,6 +260,11 @@ private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, Targ
cmd.add(buildPath);
cmd.add("-warnings=" + PreferencesData.get("compiler.warning_level"));

if (PreferencesData.getBoolean("compiler.cache_core") == true && buildCache != null) {
cmd.add("-build-cache");
cmd.add(buildCache.getAbsolutePath());
}

PreferencesData.getMap()
.subTree("runtime.build_properties_custom")
.entrySet()
Expand Down
19 changes: 18 additions & 1 deletion arduino-core/src/processing/app/BaseNoGui.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
import processing.app.packages.LibraryList;
import processing.app.packages.UserLibrary;

import cc.arduino.files.DeleteFilesOnShutdown;
import processing.app.helpers.FileUtils;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.File;
Expand Down Expand Up @@ -100,6 +103,8 @@ public class BaseNoGui {

private static String boardManagerLink = "";

private static File buildCache;

// Returns a File object for the given pathname. If the pathname
// is not absolute, it is interpreted relative to the current
// directory when starting the IDE (which is not the same as the
Expand Down Expand Up @@ -131,7 +136,7 @@ static public PreferencesMap getBoardPreferences() {
if (board == null)
return null;
String boardId = board.getId();

PreferencesMap prefs = new PreferencesMap(board.getPreferences());

String extendedName = prefs.get("name");
Expand Down Expand Up @@ -256,6 +261,18 @@ static public String getPortableSketchbookFolder() {
return portableSketchbookFolder;
}

static public File getCachePath() {
if (buildCache == null) {
try {
buildCache = FileUtils.createTempFolder("arduino_cache_");
DeleteFilesOnShutdown.add(buildCache);
} catch (IOException e) {
return null;
}
}
return buildCache;
}

/**
* Convenience method to get a File object for the specified filename inside
* the settings folder.
Expand Down
1 change: 0 additions & 1 deletion build/arduino-builder-linux32-1.3.24.tar.bz2.sha

This file was deleted.

1 change: 1 addition & 0 deletions build/arduino-builder-linux32-1.3.25.tar.bz2.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
31160c158c98e4623c52f058830d99a0fd69f0df
1 change: 0 additions & 1 deletion build/arduino-builder-linux64-1.3.24.tar.bz2.sha

This file was deleted.

1 change: 1 addition & 0 deletions build/arduino-builder-linux64-1.3.25.tar.bz2.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4bcb333c6942e2e033ce92961a06df9124c7a9c7
1 change: 0 additions & 1 deletion build/arduino-builder-linuxarm-1.3.24.tar.bz2.sha

This file was deleted.

1 change: 1 addition & 0 deletions build/arduino-builder-linuxarm-1.3.25.tar.bz2.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bb731bc81890f5d8e871ae8d35f25475adcd8861
1 change: 0 additions & 1 deletion build/arduino-builder-macosx-1.3.24.tar.bz2.sha

This file was deleted.

1 change: 1 addition & 0 deletions build/arduino-builder-macosx-1.3.25.tar.bz2.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
267577e82b44caaec952499ca3fdb3df35d969ae
1 change: 0 additions & 1 deletion build/arduino-builder-windows-1.3.24.zip.sha

This file was deleted.

1 change: 1 addition & 0 deletions build/arduino-builder-windows-1.3.25.zip.sha
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14cb24db2d50546ef80e6b0e5f2af76bcb476d80
2 changes: 1 addition & 1 deletion build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

<property name="portable" value="false" />

<property name="ARDUINO-BUILDER-VERSION" value="1.3.24" />
<property name="ARDUINO-BUILDER-VERSION" value="1.3.25" />
<property name="LIBLISTSERIAL-VERSION" value="1.4.0" />
<property name="AVRGCC-VERSION" value="4.9.2-atmel3.5.4-arduino2" />
<property name="AVRDUDE-VERSION" value="6.3.0-arduino9" />
Expand Down