OSDN Git Service

RAD-480: Text from Muted/Blocked Users no longer shows in group chats
[radegast/radegast.git] / runprebuild2010.bat
1 @echo off\r
2 ::\r
3 :: Prebuild generator for the Radegast\r
4 ::\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
12 ::\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
15 ::\r
16 \r
17 echo ##########################################\r
18 echo creating prebuild files for: vs2010\r
19 echo Parameters: %1 %2\r
20 echo ##########################################\r
21 \r
22 if not exist bin mkdir bin\r
23 \r
24 :: run prebuild to generate solution/project files from prebuild.xml configuration file\r
25 Radegast\prebuild.exe /target vs2010\r
26 \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
30 \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
34 \r
35 if(.%1)==(.nant) echo nant >> compile.bat\r
36 if(.%1)==(.nant) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat\r
37 \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
43 \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
46 \r
47 if(.%2)==(.runtests) echo IF ERRORLEVEL 1 GOTO FAIL >> compile.bat\r
48 \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
54 \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
57 goto NONSIS\r
58 :NOUNINSIS\r
59 \r
60 if not exist "%PROGRAMFILES%\NSIS\makensis.exe" goto NONSIS\r
61 echo "%PROGRAMFILES%\NSIS\makensis.exe" bin\radegast.nsi >> compile.bat\r
62 :NONSIS\r
63 \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
67 \r
68 :NODIST\r
69 \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
76 \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
81 \r