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 Bail out early if not running in VS build env.
15 if not defined VCINSTALLDIR goto msbuild-not-found
17 @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
34 @rem Skip project generation if requested.
35 if defined noprojgen goto msbuild
38 @rem Generate the VS project.
39 call generate-projects.bat
40 if errorlevel 1 goto create-msvs-files-failed
41 if not exist node.sln goto create-msvs-files-failed
44 @rem Build the sln with msbuild.
45 msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
46 if errorlevel 1 goto exit
49 :create-msvs-files-failed
50 echo Failed to create vc project files.
54 echo Failed to build. In order to build the solution this file needs
55 echo to run from VS command script.
59 echo This script must run from VS command prompt.
60 echo vcbuild.bat [debug/release] [clean] [noprojgen]
62 echo vcbuild.bat : builds debug build
63 echo vcbuild.bat release bench: builds release build