3 :: Prebuild generator for the Radegast Library
\r
5 :: Command Line Options:
\r
6 :: (none) - create solution/project files and create compile.bat file to build solution
\r
7 :: msbuild - Create project files, compile solution
\r
8 :: msbuild runtests - create project files, compile solution, run unit tests
\r
9 :: msbuild docs - create project files, compile solution, build API documentation
\r
10 :: msbuild docs dist - Create project files, compile solution, run unit tests, build api documentation, create binary zip
\r
11 :: - and exe installer
\r
13 :: nant - Create project files, run nant to compile solution
\r
14 :: nant runtests - Create project files, run nant to compile solution, run unit tests
\r
17 echo ##########################################
\r
18 echo creating prebuild files for: vs2008
\r
19 echo Parameters: %1 %2
\r
20 echo ##########################################
\r
22 if not exist bin mkdir bin
\r
24 :: run prebuild to generate solution/project files from prebuild.xml configuration file
\r
25 Radegast\Prebuild.exe /target vs2008
\r
27 :: build compile.bat file based on command line parameters
\r
28 echo @echo off > compile.bat
\r
29 if(.%1)==(.) echo C:\WINDOWS\Microsoft.NET\Framework\v3.5\msbuild Radegast.sln >> compile.bat
\r
31 if(.%1)==(.msbuild) echo echo ==== COMPILE BEGIN ==== >> compile.bat
\r
32 if(.%1)==(.msbuild) echo %SystemRoot%\Microsoft.NET\Framework\v3.5\MSBuild.exe /p:Configuration=Release Radegast.sln >> compile.bat
\r
33 if(.%1)==(.msbuild) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
35 if(.%1)==(.nant) echo nant >> compile.bat
\r
36 if(.%1)==(.nant) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
38 if(.%3)==(.docs) echo echo ==== GENERATE DOCUMENTATION BEGIN ==== >> compile.bat
\r
39 if(.%2)==(.docs) echo %SystemRoot%\Microsoft.NET\Framework\v3.5\MSBuild.exe /p:Configuration=Release docs\Radegast.shfbproj >> compile.bat
\r
40 if(.%2)==(.docs) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
41 if(.%2)==(.docs) echo 7z.exe a -tzip docs\documentation.zip docs\trunk >> compile.bat
\r
42 if(.%2)==(.docs) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
44 if(.%2)==(.runtests) echo echo ==== UNIT TESTS BEGIN ==== >> compile.bat
\r
45 if(.%2)==(.runtests) echo nunit-console bin\Radegast.Tests.dll /exclude:Network /nodots /labels /xml:testresults.xml >> compile.bat
\r
47 if(.%2)==(.runtests) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
49 :: nsis compiler needs to be in path
\r
50 if(.%3)==(.dist) echo echo ==== GENERATE DISTRIBUTION BEGIN ==== >> compile.bat
\r
51 if(.%3)==(.dist) echo makensis.exe /DPlatform=test docs\Radegast-installer.nsi >> compile.bat
\r
52 if(.%3)==(.dist) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
53 if(.%3)==(.dist) echo 7z.exe a -tzip dist\Radegast-dist.zip @docs\distfiles.lst >> compile.bat
\r
54 if(.%3)==(.dist) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat
\r
56 echo :SUCCESS >> compile.bat
\r
57 echo echo Build Successful! >> compile.bat
\r
58 echo exit /B 0 >> compile.bat
\r
59 echo :FAIL >> compile.bat
\r
60 echo echo Build Failed, check log for reason >> compile.bat
\r
61 echo exit /B 1 >> compile.bat
\r
63 :: perform the appropriate action
\r
64 if(.%1)==(.msbuild) compile.bat
\r
65 if(.%1)==(.nant) compile.bat
\r
66 if(.%1)==(.dist) compile.bat
\r