Skip to content

Commit aeab23f

Browse files
committed
1.16.3
1 parent 0748fa3 commit aeab23f

File tree

4 files changed

+16
-10
lines changed

4 files changed

+16
-10
lines changed

electron/config.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,14 @@ const config = {
5252
workers: 1
5353
},
5454
autoUpdate: {
55-
windows: true, // windows可以开启;macOs 需要签名验证
55+
windows: false, // windows可以开启;macOs 需要签名验证
5656
macOS: false,
5757
linux: false,
5858
options: {
5959
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
6161
},
6262
force: false, // 强制更新
63-
autoDownload: false, // 是否自动下载
6463
},
6564
awakeProtocol: {
6665
protocol: 'electron-egg', // 自定义协议名(默认你的应用名称-英文)

electron/lib/autoUpdater.js

+4-6
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ exports.setup = function () {
2525
eLogger.info('[autoUpdater] [setup] server: ', server);
2626
updateConfig.options.url = server;
2727

28-
// 是否自动下载
28+
// 是否后台自动下载
2929
autoUpdater.autoDownload = updateConfig.force ? true : false;
30-
//if (process.env.EE_SERVER_ENV == 'local') {
30+
if (process.env.EE_SERVER_ENV == 'local') {
3131
autoUpdater.updateConfigPath = path.join(__dirname, '../../out/dev-app-update.yml')
32-
//}
32+
}
3333

3434
try {
3535
autoUpdater.setFeedURL(updateConfig.options);
@@ -58,9 +58,7 @@ exports.setup = function () {
5858
sendStatusToWindow(info);
5959
})
6060
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);
6462
let totalSize = bytesChange(progressObj.total);
6563
let transferredSize = bytesChange(progressObj.transferred);
6664
let text = '已下载 ' + percentNumber + '%';

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "electron-egg",
3-
"version": "1.16.2",
3+
"version": "1.16.3",
44
"description": "A fast, desktop software development framework",
55
"main": "main.js",
66
"scripts": {

update.md

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 1.16.3
2+
1. 增加手动更新 和 强制更新
3+
2. 修复ipc监听
4+
3. 限制一个窗口
5+
4. 更新demo
6+
7+
## 1.16.2
8+
1. 忘记更新什么了
9+
110
## 1.16.1
211
1. 代码压缩与混淆,增加安全性
312
2. 新logo

0 commit comments

Comments
 (0)