Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 94 lines (76 sloc) 2.555 kB
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
1 @echo off
2
3 cd %~dp0
4
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
13
14 @rem Process arguments.
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
15 set config=
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
16 set target=Build
17 set noprojgen=
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
18 set nobuild=
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
19 set run=
20
21 :next-arg
22 if "%1"=="" goto args-done
23 if /i "%1"=="debug" set config=Debug&goto arg-ok
24 if /i "%1"=="release" set config=Release&goto arg-ok
25 if /i "%1"=="test" set run=run-tests.exe&goto arg-ok
26 if /i "%1"=="bench" set run=run-benchmarks.exe&goto arg-ok
27 if /i "%1"=="clean" set target=Clean&goto arg-ok
28 if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
29 if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
30 :arg-ok
31 shift
32 goto next-arg
33 :args-done
34
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
35 if not "%config%"=="" goto project-gen
36 if "%run%"=="run-tests.exe" set config=Debug& goto project-gen
37 if "%run%"=="run-benchmarks.exe" set config=Release& goto project-gen
38 set config=Debug
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
39
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
40 :project-gen
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
41 @rem Skip project generation if requested.
42 if defined noprojgen goto msbuild
43
44 @rem Generate the VS project.
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
45
46 if exist build\gyp goto have_gyp
47 echo svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp
48 svn co http://gyp.googlecode.com/svn/trunk@983 build/gyp
49 if errorlevel 1 goto gyp_install_failed
50 goto have_gyp
51
52 :gyp_install_failed
53 echo Failed to download gyp. Make sure you have subversion installed, or
54 echo manually install gyp into %~dp0build\gyp.
55 goto exit
56
57 :have_gyp
58 python gyp_uv
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
59 if errorlevel 1 goto create-msvs-files-failed
7cafd8b update vcbuild.bat with correct sln file
Igor Zinkovsky authored
60 if not exist uv.sln goto create-msvs-files-failed
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
61 echo Project files generated.
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
62
63 :msbuild
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
64 @rem Skip project generation if requested.
65 if defined nobuild goto run
66
67 if not defined VCINSTALLDIR echo Build skipped. To build, this file needs to run from VS cmd prompt.& goto run
68
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
69 @rem Build the sln with msbuild.
7cafd8b update vcbuild.bat with correct sln file
Igor Zinkovsky authored
70 msbuild uv.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
71 if errorlevel 1 goto exit
72
73 :run
74 @rem Run tests if requested.
75 if "%run%"=="" goto exit
76 if not exist %config%\%run% goto exit
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
77 echo running '%config%\%run%'
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
78 %config%\%run%
79 goto exit
80
81 :create-msvs-files-failed
82 echo Failed to create vc project files.
83 goto exit
84
85 :help
e954b4c merge create_msvs_files.bat and vcbuild.bat into vcbuild.bat
Igor Zinkovsky authored
86 echo vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild]
da4e864 vcbuild.bat for building libuv with msbuild
Igor Zinkovsky authored
87 echo Examples:
88 echo vcbuild.bat : builds debug build
89 echo vcbuild.bat test : builds debug build and runs tests
90 echo vcbuild.bat release bench: builds release build and runs benchmarks
91 goto exit
92
93 :exit
Something went wrong with that request. Please try again.