forked from resourcelib/resourcelib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.cmd
More file actions
65 lines (53 loc) · 1.69 KB
/
build.cmd
File metadata and controls
65 lines (53 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
@echo off
if "%~1"=="" (
call :Usage
goto :EOF
)
pushd "%~dp0"
setlocal ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION
rem sync up packages
echo Installing missing packages
.\.nuget\nuget.exe install .\.nuget\packages.config -o .\packages\
set ProgramFilesDir=%ProgramFiles%
if NOT "%ProgramFiles(x86)%"=="" set ProgramFilesDir=%ProgramFiles(x86)%
set VisualStudioCmd=%ProgramFilesDir%\Microsoft Visual Studio 8.0\VC\vcvarsall.bat
if EXIST "%VisualStudioCmd%" call "%VisualStudioCmd%"
for /D %%n in ( "%ProgramFilesDir%\NUnit*" ) do (
set NUnitDir=%%~n
)
if EXIST ".\packages" (
for /D %%n in ( ".\packages\NUnit.Runners.*" ) do (
set NUnitDir=%%~n
)
)
if EXIST "%NUnitDir%\bin" set NUnitBinDir=%NUnitDir%\bin
if EXIST "%NUnitDir%\bin\net-2.0" set NUnitBinDir=%NUnitDir%\bin\net-2.0
if EXIST "%NUnitDir%\tools" set NUnitBinDir=%NUnitDir%\tools
if NOT EXIST "%NUnitBinDir%" echo Missing NUnit, expected in %NUnitDir%
if NOT EXIST "%NUnitBinDir%" exit /b -1
set FrameworkVersion=v4.0.30319
set FrameworkDir=%SystemRoot%\Microsoft.NET\Framework
PATH=%FrameworkDir%\%FrameworkVersion%;%PATH%
msbuild.exe ResourceLib.proj /t:%*
if NOT %ERRORLEVEL%==0 exit /b %ERRORLEVEL%
popd
endlocal
exit /b 0
goto :EOF
:Usage
echo Syntax:
echo.
echo build [target] /p:Configuration=[Debug (default),Release]
echo.
echo Target:
echo.
echo all : clean, build code, run tests, generate docs, package into zip (requires Sandcastle and Sandcastle Builder)
echo code : clean, build code
echo code_and_test : clean, build code, run tests
echo run_test_only : run tests
echo.
echo Examples:
echo.
echo build all
echo build all /p:Configuration=Release
goto :EOF