From 8b792496d6ebf3e76909d3286795392d3b8ee9cc Mon Sep 17 00:00:00 2001 From: AskaEth Date: Wed, 9 Sep 2026 19:32:29 +0800 Subject: [PATCH] =?UTF-8?q?build:=20=E7=94=A8=20PowerShell=20=E5=BC=BA?= =?UTF-8?q?=E5=88=B6=E6=B8=85=E7=90=86=E5=8F=AA=E8=AF=BB=E7=9A=84=20Consol?= =?UTF-8?q?e=20=E4=BA=A7=E7=89=A9=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- deploy/build.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy/build.bat b/deploy/build.bat index 8aeab14..00adc1d 100644 --- a/deploy/build.bat +++ b/deploy/build.bat @@ -37,10 +37,10 @@ call :ensure_electron || exit /b 1 cd .. echo === [5/5] 组装便携版 Console === -REM 旧版本可能正在运行,文件被占用会导致清理失败 +REM 旧版本可能正在运行,且 Electron 解压出来的 .pak 带只读属性,普通 rmdir 删不掉 taskkill /im "Scoreboard Console.exe" /f >nul 2>&1 taskkill /im scoreboard.exe /f >nul 2>&1 -rmdir /s /q "%CONSOLE_OUT%" 2>nul +powershell -NoProfile -Command "if (Test-Path '%CONSOLE_OUT%') { Remove-Item -Recurse -Force '%CONSOLE_OUT%' }" || exit /b 1 mkdir "%CONSOLE_OUT%" || exit /b 1 xcopy /e /i /y "console\node_modules\electron\dist" "%CONSOLE_OUT%" >nul || exit /b 1 mkdir "%CONSOLE_OUT%\resources\app" 2>nul