mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-06-08 05:06:33 +00:00
[ATL-493] Support platforms installed in directories.user
This commit is contained in:
parent
2cb9889fe4
commit
6233e1fa98
@ -178,12 +178,14 @@ PID: ${PID}`;
|
|||||||
|
|
||||||
// Installed boards
|
// Installed boards
|
||||||
for (const board of installedBoards) {
|
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
|
// Platform submenu
|
||||||
const platformMenuPath = [...boardsPackagesGroup, packageId];
|
const platformMenuPath = [...boardsPackagesGroup, packageId];
|
||||||
// Note: Registering the same submenu twice is a noop. No need to group the boards per platform.
|
// 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 id = `arduino-select-board--${fqbn}`;
|
||||||
const command = { id };
|
const command = { id };
|
||||||
|
@ -345,6 +345,7 @@ export interface Board {
|
|||||||
export interface BoardWithPackage extends Board {
|
export interface BoardWithPackage extends Board {
|
||||||
readonly packageName: string;
|
readonly packageName: string;
|
||||||
readonly packageId: string;
|
readonly packageId: string;
|
||||||
|
readonly manuallyInstalled: boolean;
|
||||||
}
|
}
|
||||||
export namespace BoardWithPackage {
|
export namespace BoardWithPackage {
|
||||||
export function is(
|
export function is(
|
||||||
@ -527,6 +528,7 @@ export namespace Board {
|
|||||||
packageName: string;
|
packageName: string;
|
||||||
packageId: string;
|
packageId: string;
|
||||||
details?: string;
|
details?: string;
|
||||||
|
manuallyInstalled: boolean;
|
||||||
}>;
|
}>;
|
||||||
export function decorateBoards(
|
export function decorateBoards(
|
||||||
selectedBoard: Board | undefined,
|
selectedBoard: Board | undefined,
|
||||||
|
@ -233,6 +233,7 @@ export class BoardsServiceImpl
|
|||||||
fqbn: board.getFqbn(),
|
fqbn: board.getFqbn(),
|
||||||
packageId: platform.getId(),
|
packageId: platform.getId(),
|
||||||
packageName: platform.getName(),
|
packageName: platform.getName(),
|
||||||
|
manuallyInstalled: platform.getManuallyInstalled(),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user