Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
2587952f
Commit
2587952f
authored
Jan 15, 2015
by
Steve Dower
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes sys.winver generation and removes dependency on user32.dll
parent
a39eb0f4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
6 deletions
+20
-6
PC/dl_nt.c
PC/dl_nt.c
+8
-0
PCbuild/pyproject.props
PCbuild/pyproject.props
+1
-1
PCbuild/python.props
PCbuild/python.props
+6
-2
PCbuild/pythoncore.vcxproj
PCbuild/pythoncore.vcxproj
+5
-3
No files found.
PC/dl_nt.c
View file @
2587952f
...
...
@@ -12,7 +12,12 @@ forgotten) from the programmer.
#include "windows.h"
#ifdef Py_ENABLE_SHARED
#ifdef MS_DLL_ID
// The string is available at build, so fill the buffer immediately
char
dllVersionBuffer
[
16
]
=
MS_DLL_ID
;
#else
char
dllVersionBuffer
[
16
]
=
""
;
// a private buffer
#endif
// Python Globals
HMODULE
PyWin_DLLhModule
=
NULL
;
...
...
@@ -88,8 +93,11 @@ BOOL WINAPI DllMain (HANDLE hInst,
{
case
DLL_PROCESS_ATTACH
:
PyWin_DLLhModule
=
hInst
;
#ifndef MS_DLL_ID
// If we have MS_DLL_ID, we don't need to load the string.
// 1000 is a magic number I picked out of the air. Could do with a #define, I spose...
LoadString
(
hInst
,
1000
,
dllVersionBuffer
,
sizeof
(
dllVersionBuffer
));
#endif
#if HAVE_SXS
// and capture our activation context for use when loading extensions.
...
...
PCbuild/pyproject.props
View file @
2587952f
...
...
@@ -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>
...
...
PCbuild/python.props
View file @
2587952f
<?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 -->
...
...
PCbuild/pythoncore.vcxproj
View file @
2587952f
...
...
@@ -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"
/>
...
...
@@ -386,6 +385,9 @@
<ClCompile
Include=
"..\Python\thread.c"
/>
<ClCompile
Include=
"..\Python\traceback.c"
/>
</ItemGroup>
<ItemGroup>
<ClCompile
Include=
"..\PC\dl_nt.c"
/>
</ItemGroup>
<ItemGroup>
<ResourceCompile
Include=
"..\PC\python_nt.rc"
/>
</ItemGroup>
...
...
@@ -393,7 +395,7 @@
<ImportGroup
Label=
"ExtensionTargets"
>
</ImportGroup>
<Target
Name=
"_GetBuildInfo"
After
Targets=
"PrepareForBuild"
>
<Target
Name=
"_GetBuildInfo"
Before
Targets=
"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"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment