You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

39 lines
955 B

@echo off
set UV=C:\Keil_v5\UV4\UV4.exe
@REM 检查参数是否等于2个
if "%1"=="" (
echo Usage: %0 UV_PRO_PATH BUILD_RESULT
echo Done.
exit /b 1
)
set UV_PRO_PATH=%1
set BUILD_RESULT=%2
echo --------------------------------------------------------------------
echo - -
echo -build %1 %2
echo - -
echo --------------------------------------------------------------------
echo .>build_log.txt
@REM 删除旧的编译结果
if exist %BUILD_RESULT% (
del %BUILD_RESULT%
)
@REM 编译
%UV% -j12 -b %UV_PRO_PATH% -o %cd%\build_log.txt
@REM 显示编译日志
type build_log.txt
@REM 检查编译是否成功
if exist %BUILD_RESULT% (
echo -
echo --------------------Build Success---------------------.
echo Done.
) else (
echo -
echo --------------------Build failed---------------------.
echo Done.
exit /b 1
)