diff --git a/arduino-ide-extension/src/browser/arduino-preferences.ts b/arduino-ide-extension/src/browser/arduino-preferences.ts index 7ce161fe..d3bfb944 100644 --- a/arduino-ide-extension/src/browser/arduino-preferences.ts +++ b/arduino-ide-extension/src/browser/arduino-preferences.ts @@ -66,11 +66,20 @@ export const ArduinoConfigSchema: PreferenceSchema = { }, 'arduino.ide.autoUpdate': { type: 'boolean', + default: true, description: nls.localize( 'arduino/preferences/ide.autoUpdate', - 'True to enable automatic update checks. The IDE will check for updates automatically and periodically.' + 'True to enable automatic updates' + ), + }, + 'arduino.ide.updateChannel': { + type: 'string', + enum: ['latest', 'nightly', 'none'], + default: 'none', + description: nls.localize( + 'arduino/preferences/ide.updateChannel', + 'Release channel to get updated from. Latest is the stable release, nightly is the latest development build.' ), - default: true, }, 'arduino.board.certificates': { type: 'string', @@ -171,7 +180,8 @@ export interface ArduinoConfiguration { 'arduino.upload.verify': boolean; 'arduino.window.autoScale': boolean; 'arduino.window.zoomLevel': number; - 'arduino.ide.autoUpdate': boolean; + 'arduino.window.autoUpdate': boolean; + 'arduino.ide.updateChannel': 'latest' | 'nightly' | 'none'; 'arduino.board.certificates': string; 'arduino.sketchbook.showAllFiles': boolean; 'arduino.cloud.enabled': boolean; diff --git a/electron/packager/config.js b/electron/packager/config.js index 85e42449..f55703d1 100644 --- a/electron/packager/config.js +++ b/electron/packager/config.js @@ -83,6 +83,19 @@ function getVersion() { return version; } +function getChannel() { + + if (isRelease) { + return 'latest'; + } + if (isNightly) { + return 'nightly'; + } + + return 'none'; + +} + function timestamp() { return dateFormat(new Date(), 'yyyymmdd'); } @@ -101,10 +114,18 @@ function generateTemplate(buildDate) { const version = getVersion(); const productName = 'Arduino IDE'; const name = 'arduino-ide'; + const updateChannel = getChannel(); let customizations = { name, description: productName, version, + theia: { + frontend: { + config: { + "arduino.ide.updateChannel": updateChannel + } + } + }, build: { productName, appId: 'cc.arduino.IDE2',