mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-16 21:59:28 +00:00
add auto update preferences
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user