mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 02:06:29 +00:00
auto update確認
This commit is contained in:
@@ -5,33 +5,38 @@ var path = require('path')
|
||||
|
||||
var version = app.getVersion()
|
||||
var versionText = (version == null || version.length === 0) ? 'DEV version' : 'v' + version
|
||||
|
||||
var versionNotified = false
|
||||
autoUpdater
|
||||
.on('error', function (err, message) {
|
||||
console.error(err)
|
||||
console.error(message)
|
||||
console.log(path.resolve(__dirname, '../resources/favicon-230x230.png'))
|
||||
nn.notify({
|
||||
title: 'Error! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
icon: path.resolve(__dirname, '../resources/favicon-230x230.png'),
|
||||
message: message
|
||||
})
|
||||
})
|
||||
// .on('checking-for-update', function () {
|
||||
// // Connecting
|
||||
// console.log('checking...')
|
||||
// })
|
||||
.on('update-available', function () {
|
||||
nn.notify({
|
||||
title: 'Update is available!! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
icon: path.resolve(__dirname, '../resources/favicon-230x230.png'),
|
||||
message: 'Download started.. wait for the update ready.'
|
||||
})
|
||||
})
|
||||
.on('update-not-available', function () {
|
||||
nn.notify({
|
||||
title: 'Latest Build!! ' + versionText,
|
||||
icon: path.join(__dirname, 'browser/main/resources/favicon-230x230.png'),
|
||||
message: 'Hope you to enjoy our app :D'
|
||||
})
|
||||
if (!versionNotified) {
|
||||
nn.notify({
|
||||
title: 'Latest Build!! ' + versionText,
|
||||
icon: path.resolve(__dirname, '../resources/favicon-230x230.png'),
|
||||
message: 'Hope you to enjoy our app :D'
|
||||
})
|
||||
versionNotified = true
|
||||
}
|
||||
})
|
||||
|
||||
module.exports = autoUpdater
|
||||
|
||||
Reference in New Issue
Block a user