调用vs2015编译,Readme.txt采用Unicode编码,winrar才能识别
nnhy authored at 2015-10-07 10:31:16
2.69 KiB
X_NET20
:: ×Ô¶¯±àÒëX×é¼þ£¬²¢¸üе½DLLÖÐÈ¥
:: 1£¬¸üÐÂËùÓÐÔ´ÂëSrc
:: 2£¬¸üÐÂDLL
:: 3£¬±àÒëËùÓÐ×é¼þ
:: 4£¬¿½±´DLL
:: 5£¬Ìá½»DLL¸üÐÂ
:: 6£¬´ò°üSrcºÍDLLµ½FTP

::@echo off
::cls
setlocal enabledelayedexpansion
title ×Ô¶¯±àÒë

:: 1£¬¸üÐÂËùÓÐÔ´ÂëSrc
:: 2£¬¸üÐÂDLL
:: ±£´æµ±Ç°Ä¿Â¼£¬²¢Çл»Ä¿Â¼
pushd ..
set svn=https://svn.newlifex.com/svn/X/trunk
:: do else µÈ¹Ø¼ü×Öǰºó¶¼Ó¦¸ÃÔ¤Áô¿Õ¸ñ
for %%i in (Src DLL DLL4 XCoder) do (
	if not exist %%i (
		svn checkout %svn%/%%i %%i
	) else (
		svn info %svn%/%%i
		svn revert %%i
		svn update %%i
	)
)
:: »Ö¸´Ä¿Â¼
popd

:: 3£¬±àÒëËùÓÐ×é¼þ
::"D:\MS\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe" X×é¼þ.sln /Build Release
::set vs="B:\MS\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
set vs="B:\MS\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
for %%i in (NewLife.Core XCode NewLife.CommonEntity NewLife.Net XAgent XControl XTemplate) do (
	%vs% X×é¼þ.sln /Build Release /Project %%i
)
for %%i in (XCoder NewLife.Cube) do (
	%vs% X×é¼þ.sln /Build Release /Project %%i
)

:: 4£¬¿½±´DLL
copy ..\Bin\N*.* ..\DLL\ /y
copy ..\Bin\X*.* ..\DLL\ /y
del ..\DLL\*.config /f/s/q
copy ..\Bin4\N*.* ..\DLL4\ /y
copy ..\Bin4\X*.* ..\DLL4\ /y
del ..\DLL4\*.config /f/s/q

if not exist ..\XCoder\Zip (
	md ..\XCoder\Zip
)
for %%i in (XCoder.exe XCoder.exe.config NewLife.Core.dll XCode.dll XTemplate.dll NewLife.Net.dll) do (
	copy ..\XCoder\%%i ..\XCoder\Zip\%%i /y
)

:: 5£¬Ìá½»DLL¸üÐÂ
svn commit -m "×Ô¶¯±àÒë" ..\DLL
svn commit -m "×Ô¶¯±àÒë" ..\DLL4
svn commit -m "×Ô¶¯±àÒë" ..\XCoder

:: 6£¬´ò°üSrcºÍDLLµ½FTP
set zipexe="B:\Pro\WinRAR\WinRAR.exe"
set zip=%zipexe% a -m5 -s -z..\Src\Readme.txt -ibck
::set zipexe="D:\Pro\7-zip\7z.exe"
::set zip=%zipexe% a -tzip -mx9
set dest=E:\XX\X

:: ·¢²¼SrcÔ´Âë
rd XCoder\bin /s/q
rd XCoder\obj /s/q
set zipfile=Src.zip
del Src*.zip /f/q
%zip% -r %zipfile% XCoder\*.*
move /y Src*.zip %dest%\%zipfile%

:: ·¢²¼XCodeÀý×ÓÔ´Âë

:: ·¢²¼DLLѹËõ°ü
:: ±£´æµ±Ç°Ä¿Â¼£¬²¢Çл»Ä¿Â¼
pushd ..\DLL
set zipfile=DLL.zip
del DLL*.zip /f/q
%zip% %zipfile% *.dll *.exe *.pdb *.xml
move /y DLL*.zip %dest%\%zipfile%
:: »Ö¸´Ä¿Â¼
popd

:: ·¢²¼DLL4ѹËõ°ü
:: ±£´æµ±Ç°Ä¿Â¼£¬²¢Çл»Ä¿Â¼
pushd ..\DLL4
set zipfile=DLL4.zip
del DLL*.zip /f/q
set zip4=%zipexe% a -m5 -s -z..\Src\Readme.txt -ibck
%zip4% %zipfile% *.dll *.exe *.pdb *.xml
move /y DLL*.zip %dest%\%zipfile%
:: »Ö¸´Ä¿Â¼
popd

:: ·¢²¼´úÂëÉú³ÉÆ÷XCoder
:: ±£´æµ±Ç°Ä¿Â¼£¬²¢Çл»Ä¿Â¼
pushd ..\XCoder\Zip
set zipfile=XCoder.zip
del XCoder*.zip /f/q
::del *.vshost.* /f/q
::del Setting.config /f/q
set zip=%zipexe% a -m5 -s -z..\..\Src\Readme.txt -ibck
%zip% %zipfile% *.dll *.exe *.config
move /y XCoder*.zip %dest%\%zipfile%
:: »Ö¸´Ä¿Â¼
popd

::pause