diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-01-15 17:10:16 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-01-15 17:10:16 (GMT) |
commit | 2587952f2fc4abb3adf6a838bf8a1fc3997c81be (patch) | |
tree | 4c3004cb2dc2e833993cc1aa421fbd92e0d5b332 /PCbuild | |
parent | a39eb0f42b8926aad10fe4f11371f0ec219da276 (diff) | |
download | cpython-2587952f2fc4abb3adf6a838bf8a1fc3997c81be.zip cpython-2587952f2fc4abb3adf6a838bf8a1fc3997c81be.tar.gz cpython-2587952f2fc4abb3adf6a838bf8a1fc3997c81be.tar.bz2 |
Fixes sys.winver generation and removes dependency on user32.dll
Diffstat (limited to 'PCbuild')
-rw-r--r-- | PCbuild/pyproject.props | 2 | ||||
-rw-r--r-- | PCbuild/python.props | 8 | ||||
-rw-r--r-- | PCbuild/pythoncore.vcxproj | 8 |
3 files changed, 12 insertions, 6 deletions
diff --git a/PCbuild/pyproject.props b/PCbuild/pyproject.props index 85aebeb..33570d7 100644 --- a/PCbuild/pyproject.props +++ b/PCbuild/pyproject.props @@ -87,7 +87,7 @@ <WriteLinesToFile File="$(PySourcePath)PC\pythonnt_rc$(PyDebugExt).h" Overwrite="true" Encoding="ascii" Lines='/* This file created by python.props /t:GeneratePythonNtRcH */ #define FIELD3 $(Field3Value) -#define MS_DLL_ID "$(PythonMajorVersion).$(PythonMinorVersion)" +#define MS_DLL_ID "$(SysWinVer)" #define PYTHON_DLL_NAME "$(PyDllName).dll" ' /> <ItemGroup> diff --git a/PCbuild/python.props b/PCbuild/python.props index 99eebf0..788df56 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> -<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="Platform"> <PropertyGroup> - <Platform Condition="'$(Platform)' == ''">Win32</Platform> + <Platform Condition="'$(Platform)' == '' or '$(Platform)' == 'x86'">Win32</Platform> <Configuration Condition="'$(Configuration)' == ''">Release</Configuration> <!-- Use the latest available version of Visual Studio to build. To override @@ -100,6 +100,10 @@ <!-- The version and platform tag to include in .pyd filenames --> <PydTag Condition="$(Platform) == 'Win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag> <PydTag Condition="$(Platform) == 'x64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag> + + <!-- The version number for sys.winver --> + <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)</SysWinVer> + <SysWinVer Condition="$(Platform) == 'Win32'">$(SysWinVer)-32</SysWinVer> </PropertyGroup> <!-- Displays the calculated version info --> diff --git a/PCbuild/pythoncore.vcxproj b/PCbuild/pythoncore.vcxproj index 4ecfd10..479f68d 100644 --- a/PCbuild/pythoncore.vcxproj +++ b/PCbuild/pythoncore.vcxproj @@ -67,7 +67,7 @@ <ClCompile> <AdditionalOptions>/Zm200 %(AdditionalOptions)</AdditionalOptions> <AdditionalIncludeDirectories>$(PySourcePath)Python;$(PySourcePath)Modules\zlib;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;%(PreprocessorDefinitions)</PreprocessorDefinitions> + <PreprocessorDefinitions>_USRDLL;Py_BUILD_CORE;Py_ENABLE_SHARED;MS_DLL_ID="$(SysWinVer)";%(PreprocessorDefinitions)</PreprocessorDefinitions> </ClCompile> <Link> <AdditionalDependencies>ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies> @@ -335,7 +335,6 @@ <ClCompile Include="..\Parser\tokenizer.c" /> <ClCompile Include="..\PC\winreg.c" /> <ClCompile Include="..\PC\config.c" /> - <ClCompile Include="..\PC\dl_nt.c" /> <ClCompile Include="..\PC\getpathp.c" /> <ClCompile Include="..\PC\msvcrtmodule.c" /> <ClCompile Include="..\Python\pyhash.c" /> @@ -387,13 +386,16 @@ <ClCompile Include="..\Python\traceback.c" /> </ItemGroup> <ItemGroup> + <ClCompile Include="..\PC\dl_nt.c" /> + </ItemGroup> + <ItemGroup> <ResourceCompile Include="..\PC\python_nt.rc" /> </ItemGroup> <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> <ImportGroup Label="ExtensionTargets"> </ImportGroup> - <Target Name="_GetBuildInfo" AfterTargets="PrepareForBuild"> + <Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild"> <Exec Command='hg id -b > "$(IntDir)hgbranch.txt"' ContinueOnError="true" /> <Exec Command='hg id -i > "$(IntDir)hgversion.txt"' ContinueOnError="true" /> <Exec Command='hg id -t > "$(IntDir)hgtag.txt"' ContinueOnError="true" /> |