-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathclean.bat
More file actions
62 lines (49 loc) · 1.46 KB
/
clean.bat
File metadata and controls
62 lines (49 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
@echo off
REM ========================================
REM Bit HCI - 统一清理脚本
REM 清理统一的 build 目录
REM ========================================
setlocal enabledelayedexpansion
echo.
echo ========================================
echo Cleaning Bit HCI Project
echo ========================================
echo.
REM 如果有 /Y 参数,则跳过确认
if /i "%1"=="/Y" goto :skip_confirm
REM 警告用户
echo This will delete the build directory and all compiled files.
set /p CONFIRM="Are you sure? (y/N): "
if /i not "%CONFIRM%"=="y" (
echo Operation cancelled.
exit /b 0
)
:skip_confirm
REM 切换到项目根目录
cd /d "%~dp0.."
echo Cleaning...
REM 删除统一的 build 目录
if exist "build" (
echo [Deleting] build\
rmdir /s /q "build" 2>nul
)
REM 清理旧的分散 build 目录(如果存在)
set COMPONENTS=triangle rectangle text circle line progressbar switch button checkbox radio slider input label tooltip dropdown
for %%c in (%COMPONENTS%) do (
if exist "examples\cpp\%%c\build" (
echo [Deleting] examples\cpp\%%c\build\
rmdir /s /q "examples\cpp\%%c\build" 2>nul
)
)
if exist "native\build" (
echo [Deleting] native\build\
rmdir /s /q "native\build" 2>nul
)
echo.
echo ========================================
echo Cleaning Complete
echo ========================================
echo All build artifacts have been removed.
echo Run scripts\configure.bat to reconfigure.
echo.
exit /b 0