Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 142 lines (117 sloc) 4.84 kb
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
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.
15 set config=Debug
16 set target=Build
17 set noprojgen=
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
18 set nobuild=
055a933f »
2011-11-22 Add exe and msi signing to vcbuild.bat
19 set nosign=
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
20 set test=
21 set test_args=
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
22 set msi=
2af64316 »
2011-11-11 Add upload command to vcbuild.bat
23 set upload=
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
24
25 :next-arg
26 if "%1"=="" goto args-done
27 if /i "%1"=="debug" set config=Debug&goto arg-ok
28 if /i "%1"=="release" set config=Release&goto arg-ok
29 if /i "%1"=="clean" set target=Clean&goto arg-ok
30 if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
31 if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
055a933f »
2011-11-22 Add exe and msi signing to vcbuild.bat
32 if /i "%1"=="nosign" set nosign=1&goto arg-ok
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
33 if /i "%1"=="test-uv" set test=test-uv&goto arg-ok
34 if /i "%1"=="test-internet"set test=test-internet&goto arg-ok
35 if /i "%1"=="test-pummel" set test=test-pummel&goto arg-ok
36 if /i "%1"=="test-simple" set test=test-simple&goto arg-ok
37 if /i "%1"=="test-message" set test=test-message&goto arg-ok
38 if /i "%1"=="test-all" set test=test-all&goto arg-ok
39 if /i "%1"=="test" set test=test&goto arg-ok
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
40 if /i "%1"=="msi" set msi=1&goto arg-ok
2af64316 »
2011-11-11 Add upload command to vcbuild.bat
41 if /i "%1"=="upload" set upload=1&goto arg-ok
9c70b09e »
2011-11-17 Fix strange vcbuild "label not found" error
42
43
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
44 :arg-ok
45 shift
46 goto next-arg
47 :args-done
2af64316 »
2011-11-11 Add upload command to vcbuild.bat
48 if defined upload goto upload
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
49
50
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
51 :project-gen
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
52 @rem Skip project generation if requested.
53 if defined noprojgen goto msbuild
54
55 @rem Generate the VS project.
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
56 python tools\gyp_node -f msvs -G msvs_version=2010
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
57 if errorlevel 1 goto create-msvs-files-failed
58 if not exist node.sln goto create-msvs-files-failed
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
59 echo Project files generated.
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
60
61 :msbuild
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
62 @rem Skip project generation if requested.
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
63 if defined nobuild goto msi
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
64
d01b87d9 »
2011-09-05 win: vcbuild.bat should attempt to run vcvarsall.bat
65 @rem Bail out early if not running in VS build env.
66 if defined VCINSTALLDIR goto msbuild-found
67 if not defined VS100COMNTOOLS goto msbuild-not-found
68 if not exist "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat" goto msbuild-not-found
69 call "%VS100COMNTOOLS%\..\..\vc\vcvarsall.bat"
70 if not defined VCINSTALLDIR goto msbuild-not-found
71 goto msbuild-found
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
72
d01b87d9 »
2011-09-05 win: vcbuild.bat should attempt to run vcvarsall.bat
73 :msbuild-not-found
74 echo Build skipped. To build, this file needs to run from VS cmd prompt.
75 goto run
76
77 :msbuild-found
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
78 @rem Build the sln with msbuild.
cdb5864f »
2011-12-28 Make msbuild run in parallel.
79 msbuild node.sln /m /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
80 if errorlevel 1 goto exit
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
81
055a933f »
2011-11-22 Add exe and msi signing to vcbuild.bat
82 if defined nosign goto msi
83 signtool sign /a Release\node.exe
84
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
85 :msi
86 @rem Skip msi generation if not requested
87 if not defined msi goto run
895fa3a5 »
2011-11-11 Simplify and move getnodeversion.py
88 python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt"
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
89 if not errorlevel 0 echo Cannot determine current version of node.js & goto exit
90 for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i
e5cf3f97 »
2011-11-22 Fixes #2083. Support installing npm in the .msi
91 heat dir deps\npm -var var.NPMSourceDir -dr NodeModulesFolder -cg NPMFiles -gg -template fragment -nologo -out npm.wxs
cdb5864f »
2011-12-28 Make msbuild run in parallel.
92 msbuild "%~dp0tools\msvs\msi\nodemsi.sln" /m /t:Clean,Build /p:Configuration=%config% /p:NodeVersion=%NODE_VERSION% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
93 if errorlevel 1 goto exit
94
055a933f »
2011-11-22 Add exe and msi signing to vcbuild.bat
95 if defined nosign goto run
96 signtool sign /a Release\node.msi
97
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
98 :run
99 @rem Run tests if requested.
100 if "%test%"=="" goto exit
101
102 if "%config%"=="Debug" set test_args=--mode=debug
103 if "%config%"=="Release" set test_args=--mode=release
104
105 if "%test%"=="test" set test_args=%test_args% simple message
106 if "%test%"=="test-internet" set test_args=%test_args% internet
107 if "%test%"=="test-pummel" set test_args=%test_args% pummel
108 if "%test%"=="test-simple" set test_args=%test_args% simple
109 if "%test%"=="test-message" set test_args=%test_args% message
110 if "%test%"=="test-all" set test_args=%test_args%
111
112 echo running 'python tools/test.py %test_args%'
113 python tools/test.py %test_args%
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
114 goto exit
115
116 :create-msvs-files-failed
117 echo Failed to create vc project files.
118 goto exit
119
2af64316 »
2011-11-11 Add upload command to vcbuild.bat
120 :upload
121 echo uploading .exe .msi .pdb to nodejs.org
122 python "%~dp0tools\getnodeversion.py" > "%temp%\node_version.txt"
123 if not errorlevel 0 echo Cannot determine current version of node.js & goto exit
124 for /F "tokens=*" %%i in (%temp%\node_version.txt) do set NODE_VERSION=%%i
125 @echo on
126 ssh node@nodejs.org mkdir -p web/nodejs.org/dist/v%NODE_VERSION%
d214576d »
2011-11-11 Be consistent with v before version in packages
127 scp Release\node.msi node@nodejs.org:~/web/nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%.msi
2af64316 »
2011-11-11 Add upload command to vcbuild.bat
128 scp Release\node.exe node@nodejs.org:~/web/nodejs.org/dist/v%NODE_VERSION%/node.exe
129 scp Release\node.pdb node@nodejs.org:~/web/nodejs.org/dist/v%NODE_VERSION%/node.pdb
130 @echo off
131 goto exit
132
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
133 :help
055a933f »
2011-11-22 Add exe and msi signing to vcbuild.bat
134 echo vcbuild.bat [debug/release] [msi] [test-all/test-uv/test-internet/test-pummel/test-simple/test-message] [clean] [noprojgen] [nobuild] [nosign]
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
135 echo Examples:
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
136 echo vcbuild.bat : builds debug build
6fadbec7 »
2011-09-14 wix project to create msi installer for windows
137 echo vcbuild.bat release msi : builds release build and MSI installer package
779c93c5 »
2011-08-26 merge vcbuild.bat and generate_projects.bat
138 echo vcbuild.bat test : builds debug build and runs tests
19ff87a9 »
2011-08-23 vcbuild.bat - for building from cmd-line using msbuild
139 goto exit
140
141 :exit
Something went wrong with that request. Please try again.