5 if /i "%1"=="help" goto help
6 if /i "%1"=="--help" goto help
7 if /i "%1"=="-help" goto help
8 if /i "%1"=="/help" goto help
9 if /i "%1"=="?" goto help
10 if /i "%1"=="-?" goto help
11 if /i "%1"=="--?" goto help
12 if /i "%1"=="/?" goto help
14 @rem Process arguments.
23 if "%1"=="" goto args-done
24 if /i "%1"=="debug" set config=Debug&goto arg-ok
25 if /i "%1"=="release" set config=Release&goto arg-ok
26 if /i "%1"=="clean" set target=Clean&goto arg-ok
27 if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
28 if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
29 if /i "%1"=="test-uv" set test=test-uv&goto arg-ok
30 if /i "%1"=="test-internet"set test=test-internet&goto arg-ok
31 if /i "%1"=="test-pummel" set test=test-pummel&goto arg-ok
32 if /i "%1"=="test-simple" set test=test-simple&goto arg-ok
33 if /i "%1"=="test-message" set test=test-message&goto arg-ok
34 if /i "%1"=="test-all" set test=test-all&goto arg-ok
35 if /i "%1"=="test" set test=test&goto arg-ok
43 @rem Skip project generation if requested.
44 if defined noprojgen goto msbuild
46 @rem Generate the VS project.
47 python tools\gyp_node -f msvs -G msvs_version=2010
48 if errorlevel 1 goto create-msvs-files-failed
49 if not exist node.sln goto create-msvs-files-failed
50 echo Project files generated.
53 @rem Skip project generation if requested.
54 if defined nobuild goto run
56 @rem Bail out early if not running in VS build env.
57 if defined VCINSTALLDIR goto msbuild-found
58 if not defined VS100COMNTOOLS goto msbuild-not-found
59 if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found
60 call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat"
61 if not defined VCINSTALLDIR goto msbuild-not-found
65 echo Build skipped. To build, this file needs to run from VS cmd prompt.
69 @rem Build the sln with msbuild.
70 msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
71 if errorlevel 1 goto exit
74 @rem Run tests if requested.
75 if "%test%"=="" goto exit
77 if "%config%"=="Debug" set test_args=--mode=debug
78 if "%config%"=="Release" set test_args=--mode=release
80 if "%test%"=="test" set test_args=%test_args% simple message
81 if "%test%"=="test-uv" set test_args=%test_args% --libuv simple
82 if "%test%"=="test-internet" set test_args=%test_args% internet
83 if "%test%"=="test-pummel" set test_args=%test_args% pummel
84 if "%test%"=="test-simple" set test_args=%test_args% simple
85 if "%test%"=="test-message" set test_args=%test_args% message
86 if "%test%"=="test-all" set test_args=%test_args%
88 echo running 'python tools/test.py %test_args%'
89 python tools/test.py %test_args%
92 :create-msvs-files-failed
93 echo Failed to create vc project files.
97 echo vcbuild.bat [debug/release] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [nobuild]
99 echo vcbuild.bat : builds debug build
100 echo vcbuild.bat test : builds debug build and runs tests
101 echo vcbuild.bat release test-uv: builds release build and runs --libuv tests