基于C++自动化编译工具的使用详解
更新时间:2013年05月16日 16:01:34 作者:
本篇文章是对C++中自动化编译工具的使用进行了详细的分析介绍,需要的朋友参考下
@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、编译后进行打包,并存放到Release\HYTradingGateway目录下
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 Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv
SET ProjectCMD="F:\HyCode\HYTradingGateway
del /F /Q /S %ProjectCMD%\bin\*.pdb
del /F /Q /S %ProjectCMD%\bin\*.ilk
del /F /Q /S %ProjectCMD%\bin\unipackage*.dll
del /F /Q /S %ProjectCMD%\bin\tools.dll
del /F /Q /S %ProjectCMD%\bin\activemqTool.dll
del /F /Q /S %ProjectCMD%\bin\sqliteTool.dll
del /F /Q /S %ProjectCMD%\bin\MJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%\bin\SJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%\bin\*.exe
echo 清除无效文件完成
echo -----------------------------------------------------------
echo -----------------------------------------------------------
echo 开始编译HYTradingGateway
"%VSCMD%" %ProjectCMD%\tools\tools.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\activemqTool\activemqTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\sqliteTool\sqliteTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\MJSExchangeAPI\MJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\SJSExchangeAPI\SJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_base\unipackage_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_cffex\unipackage_cffex.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_ctp\unipackage_ctp.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_czce\unipackage_czce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_dce\unipackage_dce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_ib\unipackage_ib.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_mjs\unipackage_mjs.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_shfe\unipackage_shfe.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_szse\unipackage_szse.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage\unipackage.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackageBank_base\unipackageBank_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_boc\unipackage_boc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_bbc\unipackage_bbc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackageBank\unipackageBank.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\HYTradingGateway\HYTradingGateway.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\TestTrade\TestTrade.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:\HYTradingGateway\bin\" /e /s /h /d /c /y
Xcopy %ProjectCMD%\\config" "E:\HYTradingGateway\config\" /e /s /h /d /c /y
rd /S /Q E:\HYTradingGateway\config\.svn
del /F /Q /S E:\HYTradingGateway\bin\*.txt
del /F /Q /S E:\HYTradingGateway\bin\*.lib
del /F /Q /S E:\HYTradingGateway\bin\*.dat
SET zipCMD=C:\Program Files\HaoZip
"%zipCMD%\HaoZipC.exe" -r -tzip a E:\HYTradingGateway-�te:~0,10%.zip E:\HYTradingGateway
copy "E:\HYTradingGateway-�te:~0,10%.zip" "F:\Release\HYTradingGateway\"
echo HYTradingGateway打包完成
echo -----------------------------------------------------------
echo 自动打开打包后存放文件夹
start "HYTradingGateway自动化编译打包工具" "F:\Release\HYTradingGateway"
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、编译后进行打包,并存放到Release\HYTradingGateway目录下
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 Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv
SET ProjectCMD="F:\HyCode\HYTradingGateway
del /F /Q /S %ProjectCMD%\bin\*.pdb
del /F /Q /S %ProjectCMD%\bin\*.ilk
del /F /Q /S %ProjectCMD%\bin\unipackage*.dll
del /F /Q /S %ProjectCMD%\bin\tools.dll
del /F /Q /S %ProjectCMD%\bin\activemqTool.dll
del /F /Q /S %ProjectCMD%\bin\sqliteTool.dll
del /F /Q /S %ProjectCMD%\bin\MJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%\bin\SJSExchangeAPI.dll
del /F /Q /S %ProjectCMD%\bin\*.exe
echo 清除无效文件完成
echo -----------------------------------------------------------
echo -----------------------------------------------------------
echo 开始编译HYTradingGateway
"%VSCMD%" %ProjectCMD%\tools\tools.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\activemqTool\activemqTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\sqliteTool\sqliteTool.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\MJSExchangeAPI\MJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\SJSExchangeAPI\SJSExchangeAPI.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_base\unipackage_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_cffex\unipackage_cffex.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_ctp\unipackage_ctp.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_czce\unipackage_czce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_dce\unipackage_dce.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_ib\unipackage_ib.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_mjs\unipackage_mjs.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_shfe\unipackage_shfe.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_szse\unipackage_szse.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage\unipackage.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackageBank_base\unipackageBank_base.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_boc\unipackage_boc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackage_bbc\unipackage_bbc.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\unipackageBank\unipackageBank.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\HYTradingGateway\HYTradingGateway.sln" /Rebuild
"%VSCMD%" %ProjectCMD%\TestTrade\TestTrade.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:\HYTradingGateway\bin\" /e /s /h /d /c /y
Xcopy %ProjectCMD%\\config" "E:\HYTradingGateway\config\" /e /s /h /d /c /y
rd /S /Q E:\HYTradingGateway\config\.svn
del /F /Q /S E:\HYTradingGateway\bin\*.txt
del /F /Q /S E:\HYTradingGateway\bin\*.lib
del /F /Q /S E:\HYTradingGateway\bin\*.dat
SET zipCMD=C:\Program Files\HaoZip
"%zipCMD%\HaoZipC.exe" -r -tzip a E:\HYTradingGateway-�te:~0,10%.zip E:\HYTradingGateway
copy "E:\HYTradingGateway-�te:~0,10%.zip" "F:\Release\HYTradingGateway\"
echo HYTradingGateway打包完成
echo -----------------------------------------------------------
echo 自动打开打包后存放文件夹
start "HYTradingGateway自动化编译打包工具" "F:\Release\HYTradingGateway"
pause
相关文章
C/C++中static,const,inline三种关键字详细总结
以下是对C/C++中static,const,inline的三种关键字进行了详细的分析介绍,需要的朋友可以过来参考下2013-09-09
最新评论