Skip to content

Commit

Permalink
0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
kangfenmao committed Jul 15, 2024
1 parent 74aa953 commit b487c68
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
4 changes: 4 additions & 0 deletions electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ mac:
arch:
- arm64
- x64
- target: zip
arch:
- arm64
- x64
dmg:
artifactName: ${productName}-${version}-${arch}.${ext}
linux:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cherry-studio",
"version": "0.2.0",
"version": "0.2.1",
"description": "A powerful AI assistant for producer.",
"main": "./out/main/index.js",
"author": "[email protected]",
Expand Down
2 changes: 1 addition & 1 deletion src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ app.whenReady().then(() => {
.then((name) => console.log(`Added Extension: ${name}`))
.catch((err) => console.log('An error occurred: ', err))

setTimeout(() => new AppUpdater(), 5000)
setTimeout(() => new AppUpdater(), 3000)
})

// Quit when all windows are closed, except on macOS. There, it's common
Expand Down
4 changes: 2 additions & 2 deletions src/main/updater.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ export default class AppUpdater {
autoUpdater.logger = logger
autoUpdater.forceDevUpdateConfig = true
autoUpdater.autoDownload = false
autoUpdater.checkForUpdatesAndNotify()
autoUpdater.checkForUpdates()

// 触发检查更新(此方法用于被渲染线程调用,例如页面点击检查更新按钮来调用此方法)
ipcMain.on('check-for-update', () => {
logger.info('触发检查更新')
autoUpdater.checkForUpdates()
return autoUpdater.checkForUpdates()
})

// 检测下载错误
Expand Down
3 changes: 2 additions & 1 deletion src/preload/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ import { electronAPI } from '@electron-toolkit/preload'

// Custom APIs for renderer
const api = {
getAppInfo: () => ipcRenderer.invoke('get-app-info')
getAppInfo: () => ipcRenderer.invoke('get-app-info'),
checkForUpdate: () => ipcRenderer.invoke('check-for-update')
}

// Use `contextBridge` APIs to expose Electron APIs to
Expand Down

0 comments on commit b487c68

Please sign in to comment.