mirror of
https://github.com/yuruotong1/autoMate.git
synced 2025-12-26 05:16:21 +08:00
加入自动更新功能(未完成)
This commit is contained in:
parent
b32b440cd3
commit
d611e9e277
@ -9,11 +9,21 @@ files:
|
||||
- '!{.eslintignore,.eslintrc.cjs,.prettierignore,.prettierrc.yaml,dev-app-update.yml,CHANGELOG.md,README.md}'
|
||||
- '!{.env,.env.*,.npmrc,pnpm-lock.yaml}'
|
||||
- '!{tsconfig.json,tsconfig.node.json,tsconfig.web.json}'
|
||||
extraFiles:
|
||||
- from: '../server/dist/autoMateServer'
|
||||
filter: '**/*'
|
||||
- from: './resources'
|
||||
to: 'resources'
|
||||
filter: '**/*'
|
||||
asarUnpack:
|
||||
- resources/**
|
||||
win:
|
||||
executableName: automate
|
||||
nsis:
|
||||
oneClick: false # 创建一键安装程序还是辅助安装程序(默认是一键安装)
|
||||
allowElevation: true # 是否允许请求提升,如果为false,则用户必须使用提升的权限重新启动安装程序 (仅作用于辅助安装程序)
|
||||
allowToChangeInstallationDirectory: true # 是否允许修改安装目录 (仅作用于辅助安装程序)
|
||||
createStartMenuShortcut: true # 是否创建开始菜单快捷方式
|
||||
artifactName: ${name}-${version}-setup.${ext}
|
||||
shortcutName: ${productName}
|
||||
uninstallDisplayName: ${productName}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
"main": "./out/main/index.js",
|
||||
"author": "example.com",
|
||||
"homepage": "https://electron-vite.org",
|
||||
"repository": "https://github.com/yuruotong1/autoMate/tree/master/app",
|
||||
"repository": "https://github.com/yuruotong1/autoMate",
|
||||
"scripts": {
|
||||
"format": "prettier --write .",
|
||||
"lint": "eslint . --ext .js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix",
|
||||
@ -17,9 +17,9 @@
|
||||
"build": "npm run typecheck && electron-vite build",
|
||||
"postinstall": "electron-builder install-app-deps",
|
||||
"build:unpack": "npm run build && electron-builder --dir",
|
||||
"build:win": "npm run build && electron-builder --win",
|
||||
"build:mac": "electron-vite build && electron-builder --mac",
|
||||
"build:linux": "electron-vite build && electron-builder --linux"
|
||||
"build:win": "npm run build && electron-builder --win --config",
|
||||
"build:mac": "electron-vite build && electron-builder --mac --config",
|
||||
"build:linux": "electron-vite build && electron-builder --linux --config"
|
||||
},
|
||||
"dependencies": {
|
||||
"@ai-sdk/openai": "^0.0.33",
|
||||
|
||||
@ -48,7 +48,7 @@ export default (win: BrowserWindow) => {
|
||||
.showMessageBox({
|
||||
type: 'warning',
|
||||
title: '更新提示',
|
||||
message: '软件更新失败',
|
||||
message: `软件更新失败,消息为:${_info.message}`,
|
||||
buttons: ['网站下载', '取消更新'],
|
||||
cancelId: 1
|
||||
})
|
||||
|
||||
@ -2,7 +2,7 @@ import { BrowserWindow, IpcMainEvent, IpcMainInvokeEvent, Menu, Tray, app } from
|
||||
import { OptionsType, createWindow} from "./createWindow"
|
||||
const { exec } = require('child_process');
|
||||
import { is } from '@electron-toolkit/utils'
|
||||
import autoMateServer from './autoUpdater'
|
||||
import autoUpdater from './autoUpdater'
|
||||
export const config = {
|
||||
search: {
|
||||
id: 0,
|
||||
@ -109,7 +109,7 @@ app.whenReady().then(() => {
|
||||
console.error(`stderr: ${stderr}`);
|
||||
});}
|
||||
|
||||
autoMateServer(win)
|
||||
autoUpdater(win)
|
||||
|
||||
// getWindowByName('code')
|
||||
// getWindowByName('config')
|
||||
|
||||
11
package.bat
Normal file
11
package.bat
Normal file
@ -0,0 +1,11 @@
|
||||
cd server
|
||||
call .\.venv\Scripts\activate
|
||||
pip install -r requirements.txt
|
||||
call echo y | pyinstaller main.spec
|
||||
xcopy .\.venv\Lib\site-packages\litellm\*.json .\dist\autoMateServer\_internal\litellm\ /E /H /F /I /Y
|
||||
|
||||
cd app
|
||||
set "target_dir=.\dist"
|
||||
del /f /q "%target_dir%\*.*"
|
||||
for /d %%i in ("%target_dir%\*") do rmdir /s /q "%%i"
|
||||
call npm run build:win
|
||||
Loading…
x
Reference in New Issue
Block a user