Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
env.bat now support VS2017+ (2015 is min ver)
NOTE: remove find VS2015 earlier bacause not support
  • Loading branch information
Wulian233 authored Sep 16, 2024
commit 6c54282e45a2da5e2677e370b1ef19c5221d4b4b
10 changes: 5 additions & 5 deletions PCbuild/env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ rem command window. However, most builds of Python will ignore the version
rem of the tools on PATH and use PlatformToolset instead. Ideally, both sets of
rem tools should be the same version to avoid potential conflicts.
rem
rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v100" (or
rem 'v110', 'v120' or 'v140') to the build script.
rem To build Python with an earlier toolset, pass "/p:PlatformToolset=v140" (or
rem 'v142', 'v141') to the build script.

echo Build environments: x86, amd64, x86_amd64
echo.
Expand All @@ -20,8 +20,8 @@ call "%VSTOOLS%" %_ARGS%
exit /B 0

:skip_vswhere
if not defined VSTOOLS set VSTOOLS=%VS143COMNTOOLS%
if not defined VSTOOLS set VSTOOLS=%VS142COMNTOOLS%
if not defined VSTOOLS set VSTOOLS=%VS141COMNTOOLS%
if not defined VSTOOLS set VSTOOLS=%VS140COMNTOOLS%
if not defined VSTOOLS set VSTOOLS=%VS120COMNTOOLS%
if not defined VSTOOLS set VSTOOLS=%VS110COMNTOOLS%
if not defined VSTOOLS set VSTOOLS=%VS100COMNTOOLS%
call "%VSTOOLS%..\..\VC\vcvarsall.bat" %_ARGS%
10 changes: 0 additions & 10 deletions PCbuild/find_msbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,6 @@
@if defined MSBUILD @if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio installation) & goto :found
:skip_vswhere

@rem VS 2015 and earlier register MSBuild separately, so we can find it.
@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32 >nul 2>nul
@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32') DO @(
@if "%%i"=="MSBuildToolsPath" @if exist "%%k\msbuild.exe" @(set MSBUILD="%%k\msbuild.exe")
)
@if exist %MSBUILD% (set _Py_MSBuild_Source=registry) & goto :found


@exit /b 1

:found
@pushd %MSBUILD% >nul 2>nul
@if not ERRORLEVEL 1 @(
Expand Down
3 changes: 0 additions & 3 deletions PCbuild/python.props
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '16.0'">v142</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' == '15.0')">v141</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''">v110</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath10)' != ''">v100</BasePlatformToolset>

<PlatformToolset Condition="'$(PlatformToolset)' == ''">$(BasePlatformToolset)</PlatformToolset>
<ICCBuild>false</ICCBuild>
Expand Down
3 changes: 0 additions & 3 deletions PCbuild/tcltk.props
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,6 @@
<BuildDirTop Condition="$(Configuration) == 'Debug'">Debug</BuildDirTop>
<BuildDirTop Condition="$(TclMachine) != 'IX86'">$(BuildDirTop)_$(TclMachine)</BuildDirTop>
<BuildDirTop Condition="$(PlatformToolset.StartsWith('v14'))">$(BuildDirTop)_VC13</BuildDirTop>
<BuildDirTop Condition="$(PlatformToolset) == 'v120'">$(BuildDirTop)_VC12</BuildDirTop>
<BuildDirTop Condition="$(PlatformToolset) == 'v110'">$(BuildDirTop)_VC11</BuildDirTop>
<BuildDirTop Condition="$(PlatformToolset) == 'v100'">$(BuildDirTop)_VC10</BuildDirTop>
</PropertyGroup>

<!--
Expand Down
1 change: 0 additions & 1 deletion Tools/msi/bundle/bootstrap/pythonba.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
<AdditionalDependencies>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib;dutil.lib;balutil.lib;version.lib;uxtheme.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories Condition="$(PlatformToolset.StartsWith(`v14`))">$(WixInstallPath)sdk\vs2017\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v140'">$(WixInstallPath)sdk\vs2015\lib\x86</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(PlatformToolset)' == 'v120'">$(WixInstallPath)sdk\vs2013\lib\x86</AdditionalLibraryDirectories>
<ModuleDefinitionFile>pythonba.def</ModuleDefinitionFile>
<GenerateDebugInformation Condition="'$(Configuration)'=='Debug'">true</GenerateDebugInformation>
</Link>
Expand Down