@@ -26,6 +26,9 @@ export class VerifySketch extends SketchContribution {
26
26
registry . registerCommand ( VerifySketch . Commands . VERIFY_SKETCH , {
27
27
execute : ( ) => this . verifySketch ( )
28
28
} ) ;
29
+ registry . registerCommand ( VerifySketch . Commands . EXPORT_BINARIES , {
30
+ execute : ( ) => this . verifySketch ( true )
31
+ } ) ;
29
32
registry . registerCommand ( VerifySketch . Commands . VERIFY_SKETCH_TOOLBAR , {
30
33
isVisible : widget => ArduinoToolbar . is ( widget ) && widget . side === 'left' ,
31
34
execute : ( ) => registry . executeCommand ( VerifySketch . Commands . VERIFY_SKETCH . id )
@@ -36,7 +39,12 @@ export class VerifySketch extends SketchContribution {
36
39
registry . registerMenuAction ( ArduinoMenus . SKETCH__MAIN_GROUP , {
37
40
commandId : VerifySketch . Commands . VERIFY_SKETCH . id ,
38
41
label : 'Verify/Compile' ,
39
- order : '2'
42
+ order : '0'
43
+ } ) ;
44
+ registry . registerMenuAction ( ArduinoMenus . SKETCH__MAIN_GROUP , {
45
+ commandId : VerifySketch . Commands . EXPORT_BINARIES . id ,
46
+ label : 'Export compiled Binary' ,
47
+ order : '3'
40
48
} ) ;
41
49
}
42
50
@@ -45,6 +53,10 @@ export class VerifySketch extends SketchContribution {
45
53
command : VerifySketch . Commands . VERIFY_SKETCH . id ,
46
54
keybinding : 'CtrlCmd+R'
47
55
} ) ;
56
+ registry . registerKeybinding ( {
57
+ command : VerifySketch . Commands . EXPORT_BINARIES . id ,
58
+ keybinding : 'CtrlCmd+Alt+S'
59
+ } ) ;
48
60
}
49
61
50
62
registerToolbarItems ( registry : TabBarToolbarRegistry ) : void {
@@ -56,7 +68,7 @@ export class VerifySketch extends SketchContribution {
56
68
} ) ;
57
69
}
58
70
59
- async verifySketch ( ) : Promise < void > {
71
+ async verifySketch ( exportBinaries : boolean = false ) : Promise < void > {
60
72
const uri = await this . sketchServiceClient . currentSketchFile ( ) ;
61
73
if ( ! uri ) {
62
74
return ;
@@ -70,7 +82,8 @@ export class VerifySketch extends SketchContribution {
70
82
sketchUri : uri ,
71
83
fqbn,
72
84
optimizeForDebug : this . editorMode . compileForDebug ,
73
- verbose
85
+ verbose,
86
+ exportBinaries
74
87
} ) ;
75
88
this . messageService . info ( 'Done compiling.' , { timeout : 1000 } ) ;
76
89
} catch ( e ) {
@@ -85,6 +98,9 @@ export namespace VerifySketch {
85
98
export const VERIFY_SKETCH : Command = {
86
99
id : 'arduino-verify-sketch'
87
100
} ;
101
+ export const EXPORT_BINARIES : Command = {
102
+ id : 'arduino-export-binaries'
103
+ } ;
88
104
export const VERIFY_SKETCH_TOOLBAR : Command = {
89
105
id : 'arduino-verify-sketch--toolbar'
90
106
} ;
0 commit comments