build: 用 PowerShell 强制清理只读的 Console 产物目录
This commit is contained in:
1 parent
68ee99a5a2
commit
8b792496d6
1 file changed
+2
-2
+2
-2
@@ -37,10 +37,10 @@ call :ensure_electron || exit /b 1
|
|||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo === [5/5] 组装便携版 Console ===
|
echo === [5/5] 组装便携版 Console ===
|
||||||
REM 旧版本可能正在运行,文件被占用会导致清理失败
|
REM 旧版本可能正在运行,且 Electron 解压出来的 .pak 带只读属性,普通 rmdir 删不掉
|
||||||
taskkill /im "Scoreboard Console.exe" /f >nul 2>&1
|
taskkill /im "Scoreboard Console.exe" /f >nul 2>&1
|
||||||
taskkill /im scoreboard.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
|
mkdir "%CONSOLE_OUT%" || exit /b 1
|
||||||
xcopy /e /i /y "console\node_modules\electron\dist" "%CONSOLE_OUT%" >nul || 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
|
mkdir "%CONSOLE_OUT%\resources\app" 2>nul
|
||||||
|
|||||||
Reference in new issue
Block a user