if "%__VCBuildArch%"=="" exit /b 0
:: Set the environment for the native build
+if not exist "%VCINSTALLDIR%Auxiliary\Build\vcvarsall.bat" goto :VSMissing
call "%VCINSTALLDIR%Auxiliary\Build\vcvarsall.bat" %__VCBuildArch%
if not "%ErrorLevel%"=="0" exit /b 1
<Project>
- <Target Name="FindPythonWindows"
+ <Target Name="_FindPythonWindows"
Condition="$([MSBuild]::IsOSPlatform(Windows)) and '$(PYTHON)' == ''"
Returns="$(PYTHON)">
<PropertyGroup>
<Exec Command="py -3 $(_PythonLocationScript) 2> nul || python3 $(_PythonLocationScript) 2> nul || python $(_PythonLocationScript) 2> nul"
StandardOutputImportance="Low"
EchoOff="true"
+ ContinueOnError="ErrorAndContinue"
ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PYTHON" />
</Exec>
- <PropertyGroup>
- <PYTHON>"$(PYTHON)"</PYTHON>
- </PropertyGroup>
</Target>
- <Target Name="FindPythonUnix"
+ <Target Name="_FindPythonUnix"
Condition="!$([MSBuild]::IsOSPlatform(Windows)) and '$(PYTHON)' == ''"
Returns="$(PYTHON)">
<Exec Command="command -v python3 || command -v python || command -v py"
StandardOutputImportance="Low"
EchoOff="true"
+ ContinueOnError="ErrorAndContinue"
ConsoleToMsBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PYTHON" />
</Exec>
- <PropertyGroup>
- <PYTHON>"$(PYTHON)"</PYTHON>
- </PropertyGroup>
</Target>
- <Target Name="FindPython" DependsOnTargets="FindPythonWindows;FindPythonUnix" />
+ <Target Name="FindPython" DependsOnTargets="_FindPythonWindows;_FindPythonUnix">
+ <Error Condition="'$(PYTHON)' == ''"
+ Text="Python not found. Please add Python 3 to your path and try again."/>
+ </Target>
</Project>
</PropertyGroup>
- <Exec Command="$(PYTHON) -B $(_PythonWarningParameter) "@(EventingGenerationScript)" --man "@(EventManifestFile)" --intermediate "$(_EventingSourceFileDirectory)"" />
+ <Exec Command=""$(PYTHON)" -B $(_PythonWarningParameter) "@(EventingGenerationScript)" --man "@(EventManifestFile)" --intermediate "$(_EventingSourceFileDirectory)"" />
<ItemGroup>
<FileWrites Include="@(EventingSourceFile)" />
<_EventingSourceFileDirectory Condition="HasTrailingSlash('$(_EventingSourceFileDirectory)')">$(_EventingSourceFileDirectory.TrimEnd('\'))</_EventingSourceFileDirectory>
</PropertyGroup>
- <Exec Command="$(PYTHON) -B $(_PythonWarningParameter) "@(EventingGenerationScript)" --man "@(EventManifestFile)" --intermediate "$(_EventingSourceFileDirectory)" --runtimeflavor mono" />
+ <Exec Command=""$(PYTHON)" -B $(_PythonWarningParameter) "@(EventingGenerationScript)" --man "@(EventManifestFile)" --intermediate "$(_EventingSourceFileDirectory)" --runtimeflavor mono" />
<ItemGroup>
<FileWrites Include="@(EventingSourceFile)" />