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

Skip to content

Commit a16bb0c

Browse files
author
Thomas Heller
committed
Added VC project files to build _ctypes.pyd and _ctypes_test.pyd on Windows.
Settings for 64-bit Windows are missing. I've left in the 64-bit warnings to remind me to port ctypes to Py_ssize_t.
1 parent d0fcc02 commit a16bb0c

3 files changed

Lines changed: 307 additions & 0 deletions

File tree

PCbuild/_ctypes.vcproj

Lines changed: 153 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,153 @@
1+
<?xml version="1.0" encoding="Windows-1252"?>
2+
<VisualStudioProject
3+
ProjectType="Visual C++"
4+
Version="7.10"
5+
Name="_ctypes"
6+
ProjectGUID="{F22F40F4-D318-40DC-96B3-88DC81CE0894}"
7+
Keyword="Win32Proj">
8+
<Platforms>
9+
<Platform
10+
Name="Win32"/>
11+
</Platforms>
12+
<Configurations>
13+
<Configuration
14+
Name="Debug|Win32"
15+
OutputDirectory=".\."
16+
IntermediateDirectory=".\x86-temp-debug\_ctypes"
17+
ConfigurationType="2"
18+
CharacterSet="2">
19+
<Tool
20+
Name="VCCLCompilerTool"
21+
Optimization="0"
22+
AdditionalIncludeDirectories="..\Include,..\PC,..\Modules\_ctypes\libffi_msvc"
23+
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
24+
MinimalRebuild="FALSE"
25+
BasicRuntimeChecks="3"
26+
RuntimeLibrary="3"
27+
UsePrecompiledHeader="0"
28+
WarningLevel="3"
29+
Detect64BitPortabilityProblems="TRUE"
30+
DebugInformationFormat="3"
31+
CompileAs="0"/>
32+
<Tool
33+
Name="VCCustomBuildTool"/>
34+
<Tool
35+
Name="VCLinkerTool"
36+
OutputFile="./_ctypes_d.pyd"
37+
LinkIncremental="1"
38+
SuppressStartupBanner="TRUE"
39+
GenerateDebugInformation="TRUE"
40+
ProgramDatabaseFile=".\./_ctypes_d.pdb"
41+
SubSystem="0"
42+
ImportLibrary=".\./_ctypes_d.lib"
43+
TargetMachine="1"/>
44+
<Tool
45+
Name="VCMIDLTool"/>
46+
<Tool
47+
Name="VCPostBuildEventTool"/>
48+
<Tool
49+
Name="VCPreBuildEventTool"/>
50+
<Tool
51+
Name="VCPreLinkEventTool"/>
52+
<Tool
53+
Name="VCResourceCompilerTool"/>
54+
<Tool
55+
Name="VCWebServiceProxyGeneratorTool"/>
56+
<Tool
57+
Name="VCXMLDataGeneratorTool"/>
58+
<Tool
59+
Name="VCWebDeploymentTool"/>
60+
<Tool
61+
Name="VCManagedWrapperGeneratorTool"/>
62+
<Tool
63+
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
64+
</Configuration>
65+
<Configuration
66+
Name="Release|Win32"
67+
OutputDirectory=".\."
68+
IntermediateDirectory=".\x86-temp-release\_ctypes"
69+
ConfigurationType="2"
70+
CharacterSet="2">
71+
<Tool
72+
Name="VCCLCompilerTool"
73+
InlineFunctionExpansion="1"
74+
AdditionalIncludeDirectories="..\Include,..\PC,..\Modules\_ctypes\libffi_msvc"
75+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
76+
StringPooling="TRUE"
77+
RuntimeLibrary="2"
78+
EnableFunctionLevelLinking="TRUE"
79+
UsePrecompiledHeader="0"
80+
WarningLevel="3"
81+
Detect64BitPortabilityProblems="TRUE"
82+
DebugInformationFormat="0"
83+
CompileAs="0"/>
84+
<Tool
85+
Name="VCCustomBuildTool"/>
86+
<Tool
87+
Name="VCLinkerTool"
88+
OutputFile="./_ctypes.pyd"
89+
LinkIncremental="1"
90+
SuppressStartupBanner="TRUE"
91+
GenerateDebugInformation="FALSE"
92+
ProgramDatabaseFile=".\./_ctypes.pdb"
93+
SubSystem="0"
94+
OptimizeReferences="0"
95+
EnableCOMDATFolding="0"
96+
ImportLibrary=".\./_ctypes.lib"
97+
TargetMachine="1"/>
98+
<Tool
99+
Name="VCMIDLTool"/>
100+
<Tool
101+
Name="VCPostBuildEventTool"/>
102+
<Tool
103+
Name="VCPreBuildEventTool"/>
104+
<Tool
105+
Name="VCPreLinkEventTool"/>
106+
<Tool
107+
Name="VCResourceCompilerTool"/>
108+
<Tool
109+
Name="VCWebServiceProxyGeneratorTool"/>
110+
<Tool
111+
Name="VCXMLDataGeneratorTool"/>
112+
<Tool
113+
Name="VCWebDeploymentTool"/>
114+
<Tool
115+
Name="VCManagedWrapperGeneratorTool"/>
116+
<Tool
117+
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
118+
</Configuration>
119+
</Configurations>
120+
<References>
121+
</References>
122+
<Files>
123+
<File
124+
RelativePath="..\Modules\_ctypes\_ctypes.c">
125+
</File>
126+
<File
127+
RelativePath="..\Modules\_ctypes\callbacks.c">
128+
</File>
129+
<File
130+
RelativePath="..\Modules\_ctypes\callproc.c">
131+
</File>
132+
<File
133+
RelativePath="..\Modules\_ctypes\cfield.c">
134+
</File>
135+
<File
136+
RelativePath="..\Modules\_ctypes\libffi_msvc\ffi.c">
137+
</File>
138+
<File
139+
RelativePath="..\Modules\_ctypes\malloc_closure.c">
140+
</File>
141+
<File
142+
RelativePath="..\Modules\_ctypes\libffi_msvc\prep_cif.c">
143+
</File>
144+
<File
145+
RelativePath="..\Modules\_ctypes\stgdict.c">
146+
</File>
147+
<File
148+
RelativePath="..\Modules\_ctypes\libffi_msvc\win32.c">
149+
</File>
150+
</Files>
151+
<Globals>
152+
</Globals>
153+
</VisualStudioProject>

PCbuild/_ctypes_test.vcproj

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
<?xml version="1.0" encoding="Windows-1252"?>
2+
<VisualStudioProject
3+
ProjectType="Visual C++"
4+
Version="7.10"
5+
Name="_ctypes_test"
6+
ProjectGUID="{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}"
7+
Keyword="Win32Proj">
8+
<Platforms>
9+
<Platform
10+
Name="Win32"/>
11+
</Platforms>
12+
<Configurations>
13+
<Configuration
14+
Name="Debug|Win32"
15+
OutputDirectory=".\."
16+
IntermediateDirectory=".\x86-temp-debug\_ctypes_test"
17+
ConfigurationType="2"
18+
CharacterSet="2">
19+
<Tool
20+
Name="VCCLCompilerTool"
21+
Optimization="0"
22+
AdditionalIncludeDirectories="..\Include,..\PC"
23+
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
24+
MinimalRebuild="FALSE"
25+
BasicRuntimeChecks="3"
26+
RuntimeLibrary="3"
27+
UsePrecompiledHeader="0"
28+
WarningLevel="3"
29+
Detect64BitPortabilityProblems="TRUE"
30+
DebugInformationFormat="3"
31+
CompileAs="0"/>
32+
<Tool
33+
Name="VCCustomBuildTool"/>
34+
<Tool
35+
Name="VCLinkerTool"
36+
OutputFile="./_ctypes_test_d.pyd"
37+
LinkIncremental="1"
38+
SuppressStartupBanner="TRUE"
39+
GenerateDebugInformation="TRUE"
40+
ProgramDatabaseFile=".\./_ctypes_test_d.pdb"
41+
SubSystem="0"
42+
ImportLibrary=".\./_ctypes_test_d.lib"
43+
TargetMachine="1"/>
44+
<Tool
45+
Name="VCMIDLTool"/>
46+
<Tool
47+
Name="VCPostBuildEventTool"/>
48+
<Tool
49+
Name="VCPreBuildEventTool"/>
50+
<Tool
51+
Name="VCPreLinkEventTool"/>
52+
<Tool
53+
Name="VCResourceCompilerTool"/>
54+
<Tool
55+
Name="VCWebServiceProxyGeneratorTool"/>
56+
<Tool
57+
Name="VCXMLDataGeneratorTool"/>
58+
<Tool
59+
Name="VCWebDeploymentTool"/>
60+
<Tool
61+
Name="VCManagedWrapperGeneratorTool"/>
62+
<Tool
63+
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
64+
</Configuration>
65+
<Configuration
66+
Name="Release|Win32"
67+
OutputDirectory=".\."
68+
IntermediateDirectory=".\x86-temp-release\_ctypes_test"
69+
ConfigurationType="2"
70+
CharacterSet="2">
71+
<Tool
72+
Name="VCCLCompilerTool"
73+
InlineFunctionExpansion="1"
74+
AdditionalIncludeDirectories="..\Include,..\PC"
75+
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
76+
StringPooling="TRUE"
77+
RuntimeLibrary="2"
78+
EnableFunctionLevelLinking="TRUE"
79+
UsePrecompiledHeader="0"
80+
WarningLevel="3"
81+
Detect64BitPortabilityProblems="TRUE"
82+
DebugInformationFormat="0"
83+
CompileAs="0"/>
84+
<Tool
85+
Name="VCCustomBuildTool"/>
86+
<Tool
87+
Name="VCLinkerTool"
88+
OutputFile="./_ctypes_test.pyd"
89+
LinkIncremental="1"
90+
SuppressStartupBanner="TRUE"
91+
GenerateDebugInformation="FALSE"
92+
ProgramDatabaseFile=".\./_ctypes_test.pdb"
93+
SubSystem="0"
94+
OptimizeReferences="0"
95+
EnableCOMDATFolding="0"
96+
ImportLibrary=".\./_ctypes_test.lib"
97+
TargetMachine="1"/>
98+
<Tool
99+
Name="VCMIDLTool"/>
100+
<Tool
101+
Name="VCPostBuildEventTool"/>
102+
<Tool
103+
Name="VCPreBuildEventTool"/>
104+
<Tool
105+
Name="VCPreLinkEventTool"/>
106+
<Tool
107+
Name="VCResourceCompilerTool"/>
108+
<Tool
109+
Name="VCWebServiceProxyGeneratorTool"/>
110+
<Tool
111+
Name="VCXMLDataGeneratorTool"/>
112+
<Tool
113+
Name="VCWebDeploymentTool"/>
114+
<Tool
115+
Name="VCManagedWrapperGeneratorTool"/>
116+
<Tool
117+
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
118+
</Configuration>
119+
</Configurations>
120+
<References>
121+
</References>
122+
<Files>
123+
<File
124+
RelativePath="..\Modules\_ctypes\_ctypes_test.c">
125+
</File>
126+
</Files>
127+
<Globals>
128+
</Globals>
129+
</VisualStudioProject>

PCbuild/pcbuild.sln

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_msi", "_msi.vcproj", "{2C0
8989
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
9090
EndProjectSection
9191
EndProject
92+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes", "_ctypes.vcproj", "{F22F40F4-D318-40DC-96B3-88DC81CE0894}"
93+
ProjectSection(ProjectDependencies) = postProject
94+
{CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26} = {CF7AC3D1-E2DF-41D2-BEA6-1E2556CDEA26}
95+
EndProjectSection
96+
EndProject
97+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "_ctypes_test", "_ctypes_test.vcproj", "{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}"
98+
ProjectSection(ProjectDependencies) = postProject
99+
EndProjectSection
100+
EndProject
92101
Global
93102
GlobalSection(SolutionConfiguration) = preSolution
94103
Debug = Debug
@@ -239,6 +248,22 @@ Global
239248
{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseAMD64.Build.0 = ReleaseAMD64|Win32
240249
{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.ActiveCfg = ReleaseItanium|Win32
241250
{2C0BEFB9-70E2-4F80-AC5B-4AB8EE023574}.ReleaseItanium.Build.0 = ReleaseItanium|Win32
251+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.ActiveCfg = Debug|Win32
252+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.Debug.Build.0 = Debug|Win32
253+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.ActiveCfg = Release|Win32
254+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.Release.Build.0 = Release|Win32
255+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64.ActiveCfg = Release|Win32
256+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseAMD64.Build.0 = Release|Win32
257+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium.ActiveCfg = Release|Win32
258+
{F22F40F4-D318-40DC-96B3-88DC81CE0894}.ReleaseItanium.Build.0 = Release|Win32
259+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.ActiveCfg = Debug|Win32
260+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Debug.Build.0 = Debug|Win32
261+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.ActiveCfg = Release|Win32
262+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.Release.Build.0 = Release|Win32
263+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64.ActiveCfg = Release|Win32
264+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseAMD64.Build.0 = Release|Win32
265+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium.ActiveCfg = Release|Win32
266+
{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}.ReleaseItanium.Build.0 = Release|Win32
242267
EndGlobalSection
243268
GlobalSection(SolutionItems) = postSolution
244269
..\Modules\getbuildinfo.c = ..\Modules\getbuildinfo.c

0 commit comments

Comments
 (0)