Skip to content

Commit

Permalink
improved the build scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
kerryjiang committed Oct 24, 2013
1 parent 3a80939 commit 66bf9b7
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 19 deletions.
19 changes: 0 additions & 19 deletions Build.Net45.bat

This file was deleted.

9 changes: 9 additions & 0 deletions Build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,13 @@ FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"
%msbuild% SuperSocket.2010.NET35.sln /p:Configuration=Release /t:Clean;Rebuild /p:OutputPath=..\bin\Net35\Release
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5" 2>nul
if errorlevel 0 (
%msbuild% SuperSocket.2012.sln /p:Configuration=Debug /t:Clean;Rebuild /p:OutputPath=..\bin\Net45\Debug
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

%msbuild% SuperSocket.2012.sln /p:Configuration=Release /t:Clean;Rebuild /p:OutputPath=..\bin\Net45\Release
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"
)

pause
32 changes: 32 additions & 0 deletions BuildServerManager.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
@echo off

set fdir=%WINDIR%\Microsoft.NET\Framework64

if not exist %fdir% (
set fdir=%WINDIR%\Microsoft.NET\Framework
)

set msbuild=%fdir%\v4.0.30319\msbuild.exe

%msbuild% Management\Server\SuperSocket.ServerManager.Net40.csproj /p:Configuration=Debug /t:Clean;Rebuild /p:OutputPath=..\..\bin\Net40\Debug
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

%msbuild% Management\Server\SuperSocket.ServerManager.Net40.csproj /p:Configuration=Release /t:Clean;Rebuild /p:OutputPath=..\..\bin\Net40\Release
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

%msbuild% Management\Server\SuperSocket.ServerManager.Net35.csproj /p:Configuration=Debug /t:Clean;Rebuild /p:OutputPath=..\..\bin\Net35\Debug
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

%msbuild% Management\Server\SuperSocket.ServerManager.Net35.csproj /p:Configuration=Release /t:Clean;Rebuild /p:OutputPath=..\..\bin\Net35\Release
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\v4.0.30319\SKUs\.NETFramework,Version=v4.5" 2>nul
if errorlevel 0 (
%msbuild% Management\Server\SuperSocket.ServerManager.Net45.csproj /p:Configuration=Debug /t:Clean;Rebuild /p:OutputPath=..\..\bin\Net45\Debug
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"

%msbuild% Management\Server\SuperSocket.ServerManager.Net45.csproj /p:Configuration=Release /t:Clean;Rebuild /p:OutputPath=..\..\bin\Net45\Release
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S obj') DO RMDIR /S /Q "%%G"
)

pause

0 comments on commit 66bf9b7

Please sign in to comment.