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 if not defined VCINSTALLDIR echo Build skipped. To build, this file needs to run from VS cmd prompt.& goto run
58 @rem Build the sln with msbuild.
59 msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
60 if errorlevel 1 goto exit
63 @rem Run tests if requested.
64 if "%test%"=="" goto exit
66 if "%config%"=="Debug" set test_args=--mode=debug
67 if "%config%"=="Release" set test_args=--mode=release
69 if "%test%"=="test" set test_args=%test_args% simple message
70 if "%test%"=="test-uv" set test_args=%test_args% --libuv simple
71 if "%test%"=="test-internet" set test_args=%test_args% internet
72 if "%test%"=="test-pummel" set test_args=%test_args% pummel
73 if "%test%"=="test-simple" set test_args=%test_args% simple
74 if "%test%"=="test-message" set test_args=%test_args% message
75 if "%test%"=="test-all" set test_args=%test_args%
77 echo running 'python tools/test.py %test_args%'
78 python tools/test.py %test_args%
81 :create-msvs-files-failed
82 echo Failed to create vc project files.
86 echo vcbuild.bat [debug/release] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [nobuild]
88 echo vcbuild.bat : builds debug build
89 echo vcbuild.bat test : builds debug build and runs tests
90 echo vcbuild.bat release test-uv: builds release build and runs --libuv tests