first commit
This commit is contained in:
43
clean-build.bat
Normal file
43
clean-build.bat
Normal file
@@ -0,0 +1,43 @@
|
||||
@echo off
|
||||
REM filepath: /c:/Users/Administrator/Desktop/ffi-napi/clean-build.bat
|
||||
echo ========================================
|
||||
echo 清理构建文件
|
||||
echo ========================================
|
||||
echo.
|
||||
|
||||
echo 步骤 1: 结束可能占用文件的进程...
|
||||
taskkill /F /IM "FFI-NAPI App.exe" 2>nul
|
||||
taskkill /F /IM electron.exe 2>nul
|
||||
timeout /t 2 /nobreak >nul
|
||||
|
||||
echo.
|
||||
echo 步骤 2: 删除 dist 目录...
|
||||
if exist dist (
|
||||
echo 正在删除 dist 文件夹...
|
||||
rmdir /s /q dist 2>nul
|
||||
if exist dist (
|
||||
echo 第一次删除失败,等待 3 秒后重试...
|
||||
timeout /t 3 /nobreak >nul
|
||||
rmdir /s /q dist 2>nul
|
||||
)
|
||||
)
|
||||
|
||||
if exist dist (
|
||||
echo 警告: dist 目录仍然存在,可能有文件被占用
|
||||
echo 请手动关闭所有相关程序后重试
|
||||
pause
|
||||
exit /b 1
|
||||
) else (
|
||||
echo dist 目录清理成功!
|
||||
)
|
||||
|
||||
echo.
|
||||
echo 步骤 3: 删除临时文件...
|
||||
if exist node_modules\.cache rmdir /s /q node_modules\.cache 2>nul
|
||||
|
||||
echo.
|
||||
echo ========================================
|
||||
echo 清理完成!现在可以重新构建
|
||||
echo ========================================
|
||||
echo.
|
||||
pause
|
||||
Reference in New Issue
Block a user