From db262c2e5eff1d5dfceeba8289fd8ba2e3af69eb Mon Sep 17 00:00:00 2001 From: ruotongyu Date: Fri, 5 Jul 2024 19:59:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=89=93=E5=8C=85=E8=84=9A?= =?UTF-8?q?=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/windows.ts | 2 +- app/src/renderer/src/hooks/useIgnoreMouseEvents.ts | 6 +++--- package.bat | 14 ++++++-------- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/app/src/main/windows.ts b/app/src/main/windows.ts index b153958..bee90b6 100644 --- a/app/src/main/windows.ts +++ b/app/src/main/windows.ts @@ -29,7 +29,7 @@ export const config = { initShow: true, width: 800, height: 650, - openDevTools: true, + openDevTools: false, frame: true, transparent: false, hash: '/#config' diff --git a/app/src/renderer/src/hooks/useIgnoreMouseEvents.ts b/app/src/renderer/src/hooks/useIgnoreMouseEvents.ts index 81d63dc..4fa19f9 100644 --- a/app/src/renderer/src/hooks/useIgnoreMouseEvents.ts +++ b/app/src/renderer/src/hooks/useIgnoreMouseEvents.ts @@ -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} diff --git a/package.bat b/package.bat index 516a05a..2a5048a 100644 --- a/package.bat +++ b/package.bat @@ -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