diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-06-19 17:34:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 17:34:25 (GMT) |
commit | 40a23e88994aca92c83c8e84ab8b8cdc11d7ec54 (patch) | |
tree | 5a04457af0c0d4be563bf1c153059564bc19c516 /PC/bdist_wininst | |
parent | eb81795d7d3a8c898fa89a376d63fc3bbfb9a081 (diff) | |
download | cpython-40a23e88994aca92c83c8e84ab8b8cdc11d7ec54.zip cpython-40a23e88994aca92c83c8e84ab8b8cdc11d7ec54.tar.gz cpython-40a23e88994aca92c83c8e84ab8b8cdc11d7ec54.tar.bz2 |
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.
Diffstat (limited to 'PC/bdist_wininst')
-rw-r--r-- | PC/bdist_wininst/bdist_wininst.vcxproj | 4 | ||||
-rw-r--r-- | PC/bdist_wininst/build.bat | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/PC/bdist_wininst/bdist_wininst.vcxproj b/PC/bdist_wininst/bdist_wininst.vcxproj index 4dc5009..9bbfda2 100644 --- a/PC/bdist_wininst/bdist_wininst.vcxproj +++ b/PC/bdist_wininst/bdist_wininst.vcxproj @@ -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> diff --git a/PC/bdist_wininst/build.bat b/PC/bdist_wininst/build.bat index ee68567..d5cf752 100644 --- a/PC/bdist_wininst/build.bat +++ b/PC/bdist_wininst/build.bat @@ -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 |