File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
arduino-ide-extension/src/browser Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ import {
1111 ContextMenuRenderer ,
1212 FrontendApplication ,
1313 FrontendApplicationContribution ,
14+ LocalStorageService ,
1415 OpenerService ,
1516 StatusBar ,
1617 StatusBarAlignment ,
@@ -199,13 +200,26 @@ export class ArduinoFrontendContribution
199200 @inject ( FrontendApplicationStateService )
200201 protected readonly appStateService : FrontendApplicationStateService ;
201202
203+ @inject ( LocalStorageService )
204+ protected readonly localStorageService : LocalStorageService ;
205+
202206 protected invalidConfigPopup :
203207 | Promise < void | 'No' | 'Yes' | undefined >
204208 | undefined ;
205209 protected toDisposeOnStop = new DisposableCollection ( ) ;
206210
207211 @postConstruct ( )
208212 protected async init ( ) : Promise < void > {
213+ const notFirstStartup = await this . localStorageService . getData (
214+ 'notFirstStartup'
215+ ) ;
216+ if ( ! notFirstStartup ) {
217+ await this . localStorageService . setData ( 'notFirstStartup' , true ) ;
218+ const avrPackage = await this . boardsService . getBoardPackage ( {
219+ id : 'arduino:avr' ,
220+ } ) ;
221+ avrPackage && ( await this . boardsService . install ( { item : avrPackage } ) ) ;
222+ }
209223 if ( ! window . navigator . onLine ) {
210224 // tslint:disable-next-line:max-line-length
211225 this . messageService . warn (
You can’t perform that action at this time.
0 commit comments