Compare commits

...

7 Commits
2.3.5 ... 2.3.x

Author SHA1 Message Date
Giacomo Cusinato
2f0414a5a1 fix: use ElectronConnectionHandler to connect ide updater services (#2697) 2025-04-09 13:58:47 +07:00
github-actions[bot]
e3319dab1a Updated translation files (#2692)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-04-08 16:14:03 +07:00
Giacomo Cusinato
a669a43449 fix: wait for theia initalWindow to be set before opening sketch through open-file event (#2693)
* chore: use actual app name as `uriScheme`

* fix: wait for `initialWindow` to be set before opening sketch from file
2025-04-07 19:15:59 +02:00
Giacomo Cusinato
56ab874177 fix: propagate electron params in second instance startup (#2686) 2025-04-05 19:56:00 +09:00
Giacomo Cusinato
e36f393682 fix: prevent OutputWidget to gain focus when updated (#2681) 2025-04-03 17:51:30 +02:00
Giacomo Cusinato
4d52bb2843 chore: switch to version 2.3.6 after the release (#2682) 2025-04-03 17:51:12 +02:00
Giacomo Cusinato
39c8db8e90 fix: add missing linux dependencies for create-changelog job (#2677) 2025-04-02 23:24:35 +09:00
11 changed files with 141 additions and 65 deletions

View File

@@ -29,6 +29,12 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
- name: Install Dependencies (Linux only)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev
- name: Get Tag
id: tag_name
run: |

View File

@@ -1,6 +1,6 @@
{
"name": "arduino-ide-extension",
"version": "2.3.5",
"version": "2.3.6",
"description": "An extension for Theia building the Arduino IDE",
"license": "AGPL-3.0-or-later",
"scripts": {

View File

@@ -13,6 +13,8 @@ import { MessageService } from '@theia/core/lib/common/message-service';
import { inject, injectable } from '@theia/core/shared/inversify';
import { ApplicationConnectionStatusContribution } from './connection-status-service';
import { ToolbarAwareTabBar } from './tab-bars';
import { find } from '@theia/core/shared/@phosphor/algorithm';
import { OutputWidget } from '@theia/output/lib/browser/output-widget';
@injectable()
export class ApplicationShell extends TheiaApplicationShell {
@@ -48,6 +50,38 @@ export class ApplicationShell extends TheiaApplicationShell {
return super.addWidget(widget, { ...options, ref });
}
override doRevealWidget(id: string): Widget | undefined {
let widget = find(this.mainPanel.widgets(), (w) => w.id === id);
if (!widget) {
widget = find(this.bottomPanel.widgets(), (w) => w.id === id);
if (widget) {
this.expandBottomPanel();
}
}
if (widget) {
const tabBar = this.getTabBarFor(widget);
if (tabBar) {
tabBar.currentTitle = widget.title;
}
}
if (!widget) {
widget = this.leftPanelHandler.expand(id);
}
if (!widget) {
widget = this.rightPanelHandler.expand(id);
}
if (widget) {
// Prevent focusing the output widget when is updated
// See https://github.com/arduino/arduino-ide/issues/2679
if (!(widget instanceof OutputWidget)) {
this.windowService.focus();
}
return widget;
} else {
return this.secondaryWindowHandler.revealWidget(id);
}
}
override handleEvent(): boolean {
// NOOP, dragging has been disabled
return false;

View File

@@ -38,3 +38,26 @@ export function uint8ArrayToString(uint8Array: Uint8Array): string {
export function stringToUint8Array(text: string): Uint8Array {
return Uint8Array.from(text, (char) => char.charCodeAt(0));
}
export function poolWhile(
whileCondition: () => boolean,
intervalMs: number,
timeoutMs: number
): Promise<void> {
return new Promise((resolve, reject) => {
if (!whileCondition) {
resolve();
}
const start = Date.now();
const interval = setInterval(() => {
if (!whileCondition()) {
clearInterval(interval);
resolve();
} else if (Date.now() - start > timeoutMs) {
clearInterval(interval);
reject(new Error('Timed out while polling.'));
}
}, intervalMs);
});
}

View File

@@ -1,5 +1,5 @@
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler';
import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
import { ElectronConnectionHandler } from '@theia/core/lib/electron-main/messaging/electron-connection-handler';
import { RpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
import { TheiaMainApi } from '@theia/core/lib/electron-main/electron-api-main';
import {
@@ -33,18 +33,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
bind(IDEUpdaterImpl).toSelf().inSingletonScope();
bind(IDEUpdater).toService(IDEUpdaterImpl);
bind(ElectronMainApplicationContribution).toService(IDEUpdater);
bind(ConnectionHandler)
bind(ElectronConnectionHandler)
.toDynamicValue(
(context) =>
new JsonRpcConnectionHandler<IDEUpdaterClient>(
IDEUpdaterPath,
(client) => {
const server = context.container.get<IDEUpdater>(IDEUpdater);
server.setClient(client);
client.onDidCloseConnection(() => server.disconnectClient(client));
return server;
}
)
new RpcConnectionHandler<IDEUpdaterClient>(IDEUpdaterPath, (client) => {
const server = context.container.get<IDEUpdater>(IDEUpdater);
server.setClient(client);
client.onDidCloseConnection(() => server.disconnectClient(client));
return server;
})
)
.inSingletonScope();

View File

@@ -30,6 +30,7 @@ import type { AddressInfo } from 'node:net';
import { isAbsolute, join, resolve } from 'node:path';
import type { Argv } from 'yargs';
import { Sketch } from '../../common/protocol';
import { poolWhile } from '../../common/utils';
import {
AppInfo,
appInfoPropertyLiterals,
@@ -292,6 +293,16 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
);
if (sketchFolderPath) {
this.openFilePromise.reject(new InterruptWorkspaceRestoreError());
// open-file event is triggered before the app is ready and initialWindow is created.
// Wait for initialWindow to be set before opening the sketch on the first instance.
// See https://github.com/arduino/arduino-ide/pull/2693
try {
await app.whenReady();
if (!this.firstWindowId) {
await poolWhile(() => !this.initialWindow, 100, 3000);
}
} catch {}
await this.openSketch(sketchFolderPath);
}
}
@@ -385,10 +396,11 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
}
private async launchFromArgs(
params: ElectronMainCommandOptions
params: ElectronMainCommandOptions,
argv?: string[]
): Promise<boolean> {
// Copy to prevent manipulation of original array
const argCopy = [...this.argv];
const argCopy = [...(argv || this.argv)];
let path: string | undefined;
for (const maybePath of argCopy) {
const resolvedPath = await this.resolvePath(maybePath, params.cwd);
@@ -526,7 +538,7 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
argv: string[],
cwd: string
): Promise<void> {
if (await this.launchFromArgs({ cwd, secondInstance: true })) {
if (await this.launchFromArgs({ cwd, secondInstance: true }, argv)) {
// Application has received a file in its arguments
return;
}
@@ -889,7 +901,10 @@ const fallbackFrontendAppConfig: FrontendApplicationConfig = {
defaultIconTheme: 'none',
validatePreferencesSchema: false,
defaultLocale: '',
electron: { showWindowEarly: true, uriScheme: 'custom://arduino-ide' },
electron: {
showWindowEarly: true,
uriScheme: 'arduino-ide',
},
reloadOnReconnect: true,
};

View File

@@ -1,7 +1,7 @@
{
"private": true,
"name": "electron-app",
"version": "2.3.5",
"version": "2.3.6",
"license": "AGPL-3.0-or-later",
"main": "./src-gen/backend/electron-main.js",
"dependencies": {
@@ -19,7 +19,7 @@
"@theia/preferences": "1.57.0",
"@theia/terminal": "1.57.0",
"@theia/workspace": "1.57.0",
"arduino-ide-extension": "2.3.5"
"arduino-ide-extension": "2.3.6"
},
"devDependencies": {
"@theia/cli": "1.57.0",
@@ -67,7 +67,8 @@
"defaultIconTheme": "none",
"validatePreferencesSchema": false,
"electron": {
"showWindowEarly": true
"showWindowEarly": true,
"uriScheme": "arduino-ide"
},
"reloadOnReconnect": true,
"preferences": {

View File

@@ -13,7 +13,7 @@
"board": {
"board": "Плата{0}",
"boardConfigDialogTitle": "Абярыце іншую плату і порт",
"boardDataReloaded": "Board data reloaded.",
"boardDataReloaded": "Дадзеныя на плату былі загружаныя нанова.",
"boardInfo": "Інфармацыя пра плату",
"boards": "платы",
"configDialog1": "Абярыце як плату, так і порт, калі вы жадаеце загрузіць сцэнар.",
@@ -32,12 +32,12 @@
"port": "Порт{0}",
"ports": "порты",
"programmer": "Сродак праграмавання",
"reloadBoardData": "Reload Board Data",
"reloadBoardData": "Загрузіць дадзеныя на плату нанова",
"reselectLater": "Абярыце паўторна пазней",
"revertBoardsConfig": "Ужыта '{0}' выяўлена ў '{1}'",
"searchBoard": "Знайсці плату",
"selectBoard": "Знайсці плату",
"selectBoardToReload": "Please select a board first.",
"selectBoardToReload": "Калі ласка, спачатку абярыце плату.",
"selectPortForInfo": "Калі ласка, абярыце порт, каб атрымаць інфармацыю пра плату.",
"showAllAvailablePorts": "Паказвае ўсе даступныя порты, калі яны ўключаныя",
"showAllPorts": "Паказаць усе порты",
@@ -275,9 +275,9 @@
"checkForUpdates": "Праверыць наяўнасць абнаўленняў Arduino IDE",
"closeAndInstallButton": "Зачыніць і ўсталяваць",
"closeToInstallNotice": "Зачыніце праграмнае забеспячэнне і ўсталюйце абнаўленне на свой кампутар.",
"donateLinkIconTitle": "open donation page",
"donateLinkText": "donate to support us",
"donateText": "Open source is love, {0}",
"donateLinkIconTitle": "адчыніць старонку ахвяраванняў",
"donateLinkText": "ахвяраваць, каб падтрымаць нас",
"donateText": "Адкрыты зыходны код - гэта любоў, {0}",
"downloadButton": "Спампаваць",
"downloadingNotice": "Пампуе апошнюю версію Arduino IDE.",
"errorCheckingForUpdates": "Памылка пры праверцы абнаўленняў Arduino IDE.\n{0}",
@@ -417,9 +417,9 @@
"sketchbook.showAllFiles": "Калі true, адлюстроўваюцца ўсе файлы сцэнараў унутры сцэнара.\nПершапачаткова false.",
"unofficialBoardSupport": "Пстрыкніце, каб праглядзець спіс адрасоў URL падтрымкі неафіцыйных плат",
"upload": "выгрузіць",
"upload.autoVerify": "True if the IDE should automatically verify the code before the upload. True by default. When this value is false, IDE does not recompile the code before uploading the binary to the board. It's highly advised to only set this value to false if you know what you are doing.",
"upload.autoVerify": "True, калі IDE павінна аўтаматычна правяраць код перад загрузкай.\nПершапачаткова значэнне роўнае true.\nКалі false, IDE не кампілюе код нанова перад загрузкай двайковага файла на плату.\nНастойліва рэкамендуецца ўсталяваць false толькі калі вы ведаеце, што робіце.",
"upload.verbose": "Калі true, каб быў падрабязны вывад пры загрузцы.\nПершапачаткова false.",
"upload.verify": "After upload, verify that the contents of the memory on the board match the uploaded binary.",
"upload.verify": "Пасля загрузкі пераканайцеся, што змест памяці на плаце адпавядае загружанаму двайковаму файлу.",
"verifyAfterUpload": "Праверыць код пасля выгрузкі",
"window.autoScale": "Калі true, карыстальніцкі інтэрфейс аўтаматычна маштабуецца ў адпаведнасці з памерам шрыфту.",
"window.zoomLevel": {
@@ -523,12 +523,12 @@
"renameSketchFolderTitle": "Хібная назва сцэнара"
},
"versionWelcome": {
"cancelButton": "Maybe later",
"donateButton": "Donate now",
"donateMessage": "Arduino is committed to keeping software free and open-source for everyone. Your donation helps us develop new features, improve libraries, and support millions of users worldwide.",
"donateMessage2": "Please consider supporting our work on the free open source Arduino IDE.",
"title": "Welcome to a new version of the Arduino IDE!",
"titleWithVersion": "Welcome to the new Arduino IDE {0}!"
"cancelButton": "Можа, пазней",
"donateButton": "Ахвераваць зараз",
"donateMessage": "Arduino імкнецца захаваць праграмнае забеспячэнне бясплатным і з адкрытым зыходным кодам для ўсіх.\nВашыя ахвяраванні дапамагаюць нам распрацоўваць новыя функцыі, удасканальваць бібліятэкі і падтрымліваць мільёны карыстальнікаў па ўсім свеце.",
"donateMessage2": "Калі ласка, падумайце пра падтрымку нашай працы над бясплатнай Arduino IDE з адкрытым зыходным кодам.",
"title": "Сардэчна запрашаем у новую версію Arduino IDE!",
"titleWithVersion": "Сардэчна запрашаем у новае асяроддзе распрацоўкі Arduino IDE {0}!"
},
"workspace": {
"alreadyExists": "{0}' ужо існуе."

View File

@@ -2,28 +2,28 @@
"arduino": {
"about": {
"detail": "Version: {0}\nDate: {1}{2}\nCLI Version: {3}\n\n{4}",
"label": "About {0}"
"label": "Om 1{0}"
},
"account": {
"goToCloudEditor": "Go to Cloud Editor",
"goToIoTCloud": "Go to IoT Cloud",
"goToProfile": "Go to Profile",
"goToCloudEditor": "Gå til Cloud Editor",
"goToIoTCloud": "Gå til IoT Cloud",
"goToProfile": "Gå til Profil",
"menuTitle": "Arduino Cloud"
},
"board": {
"board": "Board{0}",
"boardConfigDialogTitle": "Select Other Board and Port",
"boardDataReloaded": "Board data reloaded.",
"boardInfo": "Board Info",
"boards": "boards",
"configDialog1": "Select both a Board and a Port if you want to upload a sketch.",
"configDialog2": "If you only select a Board you will be able to compile, but not to upload your sketch.",
"couldNotFindPreviouslySelected": "Could not find previously selected board '{0}' in installed platform '{1}'. Please manually reselect the board you want to use. Do you want to reselect it now?",
"editBoardsConfig": "Edit Board and Port...",
"getBoardInfo": "Get Board Info",
"inSketchbook": " (in Sketchbook)",
"installNow": "The \"{0} {1}\" core has to be installed for the currently selected \"{2}\" board. Do you want to install it now?",
"noBoardsFound": "No boards found for \"{0}\"",
"boardConfigDialogTitle": "Vælg andet Board og Port",
"boardDataReloaded": "Board data genhentet",
"boardInfo": "Board info",
"boards": "Boards",
"configDialog1": "Vælg både et Board og en Port, hvis du ønsker at oploade en skitse",
"configDialog2": "Hvis du kun vælger et Board, vil du kunne kompilere, men ikke uploade din skitse.",
"couldNotFindPreviouslySelected": "Kunne ikke finde tidligere valgte board '1 {0}' i installerede platform '2 {1}'. Vælg venligst det board du ønsker at anvende. Ønsker du at vælge det nu?",
"editBoardsConfig": "Ret Board og Port...",
"getBoardInfo": "Hent Board info",
"inSketchbook": "(I skitsebog)",
"installNow": "\" 1 {0} 2 {1} \" kerne skal installeres for det nuværende valgte \" 3 {2}\" board. Vil du installere det nu?",
"noBoardsFound": "Intet board fundet for \" 1 {0} \"",
"noNativeSerialPort": "Native serial port, can't obtain info.",
"noPortsDiscovered": "No ports discovered",
"nonSerialPort": "Non-serial port, can't obtain info.",

View File

@@ -107,14 +107,14 @@
"options": "Opzioni...",
"privateVisibility": "Privato. Solo tu potrai vedere lo sketch.",
"profilePicture": "Immagine profilo",
"publicVisibility": "Pubblico. Chiunque abbia il link può vedere lo Sketch.",
"publicVisibility": "Pubblico. Chiunque abbia il link può vedere lo sketch.",
"pull": "Richiedi",
"pullFirst": "Nel Cloud devi prima effettuare il Pull per poi poter eseguire il Push.",
"pullSketch": "Richiedi lo Sketch",
"pullSketchMsg": "Richiedendo questo Sketch tramite il Cloud, lo stesso sovrascriverà quello presente in locale. Sei sicuro di dover continuare?",
"pullSketch": "Richiedi lo sketch",
"pullSketchMsg": "Richiedendo questo sketch tramite il cloud, lo stesso sovrascriverà quello presente in locale. Sei sicuro di voler continuare?",
"push": "Push",
"pushSketch": "Invia lo Sketch",
"pushSketchMsg": "Questo è uno sketch pubblico. Prima di inviarlo, verifica che tutte le informazioni sensibili siano all'interno di arduino_secrets.h. Eventualmente puoi rendere lo sketch privato dal Pannello di Condivisione.",
"pushSketch": "Invia lo sketch",
"pushSketchMsg": "Questo è uno sketch pubblico. Prima di inviarlo, verifica che tutte le informazioni sensibili siano all'interno di arduino_secrets.h. Eventualmente, puoi rendere lo sketch privato dal pannello della condivisione.",
"remote": "Remoto",
"share": "Condividi...",
"shareSketch": "Condividi sketch",
@@ -123,8 +123,8 @@
"signInToCloud": "Effettua la registrazione su Arduino Cloud",
"signOut": "Disconnetti",
"sync": "Sincronizza",
"syncEditSketches": "Sincronizza e modifica la tua raccolta di Sketches sul Cloud Arduino",
"visitArduinoCloud": "Visita Arduino Cloud per creare Cloud Sketch "
"syncEditSketches": "Sincronizza e modifica la tua raccolta degli sketch sul cloud di Arduino",
"visitArduinoCloud": "Visita il cloud di Arduino per creare gli sketch."
},
"cloudSketch": {
"alreadyExists": "Lo sketch remoto '{0}' è già presente.",
@@ -217,7 +217,7 @@
"debuggingNotSupported": "Il debug non è supportato da '{0}'",
"getDebugInfo": "Acquisizione delle informazioni di debug in corso...",
"noPlatformInstalledFor": "La piattaforma non è ancora stata installata per '{0}'",
"optimizeForDebugging": "Ottimizzato per il Debug.",
"optimizeForDebugging": "Ottimizzato per il debug",
"sketchIsNotCompiled": "Lo sketch '{0}' deve essere verificato prima di avviare una sessione di debug. Verificare lo sketch e avviare nuovamente il debug. Si desidera verificare lo sketch adesso?"
},
"developer": {
@@ -385,7 +385,7 @@
"editorFontSize": "Dimensione del carattere dell'editor",
"editorQuickSuggestions": "Suggerimenti rapidi dell'editor",
"enterAdditionalURLs": "Aggiungi degli URLs aggiuntivi, uno per ogni riga",
"files.inside.sketches": "Mostra i file all'interno degli Sketch",
"files.inside.sketches": "Mostra i file all'interno degli sketch",
"ide.updateBaseUrl": "L'URL base da cui scaricare gli aggiornamenti. Il valore predefinito è 'https://downloads.arduino.cc/arduino-ide'",
"ide.updateChannel": "Canale di rilascio per le versioni aggiornate. 'stable' è per le versioni stabili, 'nightly' è per l'ultima versione in sviluppo.",
"interfaceScale": "Scalabilità dell'interfaccia",
@@ -448,7 +448,7 @@
"archiveSketch": "Archivia sketch",
"cantOpen": "Una cartella di nome \"{0}\" esiste già. Impossibile aprire lo sketch.",
"compile": "Compilazione dello sketch in corso...",
"configureAndUpload": "Configura e Carica",
"configureAndUpload": "Configura e carica",
"createdArchive": "Creato l'archivio '{0}'.",
"doneCompiling": "Compilazione completata.",
"doneUploading": "Caricamento terminato.",
@@ -466,12 +466,12 @@
"noTrailingPeriod": "Il nome di un file non può terminare con un punto",
"openFolder": "Apri Cartella",
"openRecent": "Apri recenti",
"openSketchInNewWindow": "Apri lo sketch in una Nuova Finestra",
"openSketchInNewWindow": "Apri lo sketch in una nuova finestra",
"reservedFilename": "'{0}' è il nome di un file riservato.",
"saveFolderAs": "Salva la cartella sketch come...",
"saveSketch": "Salva il tuo sketch per riaprirlo in seguito.",
"saveSketchAs": "Salva la cartella dello sketch come...",
"showFolder": "Mostra la cartella dello Sketch",
"showFolder": "Mostra la cartella dello sketch",
"sketch": "Sketch",
"sketchAlreadyContainsThisFileError": "Lo sketch contiene già un file denominato '{0}'",
"sketchAlreadyContainsThisFileMessage": "Impossibile salvare lo sketch \"{0}\" come \"{1}\". {2}",
@@ -479,7 +479,7 @@
"titleLocalSketchbook": "Cartella degli sketch locali",
"titleSketchbook": "Sketchbook",
"upload": "Carica",
"uploadUsingProgrammer": "Carica tramite Programmatore",
"uploadUsingProgrammer": "Carica tramite programmatore",
"uploading": "Caricamento in corso...",
"userFieldsNotFoundError": "Non è possibile trovare i campi utente per connettere la scheda",
"verify": "Verifica",
@@ -487,7 +487,7 @@
},
"sketchbook": {
"newCloudSketch": "Nuovo sketch remoto",
"newSketch": "Nuovo Sketch"
"newSketch": "Nuovo sketch"
},
"theme": {
"currentThemeNotFound": "Impossibile trovare il tema attualmente selezionato: {0}. Arduino IDE ha selezionato un tema integrato compatibile con quello mancante.",

View File

@@ -1,6 +1,6 @@
{
"name": "arduino-ide",
"version": "2.3.5",
"version": "2.3.6",
"description": "Arduino IDE",
"repository": "https://github.com/arduino/arduino-ide.git",
"author": "Arduino SA",