[ATL-493] Support platforms installed in directories.user

This commit is contained in:
Alberto Iannaccone
2021-08-23 09:47:36 +01:00
committed by GitHub
parent 2cb9889fe4
commit 6233e1fa98
3 changed files with 7 additions and 2 deletions

View File

@@ -178,12 +178,14 @@ PID: ${PID}`;
// Installed boards
for (const board of installedBoards) {
const { packageId, packageName, fqbn, name } = board;
const { packageId, packageName, fqbn, name, manuallyInstalled } = board;
const packageLabel =
packageName + `${manuallyInstalled ? ' (in Sketchbook)' : ''}`;
// Platform submenu
const platformMenuPath = [...boardsPackagesGroup, packageId];
// Note: Registering the same submenu twice is a noop. No need to group the boards per platform.
this.menuModelRegistry.registerSubmenu(platformMenuPath, packageName);
this.menuModelRegistry.registerSubmenu(platformMenuPath, packageLabel);
const id = `arduino-select-board--${fqbn}`;
const command = { id };