Commit aeab23f 1 parent 0748fa3 commit aeab23f Copy full SHA for aeab23f
File tree 4 files changed +16
-10
lines changed
4 files changed +16
-10
lines changed Original file line number Diff line number Diff line change @@ -52,15 +52,14 @@ const config = {
52
52
workers : 1
53
53
} ,
54
54
autoUpdate : {
55
- windows : true , // windows可以开启;macOs 需要签名验证
55
+ windows : false , // windows可以开启;macOs 需要签名验证
56
56
macOS : false ,
57
57
linux : false ,
58
58
options : {
59
59
provider : 'generic' ,
60
- url : 'https://kaka996 .coding.net/p/resource/d/tx-resource2/git/raw/master/ee ' // resource dir
60
+ url : 'https://www .coding.net/' // resource dir
61
61
} ,
62
62
force : false , // 强制更新
63
- autoDownload : false , // 是否自动下载
64
63
} ,
65
64
awakeProtocol : {
66
65
protocol : 'electron-egg' , // 自定义协议名(默认你的应用名称-英文)
Original file line number Diff line number Diff line change @@ -25,11 +25,11 @@ exports.setup = function () {
25
25
eLogger . info ( '[autoUpdater] [setup] server: ' , server ) ;
26
26
updateConfig . options . url = server ;
27
27
28
- // 是否自动下载
28
+ // 是否后台自动下载
29
29
autoUpdater . autoDownload = updateConfig . force ? true : false ;
30
- // if (process.env.EE_SERVER_ENV == 'local') {
30
+ if ( process . env . EE_SERVER_ENV == 'local' ) {
31
31
autoUpdater . updateConfigPath = path . join ( __dirname , '../../out/dev-app-update.yml' )
32
- // }
32
+ }
33
33
34
34
try {
35
35
autoUpdater . setFeedURL ( updateConfig . options ) ;
@@ -58,9 +58,7 @@ exports.setup = function () {
58
58
sendStatusToWindow ( info ) ;
59
59
} )
60
60
autoUpdater . on ( 'download-progress' , ( progressObj ) => {
61
- let percentStr = String ( progressObj . percent ) ;
62
- let endIndex = percentStr . indexOf ( '.' ) != - 1 ? percentStr . indexOf ( '.' ) : percentStr . length ;
63
- let percentNumber = percentStr . substring ( 0 , endIndex ) ;
61
+ let percentNumber = parseInt ( progressObj . percent ) ;
64
62
let totalSize = bytesChange ( progressObj . total ) ;
65
63
let transferredSize = bytesChange ( progressObj . transferred ) ;
66
64
let text = '已下载 ' + percentNumber + '%' ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " electron-egg" ,
3
- "version" : " 1.16.2 " ,
3
+ "version" : " 1.16.3 " ,
4
4
"description" : " A fast, desktop software development framework" ,
5
5
"main" : " main.js" ,
6
6
"scripts" : {
Original file line number Diff line number Diff line change
1
+ ## 1.16.3
2
+ 1 . 增加手动更新 和 强制更新
3
+ 2 . 修复ipc监听
4
+ 3 . 限制一个窗口
5
+ 4 . 更新demo
6
+
7
+ ## 1.16.2
8
+ 1 . 忘记更新什么了
9
+
1
10
## 1.16.1
2
11
1 . 代码压缩与混淆,增加安全性
3
12
2 . 新logo
You can’t perform that action at this time.
0 commit comments