mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-30687: Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat (#2252)
* Fixes build scripts to find msbuild.exe and stop relying on vcvarsall.bat Also fixes bdist_wininst.vcxproj to use correct version in generated name.
This commit is contained in:
parent
eb81795d7d
commit
40a23e8899
10 changed files with 102 additions and 51 deletions
|
@ -58,6 +58,10 @@
|
|||
<OutDir>$(PySourcePath)lib\distutils\command\</OutDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
<TargetName>wininst-$(VisualStudioVersion)</TargetName>
|
||||
<TargetName Condition="$(PlatformToolset) == 'v140'">wininst-14.0</TargetName>
|
||||
<TargetName Condition="$(PlatformToolset) == 'v120'">wininst-12.0</TargetName>
|
||||
<TargetName Condition="$(PlatformToolset) == 'v110'">wininst-11.0</TargetName>
|
||||
<TargetName Condition="$(PlatformToolset) == 'v100'">wininst-10.0</TargetName>
|
||||
<TargetName Condition="$(Platform) == 'x64'">$(TargetName)-amd64</TargetName>
|
||||
<TargetExt>.exe</TargetExt>
|
||||
</PropertyGroup>
|
||||
|
|
|
@ -7,16 +7,13 @@ set PCBUILD=%~dp0..\..\PCBuild\
|
|||
|
||||
echo Building Lib\distutils\command\wininst-xx.0.exe
|
||||
|
||||
call "%PCBUILD%env.bat" x86
|
||||
if errorlevel 1 goto :eof
|
||||
call "%PCBUILD%find_msbuild.bat" %MSBUILD%
|
||||
if ERRORLEVEL 1 (echo Cannot locate MSBuild.exe on PATH or as MSBUILD variable & exit /b 2)
|
||||
|
||||
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
|
||||
%MSBUILD% "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=Win32
|
||||
if errorlevel 1 goto :eof
|
||||
|
||||
|
||||
echo Building Lib\distutils\command\wininst-xx.0-amd64.exe
|
||||
|
||||
call "%PCBUILD%env.bat" x86_amd64
|
||||
if errorlevel 1 goto :eof
|
||||
|
||||
msbuild "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
|
||||
%MSBUILD% "%D%bdist_wininst.vcxproj" "/p:SolutionDir=%PCBUILD%\" /p:Configuration=Release /p:Platform=x64
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue