dotnet-installer/build/prepare/CheckPrereqs.targets

42 lines
1.4 KiB
Text
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="UbuntuCoreclrAndCoreFxDependencies.props" />
<Import Project="DebianPackageBuildDependencies.props" />
<Import Project="CentosCoreclrAndCoreFxDependencies.props" />
<Target Name="CheckPrereqs"
DependsOnTargets="InitializeCommonProps;
CheckUbuntuAptGetDependencies;
CheckCentOsYumDependencies;">
<Message Text="Using Stage0 version:" />
<Exec Command="$(DotnetStage0) --version" />
</Target>
<Target Name="CheckUbuntuAptGetDependencies"
Condition=" '$(Rid)' == 'ubuntu.14.04-x64' ">
<Exec Command="dpkg -s %(UbuntuCoreclrAndCoreFxDependencies.Identity)" />
<Exec Command="dpkg -s %(DebianPackageBuildDependencies.Identity)" />
<OnError ExecuteTargets="ShowAptGetUsage" />
</Target>
<Target Name="ShowAptGetUsage">
<Message Text="Install the missing dependency with `sudo apt-get install {package}`." />
</Target>
<Target Name="CheckCentOsYumDependencies"
Condition=" '$(OSName)' == 'centos' ">
<Exec Command="yum list installed %(CentosCoreclrAndCoreFxDependencies.Identity)" />
<OnError ExecuteTargets="ShowYumUsage" />
</Target>
<Target Name="ShowYumUsage">
<Message Text="Install the missing dependency with `yum install {package}`." />
</Target>
</Project>