File tree 4 files changed +22
-1
lines changed
4 files changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -404,6 +404,7 @@ protected void onProgress(Progress progress) {
404
404
// Set verbosity for command line build
405
405
Preferences .set ("build.verbose" , "" + parser .isDoVerboseBuild ());
406
406
Preferences .set ("upload.verbose" , "" + parser .isDoVerboseUpload ());
407
+ Preferences .set ("runtime.preserve.temp.files" , Boolean .toString (parser .isPreserveTempFiles ()));
407
408
408
409
// Make sure these verbosity preferences are only for the
409
410
// current session
Original file line number Diff line number Diff line change 1
1
package cc .arduino .files ;
2
2
3
+ import processing .app .PreferencesData ;
3
4
import processing .app .helpers .FileUtils ;
4
5
5
6
import java .io .File ;
@@ -27,6 +28,10 @@ public synchronized void addFile(File file) {
27
28
28
29
@ Override
29
30
public void run () {
31
+ boolean preserveTempFiles = PreferencesData .getBoolean ("runtime.preserve.temp.files" );
32
+ if (preserveTempFiles ) {
33
+ return ;
34
+ }
30
35
List <File > copyOfFiles ;
31
36
synchronized (this ) {
32
37
copyOfFiles = new LinkedList <File >(files );
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ private enum ACTION {
36
36
private boolean doVerboseBuild = false ;
37
37
private boolean doVerboseUpload = false ;
38
38
private boolean doUseProgrammer = false ;
39
+ private boolean preserveTempFiles ;
39
40
private boolean noUploadPort = false ;
40
41
private boolean forceSavePrefs = false ;
41
42
private String getPref ;
@@ -105,6 +106,12 @@ private void parseArguments(String[] args) {
105
106
action = ACTION .NOOP ;
106
107
continue ;
107
108
}
109
+ if (args [i ].equals ("--preserve-temp-files" )) {
110
+ preserveTempFiles = true ;
111
+ if (action == ACTION .GUI )
112
+ action = ACTION .NOOP ;
113
+ continue ;
114
+ }
108
115
if (args [i ].equals ("--verbose-build" )) {
109
116
doVerboseBuild = true ;
110
117
if (action == ACTION .GUI )
@@ -330,4 +337,8 @@ public String getBoardToInstall() {
330
337
public String getLibraryToInstall () {
331
338
return libraryToInstall ;
332
339
}
340
+
341
+ public boolean isPreserveTempFiles () {
342
+ return preserveTempFiles ;
343
+ }
333
344
}
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ SYNOPSIS
25
25
--------
26
26
*arduino* ['FILE.ino' ... ]
27
27
28
- *arduino* [*--verify* |*--upload* ] [*--board* __package__ :__arch__ :__board__ [:__parameters__ ]] [*--port* __portname__ ] [*--pref* __name__ =__value__ ] [*-v* |*--verbose* ] [__FILE.ino__ ]
28
+ *arduino* [*--verify* |*--upload* ] [*--board* __package__ :__arch__ :__board__ [:__parameters__ ]] [*--port* __portname__ ] [*--pref* __name__ =__value__ ] [*-v* |*--verbose* ] [-- preserve-temp-files] [ __FILE.ino__ ]
29
29
30
30
*arduino* [*--get-pref* __preference__ ]
31
31
@@ -117,6 +117,10 @@ OPTIONS
117
117
verbose mode during build is *disabled* regardless of the current
118
118
preferences.
119
119
120
+ *--preserve-temp-files*::
121
+ Keep temporary files (preprocessed sketch, object files...) after termination.
122
+ If omitted, temporary files are deleted.
123
+
120
124
{empty}::
121
125
This option is only valid together with *--verify* or
122
126
*--upload*.
You can’t perform that action at this time.
0 commit comments