summaryrefslogtreecommitdiff
path: root/vcbuild.bat
diff options
context:
space:
mode:
authorBert Belder <bertbelder@gmail.com>2012-04-04 18:06:00 +0200
committerisaacs <i@izs.me>2012-04-06 16:15:51 -0700
commit13304194466eca3e85cc5e7cc16f102c2759eeb7 (patch)
treea7b5f0f26a3ef17a1116e6e16c2afaaa8495be81 /vcbuild.bat
parentc9f17305e611c2b304bd646093ef498a489ee504 (diff)
downloadnode-new-13304194466eca3e85cc5e7cc16f102c2759eeb7.tar.gz
Windows: add build step that generates license.rtf from LICENSE
Diffstat (limited to 'vcbuild.bat')
-rw-r--r--vcbuild.bat18
1 files changed, 15 insertions, 3 deletions
diff --git a/vcbuild.bat b/vcbuild.bat
index f6d0fefe37..bb532108f2 100644
--- a/vcbuild.bat
+++ b/vcbuild.bat
@@ -22,6 +22,7 @@ set nosnapshot=
set test=
set test_args=
set msi=
+set licensertf=
set upload=
:next-arg
@@ -36,6 +37,7 @@ if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
if /i "%1"=="nosign" set nosign=1&goto arg-ok
if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
+if /i "%1"=="licensertf" set licensertf=1&goto arg-ok
if /i "%1"=="test-uv" set test=test-uv&goto arg-ok
if /i "%1"=="test-internet" set test=test-internet&goto arg-ok
if /i "%1"=="test-pummel" set test=test-pummel&goto arg-ok
@@ -43,7 +45,7 @@ if /i "%1"=="test-simple" set test=test-simple&goto arg-ok
if /i "%1"=="test-message" set test=test-message&goto arg-ok
if /i "%1"=="test-all" set test=test-all&goto arg-ok
if /i "%1"=="test" set test=test&goto arg-ok
-if /i "%1"=="msi" set msi=1&goto arg-ok
+if /i "%1"=="msi" set msi=1&set licensertf=1&goto arg-ok
if /i "%1"=="upload" set upload=1&goto arg-ok
echo Warning: ignoring invalid command line option `%1`.
@@ -75,7 +77,7 @@ echo Project files generated.
:msbuild
@rem Skip project generation if requested.
-if defined nobuild goto msi
+if defined nobuild goto sign
@rem Bail out early if not running in VS build env.
if defined VCINSTALLDIR goto msbuild-found
@@ -94,9 +96,19 @@ goto run
msbuild node.sln /t:%target% /p:Configuration=%config% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
if errorlevel 1 goto exit
-if defined nosign goto msi
+:sign
+@rem Skip signing if the `nosign` option was specified.
+if defined nosign goto licensertf
+
signtool sign /a Release\node.exe
+:licensertf
+@rem Skip license.rtf generation if not requested.
+if not defined licensertf goto msi
+
+%config%\node tools\license2rtf.js < LICENSE > %config%\license.rtf
+if errorlevel 1 echo Failed to generate license.rtf&goto exit
+
:msi
@rem Skip msi generation if not requested
if not defined msi goto run