当前位置: 编程技术>c/c++/嵌入式
基于C++自动化编译工具的使用详解
来源: 互联网 发布时间:2014-10-14
本文导语: @echo off title=HYTradingGateway自动化编译打包工具mode con cols=80 lines=40echo -------------------------------------------------------------echo 使用说明echo. ec...
@echo off
title=HYTradingGateway自动化编译打包工具
mode con cols=80 lines=40
echo -------------------------------------------------------------
echo 使用说明
echo.
echo HYTradingGateway自动化编译打包工具、修改
echo 使用前提:
echo 1、安装VS2008
echo 2、安装好压
echo 3、ReleaseHYTradingGateway.bat路径修改
echo.
echo 1、版本发布前删除debug下所有的,临时文件,具体类型如下
echo *.aps *.idb *.ncp *.obj *.pch *.sbr *.tmp *.pdb *.bsc
echo *.ilk *.res *.ncb *.opt *.suo *.manifest *.dep *.htm
echo.
echo 2、版本发布前删除所有bin目录下的*.pdb *.ilk *.dll *.exe文件
echo.
echo 3、HYTradingGateway项目编译,一共包含21个子项目
echo.
echo 4、编译后进行打包,并存放到ReleaseHYTradingGateway目录下
echo.
echo 5、发布版本者将文件上传svn就可以自动完成整个发布过程
echo.
echo 6、支持打包后文件定位
echo.
echo 7、目前不支持svn自动上传、补丁命名,后续完善
echo.
echo Visual c++ 2008
echo.
echo shaoming 2012-04-13
echo -----------------------------------------------------------
pause
mode con cols=120 lines=60
color 8A
cls
echo -----------------------------------------------------------
echo 开始清除无效文件
del /F /Q /S *.aps *.idb *.ncp *.obj *.pch *.sbr *.tmp *.pdb *.bsc *.ilk *.res *.ncb *.opt *.suo *.manifest *.dep *.htm
SET VSCMD=C:Program FilesMicrosoft Visual Studio 9.0Common7IDEdevenv
SET ProjectCMD="F:HyCodeHYTradingGateway
del /F /Q /S %ProjectCMD%bin*.pdb
del /F /Q /S %ProjectCMD%bin*.ilk
del /F /Q /S %ProjectCMD%binunipackage*.dll
del /F /Q /S %ProjectCMD%bintools.dll
del /F /Q /S %ProjectCMD%binactivemqTool.dll
del /F /Q /S %ProjectCMD%binsqliteTool.dll
del /F /Q /S %ProjectCMD%binMJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%binSJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%bin*.exe
echo 清除无效文件完成
echo -----------------------------------------------------------
echo -----------------------------------------------------------
echo 开始编译HYTradingGateway
"%VSCMD%" %ProjectCMD%toolstools.sln" /Rebuild
"%VSCMD%" %ProjectCMD%activemqToolactivemqTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%sqliteToolsqliteTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%MJSExchangeAPIMJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%SJSExchangeAPISJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_baseunipackage_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_cffexunipackage_cffex.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_ctpunipackage_ctp.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_czceunipackage_czce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_dceunipackage_dce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_ibunipackage_ib.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_mjsunipackage_mjs.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_shfeunipackage_shfe.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_szseunipackage_szse.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackageunipackage.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackageBank_baseunipackageBank_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_bocunipackage_boc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_bbcunipackage_bbc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackageBankunipackageBank.sln" /Rebuild
"%VSCMD%" %ProjectCMD%HYTradingGatewayHYTradingGateway.sln" /Rebuild
"%VSCMD%" %ProjectCMD%TestTradeTestTrade.sln" /Rebuild
del /F /Q /S %ProjectCMD%bin*.pdb
del /F /Q /S %ProjectCMD%bin*.ilk
echo 编译HYTradingGateway完成
echo -----------------------------------------------------------
echo -----------------------------------------------------------
echo 开始HYTradingGateway打包
Xcopy %ProjectCMD%\bin" "E:HYTradingGatewaybin" /e /s /h /d /c /y
Xcopy %ProjectCMD%\config" "E:HYTradingGatewayconfig" /e /s /h /d /c /y
rd /S /Q E:HYTradingGatewayconfig.svn
del /F /Q /S E:HYTradingGatewaybin*.txt
del /F /Q /S E:HYTradingGatewaybin*.lib
del /F /Q /S E:HYTradingGatewaybin*.dat
SET zipCMD=C:Program FilesHaoZip
"%zipCMD%HaoZipC.exe" -r -tzip a E:HYTradingGateway-�te:~0,10%.zip E:HYTradingGateway
copy "E:HYTradingGateway-�te:~0,10%.zip" "F:ReleaseHYTradingGateway"
echo HYTradingGateway打包完成
echo -----------------------------------------------------------
echo 自动打开打包后存放文件夹
start "HYTradingGateway自动化编译打包工具" "F:ReleaseHYTradingGateway"
pause
title=HYTradingGateway自动化编译打包工具
mode con cols=80 lines=40
echo -------------------------------------------------------------
echo 使用说明
echo.
echo HYTradingGateway自动化编译打包工具、修改
echo 使用前提:
echo 1、安装VS2008
echo 2、安装好压
echo 3、ReleaseHYTradingGateway.bat路径修改
echo.
echo 1、版本发布前删除debug下所有的,临时文件,具体类型如下
echo *.aps *.idb *.ncp *.obj *.pch *.sbr *.tmp *.pdb *.bsc
echo *.ilk *.res *.ncb *.opt *.suo *.manifest *.dep *.htm
echo.
echo 2、版本发布前删除所有bin目录下的*.pdb *.ilk *.dll *.exe文件
echo.
echo 3、HYTradingGateway项目编译,一共包含21个子项目
echo.
echo 4、编译后进行打包,并存放到ReleaseHYTradingGateway目录下
echo.
echo 5、发布版本者将文件上传svn就可以自动完成整个发布过程
echo.
echo 6、支持打包后文件定位
echo.
echo 7、目前不支持svn自动上传、补丁命名,后续完善
echo.
echo Visual c++ 2008
echo.
echo shaoming 2012-04-13
echo -----------------------------------------------------------
pause
mode con cols=120 lines=60
color 8A
cls
echo -----------------------------------------------------------
echo 开始清除无效文件
del /F /Q /S *.aps *.idb *.ncp *.obj *.pch *.sbr *.tmp *.pdb *.bsc *.ilk *.res *.ncb *.opt *.suo *.manifest *.dep *.htm
SET VSCMD=C:Program FilesMicrosoft Visual Studio 9.0Common7IDEdevenv
SET ProjectCMD="F:HyCodeHYTradingGateway
del /F /Q /S %ProjectCMD%bin*.pdb
del /F /Q /S %ProjectCMD%bin*.ilk
del /F /Q /S %ProjectCMD%binunipackage*.dll
del /F /Q /S %ProjectCMD%bintools.dll
del /F /Q /S %ProjectCMD%binactivemqTool.dll
del /F /Q /S %ProjectCMD%binsqliteTool.dll
del /F /Q /S %ProjectCMD%binMJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%binSJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%bin*.exe
echo 清除无效文件完成
echo -----------------------------------------------------------
echo -----------------------------------------------------------
echo 开始编译HYTradingGateway
"%VSCMD%" %ProjectCMD%toolstools.sln" /Rebuild
"%VSCMD%" %ProjectCMD%activemqToolactivemqTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%sqliteToolsqliteTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%MJSExchangeAPIMJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%SJSExchangeAPISJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_baseunipackage_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_cffexunipackage_cffex.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_ctpunipackage_ctp.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_czceunipackage_czce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_dceunipackage_dce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_ibunipackage_ib.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_mjsunipackage_mjs.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_shfeunipackage_shfe.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_szseunipackage_szse.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackageunipackage.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackageBank_baseunipackageBank_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_bocunipackage_boc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackage_bbcunipackage_bbc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%unipackageBankunipackageBank.sln" /Rebuild
"%VSCMD%" %ProjectCMD%HYTradingGatewayHYTradingGateway.sln" /Rebuild
"%VSCMD%" %ProjectCMD%TestTradeTestTrade.sln" /Rebuild
del /F /Q /S %ProjectCMD%bin*.pdb
del /F /Q /S %ProjectCMD%bin*.ilk
echo 编译HYTradingGateway完成
echo -----------------------------------------------------------
echo -----------------------------------------------------------
echo 开始HYTradingGateway打包
Xcopy %ProjectCMD%\bin" "E:HYTradingGatewaybin" /e /s /h /d /c /y
Xcopy %ProjectCMD%\config" "E:HYTradingGatewayconfig" /e /s /h /d /c /y
rd /S /Q E:HYTradingGatewayconfig.svn
del /F /Q /S E:HYTradingGatewaybin*.txt
del /F /Q /S E:HYTradingGatewaybin*.lib
del /F /Q /S E:HYTradingGatewaybin*.dat
SET zipCMD=C:Program FilesHaoZip
"%zipCMD%HaoZipC.exe" -r -tzip a E:HYTradingGateway-�te:~0,10%.zip E:HYTradingGateway
copy "E:HYTradingGateway-�te:~0,10%.zip" "F:ReleaseHYTradingGateway"
echo HYTradingGateway打包完成
echo -----------------------------------------------------------
echo 自动打开打包后存放文件夹
start "HYTradingGateway自动化编译打包工具" "F:ReleaseHYTradingGateway"
pause