用vs的devenv.com命令列 自動編譯 程式
vs2008怎麼用devenv.com命令列自動編譯?
其實在vs2008目錄下面提供了devenv.com命令列方式,我們可以從VS安裝目錄..\Microsoft Visual Studio 9\Common7\IDE下面找到它,以下是幾個常見用法:
devenv.com [solutionfile | projectfile |anyfile.ext] [switches]
set DEV_PATH="C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.com"
set WARE_PATH="../../../WarePlugin/solution/WarePlugin.sln"
set NWARE_PATH="../../../NWarePlugin/solution/NwarePlugin.sln"
set TRADE_PATH="../../../TradePlugin/solution/TradePlugin.sln"
set GLOD_PATH="../../../GoldPricePlugin/solution/GoldPricePlugin.sln"
@echo =====================================
@echo 正在編譯主工程檔案檔案...
%DEV_PATH% "../../solution/WorkStation.sln" /rebuild Release /out main.txt
@echo =====================================
@echo 正在編譯WARE...
%DEV_PATH% %WARE_PATH% /rebuild Release /out ware.txt
@echo =====================================
@echo 正在編譯WARE...
%DEV_PATH% %NWARE_PATH% /rebuild Release /out nware.txt
@echo =====================================
@echo 正在編譯TRADE...
%DEV_PATH% %TRADE_PATH% /rebuild Release /out trade.txt
@echo =====================================
@echo 正在編譯GLOD...
%DEV_PATH% %GLOD_PATH% /rebuild Release /out glod.txt