diff --git a/app/src/cc/arduino/view/preferences/Preferences.java b/app/src/cc/arduino/view/preferences/Preferences.java index 0f8d9803dbc..25fb7eda079 100644 --- a/app/src/cc/arduino/view/preferences/Preferences.java +++ b/app/src/cc/arduino/view/preferences/Preferences.java @@ -130,6 +130,7 @@ private void initComponents() { checkboxesContainer = new javax.swing.JPanel(); displayLineNumbersBox = new javax.swing.JCheckBox(); enableCodeFoldingBox = new javax.swing.JCheckBox(); + usePlatformSketchTxtBox = new javax.swing.JCheckBox(); verifyUploadBox = new javax.swing.JCheckBox(); externalEditorBox = new javax.swing.JCheckBox(); cacheCompiledCore = new javax.swing.JCheckBox(); @@ -256,6 +257,9 @@ public void mouseEntered(java.awt.event.MouseEvent evt) { enableCodeFoldingBox.setText(tr("Enable Code Folding")); checkboxesContainer.add(enableCodeFoldingBox); + usePlatformSketchTxtBox.setText(tr("Allow use of platform.sketch.txt file")); + checkboxesContainer.add(usePlatformSketchTxtBox); + verifyUploadBox.setText(tr("Verify code after upload")); checkboxesContainer.add(verifyUploadBox); @@ -728,6 +732,7 @@ private void autoScaleCheckBoxItemStateChanged(java.awt.event.ItemEvent evt) {// private javax.swing.JLabel comboWarningsLabel; private javax.swing.JCheckBox displayLineNumbersBox; private javax.swing.JCheckBox enableCodeFoldingBox; + private javax.swing.JCheckBox usePlatformSketchTxtBox; private javax.swing.JButton extendedAdditionalUrlFieldWindow; private javax.swing.JCheckBox externalEditorBox; private javax.swing.JCheckBox cacheCompiledCore; @@ -828,6 +833,8 @@ private void savePreferencesData() { PreferencesData.setBoolean("editor.code_folding", enableCodeFoldingBox.isSelected()); + PreferencesData.setBoolean("builder.use_platform_sketch_txt", usePlatformSketchTxtBox.isSelected()); + PreferencesData.setBoolean("upload.verify", verifyUploadBox.isSelected()); PreferencesData.setBoolean("editor.save_on_verify", saveVerifyUploadBox.isSelected()); @@ -902,6 +909,8 @@ private void showPrerefencesData() { enableCodeFoldingBox.setSelected(PreferencesData.getBoolean("editor.code_folding")); + usePlatformSketchTxtBox.setSelected(PreferencesData.getBoolean("builder.use_platform_sketch_txt")); + verifyUploadBox.setSelected(PreferencesData.getBoolean("upload.verify")); externalEditorBox.setSelected(PreferencesData.getBoolean("editor.external")); diff --git a/arduino-core/src/cc/arduino/Compiler.java b/arduino-core/src/cc/arduino/Compiler.java index ad7a964b466..50c98df3150 100644 --- a/arduino-core/src/cc/arduino/Compiler.java +++ b/arduino-core/src/cc/arduino/Compiler.java @@ -266,6 +266,10 @@ private void callArduinoBuilder(TargetBoard board, TargetPlatform platform, Targ cmd.add(buildCache.getAbsolutePath()); } + if (PreferencesData.getBoolean("builder.use_platform_sketch_txt")) { + cmd.add("-use-platform-sketch-txt"); + } + PreferencesData.getMap() .subTree("runtime.build_properties_custom") .entrySet()