Add enableAutoUpdater to buildConfig

This commit is contained in:
Yuya Ochiai
2017-11-28 23:54:11 +09:00
parent e6105938ea
commit 0bec4ab5a3
3 changed files with 23 additions and 16 deletions

View File

@@ -230,12 +230,15 @@ function createTemplate(mainWindow, config, isDev) {
submenu.push({
label: `Version ${app.getVersion()}`,
enabled: false,
}, {
label: 'Check for Updates...',
click() {
ipcMain.emit('check-for-updates', true);
},
});
if (buildConfig.enableAutoUpdater) {
submenu.push({
label: 'Check for Updates...',
click() {
ipcMain.emit('check-for-updates', true);
},
});
}
template.push({label: '&Help', submenu});
return template;
}