Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c080392

Browse files
author
Alberto Iannaccone
committed
at first ide startup invoke installation of arduino:avr
1 parent 835e991 commit c080392

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

‎arduino-ide-extension/src/browser/arduino-frontend-contribution.tsx‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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(

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /