优化打包脚本

This commit is contained in:
ruotongyu
2024-07-05 19:59:35 +08:00
parent 1eeac3c874
commit db262c2e5e
3 changed files with 10 additions and 12 deletions

View File

@@ -29,7 +29,7 @@ export const config = {
initShow: true,
width: 800,
height: 650,
openDevTools: true,
openDevTools: false,
frame: true,
transparent: false,
hash: '/#config'

View File

@@ -7,9 +7,9 @@ export default() => {
})
document.body.addEventListener('mouseover', (e: MouseEvent)=>{
// if (e.target === document.body) {
// window.api.setIgnoreMouseEvents(true, {forward: true})
// }
if (e.target === document.body) {
window.api.setIgnoreMouseEvents(true, {forward: true})
}
})
}
return {setIgnoreMouseEvents}

View File

@@ -1,20 +1,18 @@
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
move .\dist\win-unpacked\resources\app.asar.unpacked\resources\icon.png .\dist\win-unpacked\resources
cd ..
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
REM 设置要清空的目录路径
set "target_dir=..\app\dist"
REM 删除目标目录中的所有文件
del /f /q "%target_dir%\*.*"
REM 删除目标目录中的所有子目录
for /d %%i in ("%target_dir%\*") do rmdir /s /q
xcopy .\dist\autoMateServer\* ..\app\dist\win-unpacked\ /E /H /F /I /Y
cd ..\app\dist
REN win-unpacked autoMate