3 :: Prebuild generator for the Radegast
\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 %SystemRoot%\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 if not (.%2)==(.dist) goto NODIST
\r
50 echo echo ==== GENERATE DISTRIBUTION BEGIN ==== >> compile.bat
\r
51 copy Radegast\radegast.nsi bin
\r
52 echo del /q Radegast-*-installer.exe >> compile.bat
\r
53 echo del /q radegast-latest.zip >> compile.bat
\r
55 if not exist "%PROGRAMFILES%\NSIS\Unicode\makensis.exe" goto NOUNINSIS
\r
56 echo "%PROGRAMFILES%\NSIS\Unicode\makensis.exe" bin\radegast.nsi >> compile.bat
\r
60 if not exist "%PROGRAMFILES%\NSIS\makensis.exe" goto NONSIS
\r
61 echo "%PROGRAMFILES%\NSIS\makensis.exe" bin\radegast.nsi >> compile.bat
\r
64 echo cd bin >> compile.bat
\r
65 echo 7z.exe a -r -tzip ..\radegast-latest.zip *.* >> compile.bat
\r
66 echo cd .. >> compile.bat
\r
70 echo :SUCCESS >> compile.bat
\r
71 echo echo Build Successful! >> compile.bat
\r
72 echo exit /B 0 >> compile.bat
\r
73 echo :FAIL >> compile.bat
\r
74 echo echo Build Failed, check log for reason >> compile.bat
\r
75 echo exit /B 1 >> compile.bat
\r
77 :: perform the appropriate action
\r
78 if(.%1)==(.msbuild) compile.bat
\r
79 if(.%1)==(.nant) compile.bat
\r
80 if(.%1)==(.dist) compile.bat
\r