批处理脚本编译vs工程

使用脚本直接编译vs工程,减少操作步骤,快速编译执行
代码如下
@color b
@echo environment init…
@SET VARTOOL=“C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\Tools\vsdevcmd\ext”
@SET COMPILETOOL=“C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\devenv.com”
@call %VARTOOL%\vcvars.bat

@echo config init…
@SET SLNNAME=“ES-All.sln”
@SET BldType=“rebuild”
@SET BldCfg=“Release|x64”

@%~d0
@cd %~dp0

IF exist Build.log (DEL Build.log)

@echo UI compile start…
@for /F %%a in (.\CompileProjectUI.txt) do %COMPILETOOL% %SLNNAME% /%BldType% %BldCfg% /Project %%a

pause & exit

CompileProjectUI.txt文本内容如下
选择工程的启动工程
ES

你可能感兴趣的:(c++,batch命令)