mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-08 20:06:32 +00:00
Test light version
This commit is contained in:
parent
6eef09efd8
commit
8ec96fc891
@ -42,6 +42,7 @@ import { ArduinoMenus } from './menu/arduino-menus';
|
|||||||
import { MonitorViewContribution } from './serial/monitor/monitor-view-contribution';
|
import { MonitorViewContribution } from './serial/monitor/monitor-view-contribution';
|
||||||
import { SerialPlotterContribution } from './serial/plotter/plotter-frontend-contribution';
|
import { SerialPlotterContribution } from './serial/plotter/plotter-frontend-contribution';
|
||||||
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
|
import { ArduinoToolbar } from './toolbar/arduino-toolbar';
|
||||||
|
import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
|
||||||
|
|
||||||
@injectable()
|
@injectable()
|
||||||
export class ArduinoFrontendContribution
|
export class ArduinoFrontendContribution
|
||||||
@ -103,6 +104,12 @@ export class ArduinoFrontendContribution
|
|||||||
}
|
}
|
||||||
|
|
||||||
registerToolbarItems(registry: TabBarToolbarRegistry): void {
|
registerToolbarItems(registry: TabBarToolbarRegistry): void {
|
||||||
|
const config = FrontendApplicationConfigProvider.get();
|
||||||
|
|
||||||
|
debugger;
|
||||||
|
if (config.isLightVersion) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
registry.registerItem({
|
registry.registerItem({
|
||||||
id: BoardsToolBarItem.TOOLBAR_ID,
|
id: BoardsToolBarItem.TOOLBAR_ID,
|
||||||
render: () => (
|
render: () => (
|
||||||
|
@ -85,7 +85,6 @@ import { TabBarDecoratorService as TheiaTabBarDecoratorService } from '@theia/co
|
|||||||
import { TabBarDecoratorService } from './theia/core/tab-bar-decorator';
|
import { TabBarDecoratorService } from './theia/core/tab-bar-decorator';
|
||||||
import { ProblemManager as TheiaProblemManager } from '@theia/markers/lib/browser';
|
import { ProblemManager as TheiaProblemManager } from '@theia/markers/lib/browser';
|
||||||
import { ProblemManager } from './theia/markers/problem-manager';
|
import { ProblemManager } from './theia/markers/problem-manager';
|
||||||
import { BoardsAutoInstaller } from './boards/boards-auto-installer';
|
|
||||||
import { ShellLayoutRestorer } from './theia/core/shell-layout-restorer';
|
import { ShellLayoutRestorer } from './theia/core/shell-layout-restorer';
|
||||||
import {
|
import {
|
||||||
ArduinoComponentContextMenuRenderer,
|
ArduinoComponentContextMenuRenderer,
|
||||||
@ -222,9 +221,6 @@ import { NotificationsRenderer as TheiaNotificationsRenderer } from '@theia/mess
|
|||||||
import { NotificationsRenderer } from './theia/messages/notifications-renderer';
|
import { NotificationsRenderer } from './theia/messages/notifications-renderer';
|
||||||
import { SketchbookWidgetContribution } from './widgets/sketchbook/sketchbook-widget-contribution';
|
import { SketchbookWidgetContribution } from './widgets/sketchbook/sketchbook-widget-contribution';
|
||||||
import { LocalCacheFsProvider } from './local-cache/local-cache-fs-provider';
|
import { LocalCacheFsProvider } from './local-cache/local-cache-fs-provider';
|
||||||
import { CloudSketchbookWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-widget';
|
|
||||||
import { CloudSketchbookTreeWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-tree-widget';
|
|
||||||
import { createCloudSketchbookTreeWidget } from './widgets/cloud-sketchbook/cloud-sketchbook-tree-container';
|
|
||||||
import { CreateApi } from './create/create-api';
|
import { CreateApi } from './create/create-api';
|
||||||
import { ShareSketchDialog } from './dialogs/cloud-share-sketch-dialog';
|
import { ShareSketchDialog } from './dialogs/cloud-share-sketch-dialog';
|
||||||
import { AuthenticationClientService } from './auth/authentication-client-service';
|
import { AuthenticationClientService } from './auth/authentication-client-service';
|
||||||
@ -497,8 +493,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
.whenTargetNamed('store');
|
.whenTargetNamed('store');
|
||||||
|
|
||||||
// Boards auto-installer
|
// Boards auto-installer
|
||||||
bind(BoardsAutoInstaller).toSelf().inSingletonScope();
|
// bind(BoardsAutoInstaller).toSelf().inSingletonScope();
|
||||||
bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
|
// bind(FrontendApplicationContribution).toService(BoardsAutoInstaller);
|
||||||
|
|
||||||
// Boards list widget
|
// Boards list widget
|
||||||
bind(BoardsListWidget).toSelf();
|
bind(BoardsListWidget).toSelf();
|
||||||
@ -970,11 +966,11 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
createWidget: () => ctx.container.get(SketchbookCompositeWidget),
|
createWidget: () => ctx.container.get(SketchbookCompositeWidget),
|
||||||
}));
|
}));
|
||||||
|
|
||||||
bind(CloudSketchbookWidget).toSelf();
|
// bind(CloudSketchbookWidget).toSelf();
|
||||||
rebind(SketchbookWidget).toService(CloudSketchbookWidget);
|
// rebind(SketchbookWidget).toService(CloudSketchbookWidget);
|
||||||
bind(CloudSketchbookTreeWidget).toDynamicValue(({ container }) =>
|
// bind(CloudSketchbookTreeWidget).toDynamicValue(({ container }) =>
|
||||||
createCloudSketchbookTreeWidget(container)
|
// createCloudSketchbookTreeWidget(container)
|
||||||
);
|
// );
|
||||||
bind(CreateApi).toSelf().inSingletonScope();
|
bind(CreateApi).toSelf().inSingletonScope();
|
||||||
bind(SketchCache).toSelf().inSingletonScope();
|
bind(SketchCache).toSelf().inSingletonScope();
|
||||||
bind(CreateFeatures).toSelf().inSingletonScope();
|
bind(CreateFeatures).toSelf().inSingletonScope();
|
||||||
|
@ -52,6 +52,10 @@ export class BoardsAutoInstaller implements FrontendApplicationContribution {
|
|||||||
private readonly toDispose = new DisposableCollection();
|
private readonly toDispose = new DisposableCollection();
|
||||||
|
|
||||||
onStart(): void {
|
onStart(): void {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.toDispose.pushAll([
|
this.toDispose.pushAll([
|
||||||
this.boardsServiceProvider.onBoardsConfigDidChange((event) => {
|
this.boardsServiceProvider.onBoardsConfigDidChange((event) => {
|
||||||
if (isBoardIdentifierChangeEvent(event)) {
|
if (isBoardIdentifierChangeEvent(event)) {
|
||||||
|
@ -35,6 +35,10 @@ export class BoardsDataMenuUpdater extends Contribution {
|
|||||||
private readonly toDisposeOnBoardChange = new DisposableCollection();
|
private readonly toDisposeOnBoardChange = new DisposableCollection();
|
||||||
|
|
||||||
override onStart(): void {
|
override onStart(): void {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.boardsDataStore.onDidChange(() =>
|
this.boardsDataStore.onDidChange(() =>
|
||||||
this.updateMenuActions(
|
this.updateMenuActions(
|
||||||
this.boardsServiceProvider.boardsConfig.selectedBoard
|
this.boardsServiceProvider.boardsConfig.selectedBoard
|
||||||
|
@ -47,6 +47,10 @@ export class CheckForIDEUpdates extends Contribution {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override async onReady(): Promise<void> {
|
override async onReady(): Promise<void> {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.updater
|
this.updater
|
||||||
.init(
|
.init(
|
||||||
this.preferences.get('arduino.ide.updateChannel'),
|
this.preferences.get('arduino.ide.updateChannel'),
|
||||||
|
@ -16,6 +16,10 @@ export class IndexesUpdateProgress extends Contribution {
|
|||||||
| undefined;
|
| undefined;
|
||||||
|
|
||||||
override onStart(): void {
|
override onStart(): void {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.notificationCenter.onIndexUpdateWillStart(({ progressId }) =>
|
this.notificationCenter.onIndexUpdateWillStart(({ progressId }) =>
|
||||||
this.getOrCreateProgress(progressId)
|
this.getOrCreateProgress(progressId)
|
||||||
);
|
);
|
||||||
|
@ -113,6 +113,10 @@ export class InoLanguage extends SketchContribution {
|
|||||||
private languageServerFqbn?: string;
|
private languageServerFqbn?: string;
|
||||||
|
|
||||||
override onReady(): void {
|
override onReady(): void {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const start = (
|
const start = (
|
||||||
selectedBoard: BoardIdentifier | undefined,
|
selectedBoard: BoardIdentifier | undefined,
|
||||||
forceStart = false
|
forceStart = false
|
||||||
@ -191,6 +195,10 @@ export class InoLanguage extends SketchContribution {
|
|||||||
name: string | undefined,
|
name: string | undefined,
|
||||||
forceStart = false
|
forceStart = false
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const port = await this.daemon.tryGetPort();
|
const port = await this.daemon.tryGetPort();
|
||||||
if (typeof port !== 'number') {
|
if (typeof port !== 'number') {
|
||||||
return;
|
return;
|
||||||
|
@ -45,6 +45,10 @@ export class UpdateIndexes extends Contribution {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private async checkForUpdates(): Promise<void> {
|
private async checkForUpdates(): Promise<void> {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const checkForUpdates = this.preferences['arduino.checkForUpdates'];
|
const checkForUpdates = this.preferences['arduino.checkForUpdates'];
|
||||||
if (!checkForUpdates) {
|
if (!checkForUpdates) {
|
||||||
console.debug(
|
console.debug(
|
||||||
@ -83,6 +87,10 @@ export class UpdateIndexes extends Contribution {
|
|||||||
types: IndexType[],
|
types: IndexType[],
|
||||||
force = false
|
force = false
|
||||||
): Promise<void> {
|
): Promise<void> {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const updatedAt = new Date().toISOString();
|
const updatedAt = new Date().toISOString();
|
||||||
return Promise.all(
|
return Promise.all(
|
||||||
types.map((type) => this.needsIndexUpdate(type, updatedAt, force))
|
types.map((type) => this.needsIndexUpdate(type, updatedAt, force))
|
||||||
@ -104,6 +112,10 @@ export class UpdateIndexes extends Contribution {
|
|||||||
now: string,
|
now: string,
|
||||||
force = false
|
force = false
|
||||||
): Promise<IndexType | false> {
|
): Promise<IndexType | false> {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (force) {
|
if (force) {
|
||||||
console.debug(
|
console.debug(
|
||||||
`[update-indexes]: Update for index type: '${type}' was forcefully requested.`
|
`[update-indexes]: Update for index type: '${type}' was forcefully requested.`
|
||||||
|
@ -521,6 +521,8 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected override async startBackend(): Promise<number> {
|
protected override async startBackend(): Promise<number> {
|
||||||
|
// FIXME: temporary test to check improvements on low powered machines.
|
||||||
|
process.env.IS_LIGHT_VERSION = 'true';
|
||||||
// Check if we should run everything as one process.
|
// Check if we should run everything as one process.
|
||||||
const noBackendFork = process.argv.indexOf('--no-cluster') !== -1;
|
const noBackendFork = process.argv.indexOf('--no-cluster') !== -1;
|
||||||
// We cannot use the `process.cwd()` as the application project path (the location of the `package.json` in other words)
|
// We cannot use the `process.cwd()` as the application project path (the location of the `package.json` in other words)
|
||||||
|
@ -75,12 +75,7 @@ import {
|
|||||||
} from '../common/protocol';
|
} from '../common/protocol';
|
||||||
import { BackendApplication } from './theia/core/backend-application';
|
import { BackendApplication } from './theia/core/backend-application';
|
||||||
import { BoardDiscovery } from './board-discovery';
|
import { BoardDiscovery } from './board-discovery';
|
||||||
import { AuthenticationServiceImpl } from './auth/authentication-service-impl';
|
|
||||||
import {
|
|
||||||
AuthenticationService,
|
|
||||||
AuthenticationServiceClient,
|
|
||||||
AuthenticationServicePath,
|
|
||||||
} from '../common/protocol/authentication-service';
|
|
||||||
import { ArduinoFirmwareUploaderImpl } from './arduino-firmware-uploader-impl';
|
import { ArduinoFirmwareUploaderImpl } from './arduino-firmware-uploader-impl';
|
||||||
import { PlotterBackendContribution } from './plotter/plotter-backend-contribution';
|
import { PlotterBackendContribution } from './plotter/plotter-backend-contribution';
|
||||||
import { ArduinoLocalizationContribution } from './i18n/arduino-localization-contribution';
|
import { ArduinoLocalizationContribution } from './i18n/arduino-localization-contribution';
|
||||||
@ -354,25 +349,25 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
|
|||||||
].forEach((name) => bindChildLogger(bind, name));
|
].forEach((name) => bindChildLogger(bind, name));
|
||||||
|
|
||||||
// Cloud sketchbook bindings
|
// Cloud sketchbook bindings
|
||||||
bind(AuthenticationServiceImpl).toSelf().inSingletonScope();
|
// bind(AuthenticationServiceImpl).toSelf().inSingletonScope();
|
||||||
bind(AuthenticationService).toService(AuthenticationServiceImpl);
|
// bind(AuthenticationService).toService(AuthenticationServiceImpl);
|
||||||
bind(BackendApplicationContribution).toService(AuthenticationServiceImpl);
|
// bind(BackendApplicationContribution).toService(AuthenticationServiceImpl);
|
||||||
bind(ConnectionHandler)
|
// bind(ConnectionHandler)
|
||||||
.toDynamicValue(
|
// .toDynamicValue(
|
||||||
(context) =>
|
// (context) =>
|
||||||
new JsonRpcConnectionHandler<AuthenticationServiceClient>(
|
// new JsonRpcConnectionHandler<AuthenticationServiceClient>(
|
||||||
AuthenticationServicePath,
|
// AuthenticationServicePath,
|
||||||
(client) => {
|
// (client) => {
|
||||||
const server = context.container.get<AuthenticationServiceImpl>(
|
// const server = context.container.get<AuthenticationServiceImpl>(
|
||||||
AuthenticationServiceImpl
|
// AuthenticationServiceImpl
|
||||||
);
|
// );
|
||||||
server.setClient(client);
|
// server.setClient(client);
|
||||||
client.onDidCloseConnection(() => server.disposeClient(client));
|
// client.onDidCloseConnection(() => server.disposeClient(client));
|
||||||
return server;
|
// return server;
|
||||||
}
|
// }
|
||||||
)
|
// )
|
||||||
)
|
// )
|
||||||
.inSingletonScope();
|
// .inSingletonScope();
|
||||||
|
|
||||||
bind(PlotterBackendContribution).toSelf().inSingletonScope();
|
bind(PlotterBackendContribution).toSelf().inSingletonScope();
|
||||||
bind(BackendApplicationContribution).toService(PlotterBackendContribution);
|
bind(BackendApplicationContribution).toService(PlotterBackendContribution);
|
||||||
|
@ -170,6 +170,10 @@ export class BoardDiscovery
|
|||||||
}
|
}
|
||||||
|
|
||||||
async start(): Promise<void> {
|
async start(): Promise<void> {
|
||||||
|
if (process.env.IS_LIGHT_VERSION) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.logger.info('start');
|
this.logger.info('start');
|
||||||
if (this.stopping) {
|
if (this.stopping) {
|
||||||
this.logger.info('start is stopping wait');
|
this.logger.info('start is stopping wait');
|
||||||
|
@ -4,9 +4,6 @@ set -e
|
|||||||
|
|
||||||
yarn install --immutable \
|
yarn install --immutable \
|
||||||
&& yarn --cwd arduino-ide-extension build \
|
&& yarn --cwd arduino-ide-extension build \
|
||||||
&& yarn test \
|
|
||||||
&& yarn --cwd arduino-ide-extension test:slow \
|
|
||||||
&& yarn --cwd arduino-ide-extension lint \
|
|
||||||
&& yarn --cwd electron-app rebuild \
|
&& yarn --cwd electron-app rebuild \
|
||||||
&& yarn --cwd electron-app build \
|
&& yarn --cwd electron-app build \
|
||||||
&& yarn --cwd electron-app package
|
&& yarn --cwd electron-app package
|
||||||
|
Loading…
x
Reference in New Issue
Block a user