mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-16 05:39:28 +00:00
add auto update preferences
This commit is contained in:
@@ -66,11 +66,20 @@ export const ArduinoConfigSchema: PreferenceSchema = {
|
|||||||
},
|
},
|
||||||
'arduino.ide.autoUpdate': {
|
'arduino.ide.autoUpdate': {
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
default: true,
|
||||||
description: nls.localize(
|
description: nls.localize(
|
||||||
'arduino/preferences/ide.autoUpdate',
|
'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': {
|
'arduino.board.certificates': {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
@@ -171,7 +180,8 @@ export interface ArduinoConfiguration {
|
|||||||
'arduino.upload.verify': boolean;
|
'arduino.upload.verify': boolean;
|
||||||
'arduino.window.autoScale': boolean;
|
'arduino.window.autoScale': boolean;
|
||||||
'arduino.window.zoomLevel': number;
|
'arduino.window.zoomLevel': number;
|
||||||
'arduino.ide.autoUpdate': boolean;
|
'arduino.window.autoUpdate': boolean;
|
||||||
|
'arduino.ide.updateChannel': 'latest' | 'nightly' | 'none';
|
||||||
'arduino.board.certificates': string;
|
'arduino.board.certificates': string;
|
||||||
'arduino.sketchbook.showAllFiles': boolean;
|
'arduino.sketchbook.showAllFiles': boolean;
|
||||||
'arduino.cloud.enabled': boolean;
|
'arduino.cloud.enabled': boolean;
|
||||||
|
|||||||
@@ -83,6 +83,19 @@ function getVersion() {
|
|||||||
return version;
|
return version;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getChannel() {
|
||||||
|
|
||||||
|
if (isRelease) {
|
||||||
|
return 'latest';
|
||||||
|
}
|
||||||
|
if (isNightly) {
|
||||||
|
return 'nightly';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'none';
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function timestamp() {
|
function timestamp() {
|
||||||
return dateFormat(new Date(), 'yyyymmdd');
|
return dateFormat(new Date(), 'yyyymmdd');
|
||||||
}
|
}
|
||||||
@@ -101,10 +114,18 @@ function generateTemplate(buildDate) {
|
|||||||
const version = getVersion();
|
const version = getVersion();
|
||||||
const productName = 'Arduino IDE';
|
const productName = 'Arduino IDE';
|
||||||
const name = 'arduino-ide';
|
const name = 'arduino-ide';
|
||||||
|
const updateChannel = getChannel();
|
||||||
let customizations = {
|
let customizations = {
|
||||||
name,
|
name,
|
||||||
description: productName,
|
description: productName,
|
||||||
version,
|
version,
|
||||||
|
theia: {
|
||||||
|
frontend: {
|
||||||
|
config: {
|
||||||
|
"arduino.ide.updateChannel": updateChannel
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
build: {
|
build: {
|
||||||
productName,
|
productName,
|
||||||
appId: 'cc.arduino.IDE2',
|
appId: 'cc.arduino.IDE2',
|
||||||
|
|||||||
Reference in New Issue
Block a user