Files
eUi/build_all.bat
RCiRoot e3f7733316 V20260829-2.6.1
完成框架目录和模块重构;新增核心、单例、工具、加密及框架 SDK;统一任务、相机和 RPC 接口,并增加离线检测、相机标定、备份恢复、版本管理、崩溃守护和心跳监控功能。
2026-09-20 16:01:09 +08:00

58 lines
1.6 KiB
Batchfile

@echo off
setlocal EnableExtensions
set "SOURCE_ROOT=%~dp0."
set "BUILD_DIR=%SOURCE_ROOT%\build_all"
set "BIN_DIR=%SOURCE_ROOT%\bin"
if exist "%BUILD_DIR%" (
echo Removing existing build directory...
rmdir /s /q "%BUILD_DIR%"
if errorlevel 1 (
echo [ERROR] Failed to remove the existing build directory.
exit /b 1
)
)
if exist "%BIN_DIR%" (
echo Removing generated runtime artifacts...
for %%T in (eui_app launcher eui_gui eui_gui_d eui_core eui_core_d eui_singleton eui_singleton_d crashpad_handler) do (
for %%E in (dll exe pdb ilk manifest) do (
if exist "%BIN_DIR%\%%T.%%E" (
del /f /q "%BIN_DIR%\%%T.%%E"
if errorlevel 1 (
echo [ERROR] Failed to remove "%BIN_DIR%\%%T.%%E".
exit /b 1
)
)
)
)
)
where cmake >nul 2>&1
if errorlevel 1 (
echo [ERROR] CMake was not found on PATH.
exit /b 1
)
cmake -S "%SOURCE_ROOT%" -B "%BUILD_DIR%" -G "Visual Studio 17 2022" -A x64 -DEUI_USE_PREBUILT_LIBS=OFF -DBUILD_UNIT_TESTS=OFF -DEUI_BUILD_SUBMODULES=OFF -DEUI_BUILD_RPCMODULES=OFF -DEUI_BUILD_MISSIONS=OFF
if errorlevel 1 (
echo [ERROR] CMake configuration failed.
exit /b 1
)
echo Building all targets in Debug, including src DLL targets...
cmake --build "%BUILD_DIR%" --config Debug
if errorlevel 1 goto build_failed
echo Building all targets in Release, including src DLL targets...
cmake --build "%BUILD_DIR%" --config Release
if errorlevel 1 goto build_failed
echo All Debug and Release targets completed.
exit /b 0
:build_failed
echo [ERROR] Full build failed.
exit /b 1