Skip to content

Commit

Permalink
v37-add update-electron-app
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxiaoxiao committed Dec 4, 2020
1 parent 8e239a3 commit 7098cfd
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 6 deletions.
Binary file modified .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .quasar/electron/electron-main.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 37 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ace-editor",
"version": "36.0.0",
"version": "37.0.0",
"description": "A Quasar Framework app",
"productName": "Quasar App",
"author": "wanghuajie <wanghuajie@xuetangx.com>",
Expand All @@ -17,7 +17,8 @@
"core-js": "^3.6.5",
"electron-log": "^4.3.0",
"electron-updater": "^4.3.5",
"quasar": "^1.0.0"
"quasar": "^1.0.0",
"update-electron-app": "^2.0.1"
},
"devDependencies": {
"@quasar/app": "^2.0.0",
Expand Down
6 changes: 4 additions & 2 deletions src-electron/main-process/electron-main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@ const os = require('os');
const path = require('path');
const log = require('electron-log')
const packageInfo = require('../../package.json');
const updater = require('update-electron-app')

// log.transports.file.level = false
// log.transports.console.level = false
// log.transports.file.file=""

const isMac = process.platform === 'darwin'
// const uploadUrl = 'http://127.0.0.1:4000/download/' // 更新服务器地址
const uploadUrl = 'https://github.com/small145900/myelectron/releases/latest/download/' // 更新服务器地址
// const uploadUrl = 'https://github.com/small145900/myelectron/releases/latest/download/' // 更新服务器地址

try {
if (process.platform === 'win32' && nativeTheme.shouldUseDarkColors === true) {
Expand Down Expand Up @@ -58,7 +59,8 @@ function createWindow () {

mainWindow.webContents.on('did-finish-load', () => {
mainWindow.webContents.send('version', packageInfo.version)
updateHandle();
// updateHandle();
updater();
})

}
Expand Down

0 comments on commit 7098cfd

Please sign in to comment.