VS自动编译代码脚本

VS自动编译代码脚本

 

把以下代码保存为.bat,即可使用。

作者楼主师傅midas---范

 

@echo "5秒钟后默认开始后台编译:"
@ping 127.0.0.1 -n 5 1>nul 2>nul


set svn_home=D:\Program Files\bin
set svn_work=D:\bridge\SVN_Bridge\trunk
set svn_solution=D:\bridge\SVN_Bridge\build
set OutputDir=C:\Users\liuym\Desktop

DEL C:\Users\liuym\Desktop\releaseOutput.txt
DEL C:\Users\liuym\Desktop\debugOutput.txt

set VSInstall_route=D:\Program Files\Common7\IDE
set System_route=C:\WINDOWS
set ProgramFile=C:\Program Files
set Solution="D:\bridge\SVN_Bridge\build\All_for Debug.sln"

"%svn_home%"\TortoiseProc.exe/command:update /path:"%svn_work%*%svn_solution%" /quiet /notempfile /closeonend:1

path=%VSInstall_route%\Common7\IDE;%System_route%\System32;%System_route% ;%System_route%\System32\wbem;%VSInstall_route%\Common7\bin;%VSInstall_route%\Common7\PlatformSDK\bin;%VSInstall_route%Common7\Tools\bin;%VSInstall_route%\Common7\tools;%ProgramFile%\HTML Help Workshop;%VSInstall_route%;%VSInstall_route%\SDK\v2.0\bin;%System_route%\SysWow64;


 

@echo Build DeBug Start!!!
time /T >> C:\Users\liuym\Desktop\releaseOutput.txt

devenv %Solution% /build "Debug|Win32" /Out %OutputDir%\debugOutput.txt

devenv %Solution% /build "Debug|Win32" /Out %OutputDir%\debugOutput.txt

devenv %Solution% /build "Debug|Win32" /Out %OutputDir%\debugOutput.txt

@echo Debug Build Finish!!!
time /T >> C:\Users\liuym\Desktop\releaseOutput.txt

@echo Build Release Start!!!
time /T >> C:\Users\liuym\Desktop\releaseOutput.txt

devenv %Solution% /build "Release|Win32" /Out %OutputDir%\releaseOutput.txt

devenv %Solution% /build "Release|Win32" /Out %OutputDir%\releaseOutput.txt

devenv %Solution% /build "Release|Win32" /Out %OutputDir%\releaseOutput.txt

@echo Release Build Finish!!!
time /T >> C:\Users\liuym\Desktop\releaseOutput.txt

%System_route%\system32\Shutdown.exe -s -f -t 30

 

你可能感兴趣的:(脚本)