Skip to content

Commit 1d15e99

Browse files
authored
Merge branch 'arduino:main' into main
2 parents d1868d5 + 0f9f0d0 commit 1d15e99

File tree

9 files changed

+97
-62
lines changed

9 files changed

+97
-62
lines changed

arduino-ide-extension/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-ide-extension",
3-
"version": "2.3.6",
3+
"version": "2.3.7",
44
"description": "An extension for Theia building the Arduino IDE",
55
"license": "AGPL-3.0-or-later",
66
"scripts": {

arduino-ide-extension/src/common/utils.ts

+23
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,26 @@ export function uint8ArrayToString(uint8Array: Uint8Array): string {
3838
export function stringToUint8Array(text: string): Uint8Array {
3939
return Uint8Array.from(text, (char) => char.charCodeAt(0));
4040
}
41+
42+
export function poolWhile(
43+
whileCondition: () => boolean,
44+
intervalMs: number,
45+
timeoutMs: number
46+
): Promise<void> {
47+
return new Promise((resolve, reject) => {
48+
if (!whileCondition) {
49+
resolve();
50+
}
51+
52+
const start = Date.now();
53+
const interval = setInterval(() => {
54+
if (!whileCondition()) {
55+
clearInterval(interval);
56+
resolve();
57+
} else if (Date.now() - start > timeoutMs) {
58+
clearInterval(interval);
59+
reject(new Error('Timed out while polling.'));
60+
}
61+
}, intervalMs);
62+
});
63+
}

arduino-ide-extension/src/electron-main/arduino-electron-main-module.ts

+9-12
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ConnectionHandler } from '@theia/core/lib/common/messaging/handler';
2-
import { JsonRpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
1+
import { ElectronConnectionHandler } from '@theia/core/lib/electron-main/messaging/electron-connection-handler';
2+
import { RpcConnectionHandler } from '@theia/core/lib/common/messaging/proxy-factory';
33
import { ElectronMainWindowService } from '@theia/core/lib/electron-common/electron-main-window-service';
44
import { TheiaMainApi } from '@theia/core/lib/electron-main/electron-api-main';
55
import {
@@ -33,18 +33,15 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
3333
bind(IDEUpdaterImpl).toSelf().inSingletonScope();
3434
bind(IDEUpdater).toService(IDEUpdaterImpl);
3535
bind(ElectronMainApplicationContribution).toService(IDEUpdater);
36-
bind(ConnectionHandler)
36+
bind(ElectronConnectionHandler)
3737
.toDynamicValue(
3838
(context) =>
39-
new JsonRpcConnectionHandler<IDEUpdaterClient>(
40-
IDEUpdaterPath,
41-
(client) => {
42-
const server = context.container.get<IDEUpdater>(IDEUpdater);
43-
server.setClient(client);
44-
client.onDidCloseConnection(() => server.disconnectClient(client));
45-
return server;
46-
}
47-
)
39+
new RpcConnectionHandler<IDEUpdaterClient>(IDEUpdaterPath, (client) => {
40+
const server = context.container.get<IDEUpdater>(IDEUpdater);
41+
server.setClient(client);
42+
client.onDidCloseConnection(() => server.disconnectClient(client));
43+
return server;
44+
})
4845
)
4946
.inSingletonScope();
5047

arduino-ide-extension/src/electron-main/theia/electron-main-application.ts

+15-1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import type { AddressInfo } from 'node:net';
3030
import { isAbsolute, join, resolve } from 'node:path';
3131
import type { Argv } from 'yargs';
3232
import { Sketch } from '../../common/protocol';
33+
import { poolWhile } from '../../common/utils';
3334
import {
3435
AppInfo,
3536
appInfoPropertyLiterals,
@@ -292,6 +293,16 @@ export class ElectronMainApplication extends TheiaElectronMainApplication {
292293
);
293294
if (sketchFolderPath) {
294295
this.openFilePromise.reject(new InterruptWorkspaceRestoreError());
296+
297+
// open-file event is triggered before the app is ready and initialWindow is created.
298+
// Wait for initialWindow to be set before opening the sketch on the first instance.
299+
// See https://github.com/arduino/arduino-ide/pull/2693
300+
try {
301+
await app.whenReady();
302+
if (!this.firstWindowId) {
303+
await poolWhile(() => !this.initialWindow, 100, 3000);
304+
}
305+
} catch {}
295306
await this.openSketch(sketchFolderPath);
296307
}
297308
}
@@ -890,7 +901,10 @@ const fallbackFrontendAppConfig: FrontendApplicationConfig = {
890901
defaultIconTheme: 'none',
891902
validatePreferencesSchema: false,
892903
defaultLocale: '',
893-
electron: { showWindowEarly: true, uriScheme: 'custom://arduino-ide' },
904+
electron: {
905+
showWindowEarly: true,
906+
uriScheme: 'arduino-ide',
907+
},
894908
reloadOnReconnect: true,
895909
};
896910

electron-app/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"private": true,
33
"name": "electron-app",
4-
"version": "2.3.6",
4+
"version": "2.3.7",
55
"license": "AGPL-3.0-or-later",
66
"main": "./src-gen/backend/electron-main.js",
77
"dependencies": {
@@ -19,7 +19,7 @@
1919
"@theia/preferences": "1.57.0",
2020
"@theia/terminal": "1.57.0",
2121
"@theia/workspace": "1.57.0",
22-
"arduino-ide-extension": "2.3.6"
22+
"arduino-ide-extension": "2.3.7"
2323
},
2424
"devDependencies": {
2525
"@theia/cli": "1.57.0",
@@ -67,7 +67,8 @@
6767
"defaultIconTheme": "none",
6868
"validatePreferencesSchema": false,
6969
"electron": {
70-
"showWindowEarly": true
70+
"showWindowEarly": true,
71+
"uriScheme": "arduino-ide"
7172
},
7273
"reloadOnReconnect": true,
7374
"preferences": {

i18n/be.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"board": {
1414
"board": "Плата{0}",
1515
"boardConfigDialogTitle": "Абярыце іншую плату і порт",
16-
"boardDataReloaded": "Board data reloaded.",
16+
"boardDataReloaded": "Дадзеныя на плату былі загружаныя нанова.",
1717
"boardInfo": "Інфармацыя пра плату",
1818
"boards": "платы",
1919
"configDialog1": "Абярыце як плату, так і порт, калі вы жадаеце загрузіць сцэнар.",
@@ -32,12 +32,12 @@
3232
"port": "Порт{0}",
3333
"ports": "порты",
3434
"programmer": "Сродак праграмавання",
35-
"reloadBoardData": "Reload Board Data",
35+
"reloadBoardData": "Загрузіць дадзеныя на плату нанова",
3636
"reselectLater": "Абярыце паўторна пазней",
3737
"revertBoardsConfig": "Ужыта '{0}' выяўлена ў '{1}'",
3838
"searchBoard": "Знайсці плату",
3939
"selectBoard": "Знайсці плату",
40-
"selectBoardToReload": "Please select a board first.",
40+
"selectBoardToReload": "Калі ласка, спачатку абярыце плату.",
4141
"selectPortForInfo": "Калі ласка, абярыце порт, каб атрымаць інфармацыю пра плату.",
4242
"showAllAvailablePorts": "Паказвае ўсе даступныя порты, калі яны ўключаныя",
4343
"showAllPorts": "Паказаць усе порты",
@@ -275,9 +275,9 @@
275275
"checkForUpdates": "Праверыць наяўнасць абнаўленняў Arduino IDE",
276276
"closeAndInstallButton": "Зачыніць і ўсталяваць",
277277
"closeToInstallNotice": "Зачыніце праграмнае забеспячэнне і ўсталюйце абнаўленне на свой кампутар.",
278-
"donateLinkIconTitle": "open donation page",
279-
"donateLinkText": "donate to support us",
280-
"donateText": "Open source is love, {0}",
278+
"donateLinkIconTitle": "адчыніць старонку ахвяраванняў",
279+
"donateLinkText": "ахвяраваць, каб падтрымаць нас",
280+
"donateText": "Адкрыты зыходны код - гэта любоў, {0}",
281281
"downloadButton": "Спампаваць",
282282
"downloadingNotice": "Пампуе апошнюю версію Arduino IDE.",
283283
"errorCheckingForUpdates": "Памылка пры праверцы абнаўленняў Arduino IDE.\n{0}",
@@ -417,9 +417,9 @@
417417
"sketchbook.showAllFiles": "Калі true, адлюстроўваюцца ўсе файлы сцэнараў унутры сцэнара.\nПершапачаткова false.",
418418
"unofficialBoardSupport": "Пстрыкніце, каб праглядзець спіс адрасоў URL падтрымкі неафіцыйных плат",
419419
"upload": "выгрузіць",
420-
"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.",
420+
"upload.autoVerify": "True, калі IDE павінна аўтаматычна правяраць код перад загрузкай.\nПершапачаткова значэнне роўнае true.\nКалі false, IDE не кампілюе код нанова перад загрузкай двайковага файла на плату.\nНастойліва рэкамендуецца ўсталяваць false толькі калі вы ведаеце, што робіце.",
421421
"upload.verbose": "Калі true, каб быў падрабязны вывад пры загрузцы.\nПершапачаткова false.",
422-
"upload.verify": "After upload, verify that the contents of the memory on the board match the uploaded binary.",
422+
"upload.verify": "Пасля загрузкі пераканайцеся, што змест памяці на плаце адпавядае загружанаму двайковаму файлу.",
423423
"verifyAfterUpload": "Праверыць код пасля выгрузкі",
424424
"window.autoScale": "Калі true, карыстальніцкі інтэрфейс аўтаматычна маштабуецца ў адпаведнасці з памерам шрыфту.",
425425
"window.zoomLevel": {
@@ -523,12 +523,12 @@
523523
"renameSketchFolderTitle": "Хібная назва сцэнара"
524524
},
525525
"versionWelcome": {
526-
"cancelButton": "Maybe later",
527-
"donateButton": "Donate now",
528-
"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.",
529-
"donateMessage2": "Please consider supporting our work on the free open source Arduino IDE.",
530-
"title": "Welcome to a new version of the Arduino IDE!",
531-
"titleWithVersion": "Welcome to the new Arduino IDE {0}!"
526+
"cancelButton": "Можа, пазней",
527+
"donateButton": "Ахвераваць зараз",
528+
"donateMessage": "Arduino імкнецца захаваць праграмнае забеспячэнне бясплатным і з адкрытым зыходным кодам для ўсіх.\nВашыя ахвяраванні дапамагаюць нам распрацоўваць новыя функцыі, удасканальваць бібліятэкі і падтрымліваць мільёны карыстальнікаў па ўсім свеце.",
529+
"donateMessage2": "Калі ласка, падумайце пра падтрымку нашай працы над бясплатнай Arduino IDE з адкрытым зыходным кодам.",
530+
"title": "Сардэчна запрашаем у новую версію Arduino IDE!",
531+
"titleWithVersion": "Сардэчна запрашаем у новае асяроддзе распрацоўкі Arduino IDE {0}!"
532532
},
533533
"workspace": {
534534
"alreadyExists": "{0}' ужо існуе."

i18n/da.json

+16-16
Original file line numberDiff line numberDiff line change
@@ -2,28 +2,28 @@
22
"arduino": {
33
"about": {
44
"detail": "Version: {0}\nDate: {1}{2}\nCLI Version: {3}\n\n{4}",
5-
"label": "About {0}"
5+
"label": "Om 1{0}"
66
},
77
"account": {
8-
"goToCloudEditor": "Go to Cloud Editor",
9-
"goToIoTCloud": "Go to IoT Cloud",
10-
"goToProfile": "Go to Profile",
8+
"goToCloudEditor": "Gå til Cloud Editor",
9+
"goToIoTCloud": "Gå til IoT Cloud",
10+
"goToProfile": "Gå til Profil",
1111
"menuTitle": "Arduino Cloud"
1212
},
1313
"board": {
1414
"board": "Board{0}",
15-
"boardConfigDialogTitle": "Select Other Board and Port",
16-
"boardDataReloaded": "Board data reloaded.",
17-
"boardInfo": "Board Info",
18-
"boards": "boards",
19-
"configDialog1": "Select both a Board and a Port if you want to upload a sketch.",
20-
"configDialog2": "If you only select a Board you will be able to compile, but not to upload your sketch.",
21-
"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?",
22-
"editBoardsConfig": "Edit Board and Port...",
23-
"getBoardInfo": "Get Board Info",
24-
"inSketchbook": " (in Sketchbook)",
25-
"installNow": "The \"{0} {1}\" core has to be installed for the currently selected \"{2}\" board. Do you want to install it now?",
26-
"noBoardsFound": "No boards found for \"{0}\"",
15+
"boardConfigDialogTitle": "Vælg andet Board og Port",
16+
"boardDataReloaded": "Board data genhentet",
17+
"boardInfo": "Board info",
18+
"boards": "Boards",
19+
"configDialog1": "Vælg både et Board og en Port, hvis du ønsker at oploade en skitse",
20+
"configDialog2": "Hvis du kun vælger et Board, vil du kunne kompilere, men ikke uploade din skitse.",
21+
"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?",
22+
"editBoardsConfig": "Ret Board og Port...",
23+
"getBoardInfo": "Hent Board info",
24+
"inSketchbook": "(I skitsebog)",
25+
"installNow": "\" 1 {0} 2 {1} \" kerne skal installeres for det nuværende valgte \" 3 {2}\" board. Vil du installere det nu?",
26+
"noBoardsFound": "Intet board fundet for \" 1 {0} \"",
2727
"noNativeSerialPort": "Native serial port, can't obtain info.",
2828
"noPortsDiscovered": "No ports discovered",
2929
"nonSerialPort": "Non-serial port, can't obtain info.",

i18n/it.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,14 @@
107107
"options": "Opzioni...",
108108
"privateVisibility": "Privato. Solo tu potrai vedere lo sketch.",
109109
"profilePicture": "Immagine profilo",
110-
"publicVisibility": "Pubblico. Chiunque abbia il link può vedere lo Sketch.",
110+
"publicVisibility": "Pubblico. Chiunque abbia il link può vedere lo sketch.",
111111
"pull": "Richiedi",
112112
"pullFirst": "Nel Cloud devi prima effettuare il Pull per poi poter eseguire il Push.",
113-
"pullSketch": "Richiedi lo Sketch",
114-
"pullSketchMsg": "Richiedendo questo Sketch tramite il Cloud, lo stesso sovrascriverà quello presente in locale. Sei sicuro di dover continuare?",
113+
"pullSketch": "Richiedi lo sketch",
114+
"pullSketchMsg": "Richiedendo questo sketch tramite il cloud, lo stesso sovrascriverà quello presente in locale. Sei sicuro di voler continuare?",
115115
"push": "Push",
116-
"pushSketch": "Invia lo Sketch",
117-
"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.",
116+
"pushSketch": "Invia lo sketch",
117+
"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.",
118118
"remote": "Remoto",
119119
"share": "Condividi...",
120120
"shareSketch": "Condividi sketch",
@@ -123,8 +123,8 @@
123123
"signInToCloud": "Effettua la registrazione su Arduino Cloud",
124124
"signOut": "Disconnetti",
125125
"sync": "Sincronizza",
126-
"syncEditSketches": "Sincronizza e modifica la tua raccolta di Sketches sul Cloud Arduino",
127-
"visitArduinoCloud": "Visita Arduino Cloud per creare Cloud Sketch "
126+
"syncEditSketches": "Sincronizza e modifica la tua raccolta degli sketch sul cloud di Arduino",
127+
"visitArduinoCloud": "Visita il cloud di Arduino per creare gli sketch."
128128
},
129129
"cloudSketch": {
130130
"alreadyExists": "Lo sketch remoto '{0}' è già presente.",
@@ -217,7 +217,7 @@
217217
"debuggingNotSupported": "Il debug non è supportato da '{0}'",
218218
"getDebugInfo": "Acquisizione delle informazioni di debug in corso...",
219219
"noPlatformInstalledFor": "La piattaforma non è ancora stata installata per '{0}'",
220-
"optimizeForDebugging": "Ottimizzato per il Debug.",
220+
"optimizeForDebugging": "Ottimizzato per il debug",
221221
"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?"
222222
},
223223
"developer": {
@@ -385,7 +385,7 @@
385385
"editorFontSize": "Dimensione del carattere dell'editor",
386386
"editorQuickSuggestions": "Suggerimenti rapidi dell'editor",
387387
"enterAdditionalURLs": "Aggiungi degli URLs aggiuntivi, uno per ogni riga",
388-
"files.inside.sketches": "Mostra i file all'interno degli Sketch",
388+
"files.inside.sketches": "Mostra i file all'interno degli sketch",
389389
"ide.updateBaseUrl": "L'URL base da cui scaricare gli aggiornamenti. Il valore predefinito è 'https://downloads.arduino.cc/arduino-ide'",
390390
"ide.updateChannel": "Canale di rilascio per le versioni aggiornate. 'stable' è per le versioni stabili, 'nightly' è per l'ultima versione in sviluppo.",
391391
"interfaceScale": "Scalabilità dell'interfaccia",
@@ -448,7 +448,7 @@
448448
"archiveSketch": "Archivia sketch",
449449
"cantOpen": "Una cartella di nome \"{0}\" esiste già. Impossibile aprire lo sketch.",
450450
"compile": "Compilazione dello sketch in corso...",
451-
"configureAndUpload": "Configura e Carica",
451+
"configureAndUpload": "Configura e carica",
452452
"createdArchive": "Creato l'archivio '{0}'.",
453453
"doneCompiling": "Compilazione completata.",
454454
"doneUploading": "Caricamento terminato.",
@@ -466,28 +466,28 @@
466466
"noTrailingPeriod": "Il nome di un file non può terminare con un punto",
467467
"openFolder": "Apri Cartella",
468468
"openRecent": "Apri recenti",
469-
"openSketchInNewWindow": "Apri lo sketch in una Nuova Finestra",
469+
"openSketchInNewWindow": "Apri lo sketch in una nuova finestra",
470470
"reservedFilename": "'{0}' è il nome di un file riservato.",
471471
"saveFolderAs": "Salva la cartella sketch come...",
472472
"saveSketch": "Salva il tuo sketch per riaprirlo in seguito.",
473473
"saveSketchAs": "Salva la cartella dello sketch come...",
474-
"showFolder": "Mostra la cartella dello Sketch",
474+
"showFolder": "Mostra la cartella dello sketch",
475475
"sketch": "Sketch",
476476
"sketchAlreadyContainsThisFileError": "Lo sketch contiene già un file denominato '{0}'",
477477
"sketchAlreadyContainsThisFileMessage": "Impossibile salvare lo sketch \"{0}\" come \"{1}\". {2}",
478478
"sketchbook": "Raccolta degli sketch",
479479
"titleLocalSketchbook": "Cartella degli sketch locali",
480480
"titleSketchbook": "Sketchbook",
481481
"upload": "Carica",
482-
"uploadUsingProgrammer": "Carica tramite Programmatore",
482+
"uploadUsingProgrammer": "Carica tramite programmatore",
483483
"uploading": "Caricamento in corso...",
484484
"userFieldsNotFoundError": "Non è possibile trovare i campi utente per connettere la scheda",
485485
"verify": "Verifica",
486486
"verifyOrCompile": "Verifica/Compila"
487487
},
488488
"sketchbook": {
489489
"newCloudSketch": "Nuovo sketch remoto",
490-
"newSketch": "Nuovo Sketch"
490+
"newSketch": "Nuovo sketch"
491491
},
492492
"theme": {
493493
"currentThemeNotFound": "Impossibile trovare il tema attualmente selezionato: {0}. Arduino IDE ha selezionato un tema integrato compatibile con quello mancante.",

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "arduino-ide",
3-
"version": "2.3.6",
3+
"version": "2.3.7",
44
"description": "Arduino IDE",
55
"repository": "https://github.com/arduino/arduino-ide.git",
66
"author": "Arduino SA",

0 commit comments

Comments
 (0)