@@ -5,33 +5,38 @@ var path = require('path')
55
66var version = app . getVersion ( )
77var versionText = ( version == null || version . length === 0 ) ? 'DEV version' : 'v' + version
8-
8+ var versionNotified = false
99autoUpdater
1010 . on ( 'error' , function ( err , message ) {
1111 console . error ( err )
1212 console . error ( message )
13+ console . log ( path . resolve ( __dirname , '../resources/favicon-230x230.png' ) )
1314 nn . notify ( {
1415 title : 'Error! ' + versionText ,
15- icon : path . join ( __dirname , 'browser/main /resources/favicon-230x230.png' ) ,
16+ icon : path . resolve ( __dirname , '.. /resources/favicon-230x230.png' ) ,
1617 message : message
1718 } )
1819 } )
1920 // .on('checking-for-update', function () {
2021 // // Connecting
22+ // console.log('checking...')
2123 // })
2224 . on ( 'update-available' , function ( ) {
2325 nn . notify ( {
2426 title : 'Update is available!! ' + versionText ,
25- icon : path . join ( __dirname , 'browser/main /resources/favicon-230x230.png' ) ,
27+ icon : path . resolve ( __dirname , '.. /resources/favicon-230x230.png' ) ,
2628 message : 'Download started.. wait for the update ready.'
2729 } )
2830 } )
2931 . on ( 'update-not-available' , function ( ) {
30- nn . notify ( {
31- title : 'Latest Build!! ' + versionText ,
32- icon : path . join ( __dirname , 'browser/main/resources/favicon-230x230.png' ) ,
33- message : 'Hope you to enjoy our app :D'
34- } )
32+ if ( ! versionNotified ) {
33+ nn . notify ( {
34+ title : 'Latest Build!! ' + versionText ,
35+ icon : path . resolve ( __dirname , '../resources/favicon-230x230.png' ) ,
36+ message : 'Hope you to enjoy our app :D'
37+ } )
38+ versionNotified = true
39+ }
3540 } )
3641
3742module . exports = autoUpdater
0 commit comments