summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorBen Monroe <bendono@gmail.com>2016-02-25 21:51:35 +0900
committerBen Monroe <bendono@gmail.com>2016-02-26 02:09:07 +0900
commit70749779abb4994ef4087f305c41ee14ca495e0b (patch)
tree16f7f59cd637437433f122d389412b516422c5df /build.cmd
parent41fcf5dc470e704243693b63ebf546fd7dcc614d (diff)
downloadcoreclr-70749779abb4994ef4087f305c41ee14ca495e0b.tar.gz
coreclr-70749779abb4994ef4087f305c41ee14ca495e0b.tar.bz2
coreclr-70749779abb4994ef4087f305c41ee14ca495e0b.zip
Validate PowerShell prerequisite. Update documentation.
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd10
1 files changed, 10 insertions, 0 deletions
diff --git a/build.cmd b/build.cmd
index 5ace7f7d6d..f0c219b69f 100644
--- a/build.cmd
+++ b/build.cmd
@@ -212,6 +212,10 @@ if defined __MscorlibOnly goto CheckVS
echo %__MsgPrefix%Checking prerequisites
+:: Validate that PowerShell is accessibile.
+for %%X in (powershell.exe) do (set __PSDir=%%~$PATH:X)
+if not defined __PSDir goto NoPS
+
:: Eval the output from probe-win1.ps1
for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy RemoteSigned "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a
@@ -650,6 +654,12 @@ echo build all x64 x86 Checked Release
echo -- builds x64 and x86 architectures, Checked and Release build types for each
exit /b 1
+:NoPS
+echo PowerShell is a prerequisite to build this repository, but it is not accessible.
+echo Ensure that it is defined in the PATH environment variable.
+echo Typically it should be %%SYSTEMROOT%%\System32\WindowsPowerShell\v1.0\.
+exit /b 1
+
:NoVS
echo Visual Studio 2015+ ^(Community is free^) is a prerequisite to build this repository.
echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites