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

59 lines
1.8 KiB
Batchfile

@echo off
setlocal EnableExtensions
set "SOURCE_ROOT=%~dp0."
set "BUILD_DIR=%SOURCE_ROOT%\build_lib"
set "BUILD_DIR_2256=%SOURCE_ROOT%\build_lib2256"
for %%D in ("%BUILD_DIR%" "%BUILD_DIR_2256%") do (
if exist "%%~D" (
echo Removing existing build directory %%~D...
rmdir /s /q "%%~D"
if errorlevel 1 (
echo [ERROR] Failed to remove build directory %%~D.
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 -DEUI_HANDLE_AI_2256=OFF -DEUI_BUILD_MISSIONS=OFF
if errorlevel 1 (
echo [ERROR] CMake configuration failed.
exit /b 1
)
cmake --build "%BUILD_DIR%" --config Debug --target eui_tools eui_crypto eui_frameworkSdk
if errorlevel 1 goto build_failed
cmake --build "%BUILD_DIR%" --config Release --target eui_tools eui_crypto eui_frameworkSdk
if errorlevel 1 goto build_failed
cmake -S "%SOURCE_ROOT%" -B "%BUILD_DIR_2256%" -G "Visual Studio 17 2022" -A x64 -DEUI_USE_PREBUILT_LIBS=OFF -DEUI_HANDLE_AI_2256=ON -DEUI_BUILD_MISSIONS=OFF
if errorlevel 1 (
echo [ERROR] CMake 2256 configuration failed.
exit /b 1
)
cmake --build "%BUILD_DIR_2256%" --config Debug --target eui_tools
if errorlevel 1 goto build_failed
cmake --build "%BUILD_DIR_2256%" --config Release --target eui_tools
if errorlevel 1 goto build_failed
if not exist "%SOURCE_ROOT%\lib\eui_tools2256_d.lib" goto build_failed
if not exist "%SOURCE_ROOT%\lib\eui_tools2256.lib" goto build_failed
echo eui_tools, eui_crypto, and eui_frameworkSdk Debug and Release builds completed.
echo eui_tools2256 Debug and Release builds completed.
exit /b 0
:build_failed
echo [ERROR] Library build failed.
exit /b 1