Complete revamp of PCBuild8 directory. Use subdirectories for each project...

Complete revamp of PCBuild8 directory.  Use subdirectories for each project under the main pcbuild solution.  Now make extensive use of property sheets to simplify project configuration. x64 build fully supported, and the process for building PGO version (Profiler Guided Optimization) simplified. All projects are now present, except _ssl, which needs to be reimplemented.  Also, some of the projects that require external libraries need extra work to fully compile on x64.
parent 714e19a7
......@@ -13,7 +13,9 @@
/* Differentiate between building the core module and building extension
* modules.
*/
#ifndef Py_BUILD_CORE
#define Py_BUILD_CORE
#endif
#include "datetime.h"
#undef Py_BUILD_CORE
......
......@@ -20,10 +20,7 @@
#endif
#endif
#ifdef SUBWCREV
#define SVNVERSION "$WCRANGE$$WCMODS?M:$"
#endif
const char *
Py_GetBuildInfo(void)
{
......@@ -40,9 +37,9 @@ Py_GetBuildInfo(void)
const char *
_Py_svnversion(void)
{
#ifdef SVNVERSION
return SVNVERSION;
#else
/* the following string can be modified by subwcrev.exe */
static const char svnversion[] = SVNVERSION;
if (!strstr(svnversion, "$"))
return svnversion; /* it was interpolated */
return "exported";
#endif
}
......@@ -27,7 +27,12 @@ int main(int argc, char **argv)
PY_MICRO_VERSION*1000 + PY_RELEASE_LEVEL*10 + PY_RELEASE_SERIAL);
printf("#define MS_DLL_ID \"%d.%d\"\n",
PY_MAJOR_VERSION, PY_MINOR_VERSION);
printf("#ifndef _DEBUG\n");
printf("#define PYTHON_DLL_NAME \"python%d%d.dll\"\n",
PY_MAJOR_VERSION, PY_MINOR_VERSION);
printf("#else\n");
printf("#define PYTHON_DLL_NAME \"python%d%d_d.dll\"\n",
PY_MAJOR_VERSION, PY_MINOR_VERSION);
printf("#endif\n");
return 0;
}
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="PGInstrument"
OutputDirectory="$(SolutionDir)$(PlatformName)PGO"
IntermediateDirectory="$(PlatformName)PGO"
>
<Tool
Name="VCLinkerTool"
LinkTimeCodeGeneration="2"
/>
</VisualStudioPropertySheet>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="PGUpdate"
InheritedPropertySheets=".\PGInstrument.vsprops"
>
<Tool
Name="VCLinkerTool"
LinkTimeCodeGeneration="4"
/>
</VisualStudioPropertySheet>
This diff is collapsed.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8.00"
Name="_bsddb"
ProjectGUID="{E1DBB220-D64B-423D-A545-539A55AA7FE2}"
SccProjectName="_bsddb"
SccLocalPath=".."
SccProvider="MSSCCI:Perforce SCM"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\."
IntermediateDirectory=".\x86-temp-debug\_bsddb"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Include;..\PC;&quot;..\..\db-4.4.20\build_win32&quot;"
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\db-4.4.20\build_win32\Debug\libdb44sd.lib"
OutputFile="./_bsddb_d.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile=".\./_bsddb_d.pdb"
SubSystem="2"
BaseAddress="0x1e180000"
ImportLibrary=".\./_bsddb_d.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory=".\."
IntermediateDirectory=".\x86-temp-release\_bsddb"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Include;..\PC;&quot;..\..\db-4.4.20\build_win32&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalDependencies="..\..\db-4.4.20\build_win32\Release\libdb44s.lib"
OutputFile="./_bsddb.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile=".\./_bsddb.pdb"
SubSystem="2"
BaseAddress="0x1e180000"
ImportLibrary=".\./_bsddb.lib"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="ReleaseItanium|Win32"
OutputDirectory="./."
IntermediateDirectory=".\ia64-temp-release\_bsddb"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions=" /USECL:MS_ITANIUM"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Include;..\PC;&quot;..\..\db-4.4.20\build_win32&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS"
StringPooling="true"
BasicRuntimeChecks="0"
RuntimeLibrary="2"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions=" /MACHINE:IA64 /USELINK:MS_SDK"
AdditionalDependencies="..\..\db-4.4.20\build_win32\Release_IA64\libdb44s.lib"
OutputFile="./_bsddb.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile=".\./_bsddb.pdb"
SubSystem="2"
BaseAddress="0x1e180000"
ImportLibrary=".\./_bsddb.lib"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="ReleaseAMD64|Win32"
OutputDirectory="."
IntermediateDirectory="amd64-temp-release\_bsddb"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalOptions=" /USECL:MS_OPTERON /GS-"
Optimization="2"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Include;..\PC;&quot;..\..\db-4.4.20\build_win32&quot;"
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS"
StringPooling="true"
BasicRuntimeChecks="0"
RuntimeLibrary="2"
BufferSecurityCheck="false"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
SuppressStartupBanner="true"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
AdditionalOptions=" /MACHINE:AMD64 /USELINK:MS_SDK"
AdditionalDependencies="..\..\db-4.4.20\build_win32\Release_AMD64\libdb44s.lib"
OutputFile="./_bsddb.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
IgnoreDefaultLibraryNames=""
GenerateDebugInformation="true"
ProgramDatabaseFile=".\./_bsddb.pdb"
SubSystem="2"
BaseAddress="0x1e180000"
ImportLibrary=".\./_bsddb.lib"
TargetMachine="0"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Modules\_bsddb.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="_ctypes_test"
ProjectGUID="{8CF334D9-4F82-42EB-97AF-83592C5AFD2F}"
RootNamespace="_ctypes_test"
Keyword="Win32Proj"
>
<Platforms>
<Platform
Name="Win32"
/>
<Platform
Name="x64"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(PlatformName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\_ctypes_test"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Include,..\PC"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\_ctypes_test_d.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
ProgramDatabaseFile=""
SubSystem="0"
ImportLibrary=""
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|x64"
OutputDirectory="$(PlatformName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\_ctypes_test"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories="..\Include,..\PC"
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
MinimalRebuild="false"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)/_ctypes_test_d.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
ProgramDatabaseFile=""
SubSystem="0"
ImportLibrary=""
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(PlatformName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\_ctypes_test"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Include,..\PC"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="0"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\_ctypes_test.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
ProgramDatabaseFile=""
SubSystem="0"
OptimizeReferences="0"
EnableCOMDATFolding="0"
ImportLibrary=""
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|x64"
OutputDirectory="$(PlatformName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\_ctypes_test"
ConfigurationType="2"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
TargetEnvironment="3"
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\Include,..\PC"
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
StringPooling="true"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
Detect64BitPortabilityProblems="true"
DebugInformationFormat="0"
CompileAs="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\_ctypes_test.pyd"
LinkIncremental="1"
SuppressStartupBanner="true"
AdditionalLibraryDirectories="$(OutDir)"
GenerateDebugInformation="true"
ProgramDatabaseFile=""
SubSystem="0"
OptimizeReferences="0"
EnableCOMDATFolding="0"
ImportLibrary=""
TargetMachine="17"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCWebDeploymentTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Modules\_ctypes\_ctypes_test.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
!IFDEF DEBUG
MODULE=_ssl_d.pyd
TEMP_DIR=x86-temp-debug/_ssl
CFLAGS=/Od /Zi /MDd /LDd /DDEBUG /D_DEBUG /DWIN32
SSL_LIB_DIR=$(SSL_DIR)/out32.dbg
!ELSE
MODULE=_ssl.pyd
TEMP_DIR=x86-temp-release/_ssl
CFLAGS=/Ox /MD /LD /DWIN32
SSL_LIB_DIR=$(SSL_DIR)/out32
!ENDIF
INCLUDES=-I ../Include -I ../PC -I $(SSL_DIR)/inc32
LIBS=gdi32.lib wsock32.lib user32.lib advapi32.lib /libpath:$(SSL_LIB_DIR) libeay32.lib ssleay32.lib
SOURCE=../Modules/_ssl.c $(SSL_LIB_DIR)/libeay32.lib $(SSL_LIB_DIR)/ssleay32.lib
$(MODULE): $(SOURCE) ../PC/*.h ../Include/*.h
@if not exist "$(TEMP_DIR)/." mkdir "$(TEMP_DIR)"
cl /nologo $(SOURCE) $(CFLAGS) /Fo$(TEMP_DIR)\$*.obj $(INCLUDES) /link /out:$(MODULE) $(LIBS)
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="8,00"
Name="_ssl"
ProjectGUID="{8E85BA54-8A47-4C8B-B72E-8E17579CC6D7}"
RootNamespace="_ssl"
Keyword="MakeFileProj"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
OutputDirectory=".\."
IntermediateDirectory=".\x86-temp-release\_ssl"
ConfigurationType="0"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="python build_ssl.py"
ReBuildCommandLine="python build_ssl.py -a"
CleanCommandLine="echo Nothing to do"
Output="_ssl.pyd"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="Debug|Win32"
OutputDirectory=".\."
IntermediateDirectory=".\x86-temp-debug\_ssl"
ConfigurationType="0"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="python_d -u build_ssl.py -d"
ReBuildCommandLine="python_d -u build_ssl.py -d -a"
CleanCommandLine="echo Nothing to do"
Output="_ssl_d.pyd"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="ReleaseItanium|Win32"
OutputDirectory="./."
IntermediateDirectory=".\ia64-temp-release\_ssl"
ConfigurationType="0"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="python build_ssl.py"
ReBuildCommandLine="python build_ssl.py -a"
CleanCommandLine=""
Output="_ssl.pyd"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
<Configuration
Name="ReleaseAMD64|Win32"
OutputDirectory="."
IntermediateDirectory="amd64-temp-release\_ssl"
ConfigurationType="0"
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCNMakeTool"
BuildCommandLine="python build_ssl.py"
ReBuildCommandLine="python build_ssl.py -a"
CleanCommandLine=""
Output="_ssl.pyd"
PreprocessorDefinitions=""
IncludeSearchPath=""
ForcedIncludes=""
AssemblySearchPath=""
ForcedUsingAssemblies=""
CompileAsManaged=""
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<File
RelativePath="..\Modules\_ssl.c"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
This diff is collapsed.
This diff is collapsed.
@echo off
rem A batch program to build or rebuild a particular configuration.
rem just for convenience.
setlocal
set platf=Win32
set conf=Release
set build=/build
:CheckOpts
if "%1"=="-c" (set conf=%2) & shift & shift & goto CheckOpts
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
if "%1"=="-r" (set build=/rebuild) & shift & goto CheckOpts
set cmd=devenv pcbuild.sln %build% "%conf%|%platf%"
echo %cmd%
%cmd%
\ No newline at end of file
@echo off
rem A batch program to build PGO (Profile guided optimization) by first
rem building instrumented binaries, then running the testsuite, and
rem finally building the optimized code.
rem Note, after the first instrumented run, one can just keep on
rem building the PGUpdate configuration while developing.
setlocal
set platf=Win32
rem use the performance testsuite. This is quick and simple
set job1=..\tools\pybench\pybench.py -n 1 -C 1 --with-gc
set path1=..\tools\pybench
rem or the whole testsuite for more thorough testing
set job2=..\lib\test\regrtest.py
set path2=..\lib
set job=%job1%
set clrpath=%path1%
:CheckOpts
if "%1"=="-p" (set platf=%2) & shift & shift & goto CheckOpts
if "%1"=="-2" (set job=%job2%) & (set clrpath=%path2%) & shift & goto CheckOpts
set folder=%platf%PGO
@echo on
rem build the instrumented version
call build -r -p %platf% -c PGInstrument
rem remove .pyc files, .pgc files and execute the job
%folder%\python.exe rmpyc.py %clrpath%
del %folder%\*.pgc
%folder%\python.exe %job%
rem finally build the optimized version
call build -r -p %platf% -c PGUpdate
# Script for building the _ssl module for Windows.
# Uses Perl to setup the OpenSSL environment correctly
# and build OpenSSL, then invokes a simple nmake session
# for _ssl.pyd itself.
# THEORETICALLY, you can:
# * Unpack the latest SSL release one level above your main Python source
# directory. It is likely you will already find the zlib library and
# any other external packages there.
# * Install ActivePerl and ensure it is somewhere on your path.
# * Run this script from the PCBuild directory.
#
# it should configure and build SSL, then build the ssl Python extension
# without intervention.
import os, sys, re
# Find all "foo.exe" files on the PATH.
def find_all_on_path(filename, extras = None):
entries = os.environ["PATH"].split(os.pathsep)
ret = []
for p in entries:
fname = os.path.abspath(os.path.join(p, filename))
if os.path.isfile(fname) and fname not in ret:
ret.append(fname)
if extras:
for p in extras:
fname = os.path.abspath(os.path.join(p, filename))
if os.path.isfile(fname) and fname not in ret:
ret.append(fname)
return ret
# Find a suitable Perl installation for OpenSSL.
# cygwin perl does *not* work. ActivePerl does.
# Being a Perl dummy, the simplest way I can check is if the "Win32" package
# is available.
def find_working_perl(perls):
for perl in perls:
fh = os.popen(perl + ' -e "use Win32;"')
fh.read()
rc = fh.close()
if rc:
continue
return perl
print "Can not find a suitable PERL:"
if perls:
print " the following perl interpreters were found:"
for p in perls:
print " ", p
print " None of these versions appear suitable for building OpenSSL"
else:
print " NO perl interpreters were found on this machine at all!"
print " Please install ActivePerl and ensure it appears on your path"
print "The Python SSL module was not built"
return None
# Locate the best SSL directory given a few roots to look into.
def find_best_ssl_dir(sources):
candidates = []
for s in sources:
try:
s = os.path.abspath(s)
fnames = os.listdir(s)
except os.error:
fnames = []
for fname in fnames:
fqn = os.path.join(s, fname)
if os.path.isdir(fqn) and fname.startswith("openssl-"):
candidates.append(fqn)
# Now we have all the candidates, locate the best.
best_parts = []
best_name = None
for c in candidates:
parts = re.split("[.-]", os.path.basename(c))[1:]
# eg - openssl-0.9.7-beta1 - ignore all "beta" or any other qualifiers
if len(parts) >= 4:
continue
if parts > best_parts:
best_parts = parts
best_name = c
if best_name is not None:
print "Found an SSL directory at '%s'" % (best_name,)
else:
print "Could not find an SSL directory in '%s'" % (sources,)
return best_name
def main():
debug = "-d" in sys.argv
build_all = "-a" in sys.argv
make_flags = ""
if build_all:
make_flags = "-a"
# perl should be on the path, but we also look in "\perl" and "c:\\perl"
# as "well known" locations
perls = find_all_on_path("perl.exe", ["\\perl\\bin", "C:\\perl\\bin"])
perl = find_working_perl(perls)
if perl is None:
sys.exit(1)
print "Found a working perl at '%s'" % (perl,)
# Look for SSL 2 levels up from pcbuild - ie, same place zlib etc all live.
ssl_dir = find_best_ssl_dir(("../..",))
if ssl_dir is None:
sys.exit(1)
old_cd = os.getcwd()
try:
os.chdir(ssl_dir)
# If the ssl makefiles do not exist, we invoke Perl to generate them.
if not os.path.isfile(os.path.join(ssl_dir, "32.mak")) or \
not os.path.isfile(os.path.join(ssl_dir, "d32.mak")):
print "Creating the makefiles..."
# Put our working Perl at the front of our path
os.environ["PATH"] = os.path.split(perl)[0] + \
os.pathsep + \
os.environ["PATH"]
# ms\32all.bat will reconfigure OpenSSL and then try to build
# all outputs (debug/nondebug/dll/lib). So we filter the file
# to exclude any "nmake" commands and then execute.
tempname = "ms\\32all_py.bat"
in_bat = open("ms\\32all.bat")
temp_bat = open(tempname,"w")
while 1:
cmd = in_bat.readline()
print 'cmd', repr(cmd)
if not cmd: break
if cmd.strip()[:5].lower() == "nmake":
continue
temp_bat.write(cmd)
in_bat.close()
temp_bat.close()
os.system(tempname)
try:
os.remove(tempname)
except:
pass
# Now run make.
print "Executing nmake over the ssl makefiles..."
if debug:
rc = os.system("nmake /nologo -f d32.mak")
if rc:
print "Executing d32.mak failed"
print rc
sys.exit(rc)
else:
rc = os.system("nmake /nologo -f 32.mak")
if rc:
print "Executing 32.mak failed"
print rc
sys.exit(rc)
finally:
os.chdir(old_cd)
# And finally, we can build the _ssl module itself for Python.
defs = "SSL_DIR=%s" % (ssl_dir,)
if debug:
defs = defs + " " + "DEBUG=1"
rc = os.system('nmake /nologo -f _ssl.mak ' + defs + " " + make_flags)
sys.exit(rc)
if __name__=='__main__':
main()
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0"?>
<project>
<target name="all" description="Build all targets.">
<solution configuration="release">
<projects>
<include name="db_static.vcproj" />
</projects>
</solution>
</target>
</project>
# An absurd workaround for the lack of arithmetic in MS's resource compiler.
# After building Python, run this, then paste the output into the appropriate
# part of PC\python_nt.rc.
# Example output:
#
# * For 2.3a0,
# * PY_MICRO_VERSION = 0
# * PY_RELEASE_LEVEL = 'alpha' = 0xA
# * PY_RELEASE_SERIAL = 1
# *
# * and 0*1000 + 10*10 + 1 = 101.
# */
# #define FIELD3 101
import sys
major, minor, micro, level, serial = sys.version_info
levelnum = {'alpha': 0xA,
'beta': 0xB,
'candidate': 0xC,
'final': 0xF,
}[level]
string = sys.version.split()[0] # like '2.3a0'
print " * For %s," % string
print " * PY_MICRO_VERSION = %d" % micro
print " * PY_RELEASE_LEVEL = %r = %s" % (level, hex(levelnum))
print " * PY_RELEASE_SERIAL = %d" % serial
print " *"
field3 = micro * 1000 + levelnum * 10 + serial
print " * and %d*1000 + %d*10 + %d = %d" % (micro, levelnum, serial, field3)
print " */"
print "#define FIELD3", field3
This diff is collapsed.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="pyd"
InheritedPropertySheets=".\pyproject.vsprops"
>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\$(ProjectName).pyd"
ImportLibrary="$(IntDir)\$(TargetName).lib"
/>
</VisualStudioPropertySheet>
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="pyd_d"
InheritedPropertySheets=".\pyproject.vsprops"
>
<Tool
Name="VCLinkerTool"
OutputFile="$(OutDir)\$(ProjectName)_d.pyd"
LinkIncremental="1"
ImportLibrary="$(IntDir)\$(TargetName).lib"
/>
</VisualStudioPropertySheet>
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="pyproject"
OutputDirectory="$(SolutionDir)$(PlatformName)$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)$(ConfigurationName)"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\Include; ..\..\PC"
PreprocessorDefinitions="_WIN32;_CRT_SECURE_NO_DEPRECATE"
/>
<Tool
Name="VCLinkerTool"
AdditionalLibraryDirectories="$(OutDir)"
/>
<UserMacro
Name="PyDllName"
Value="python26"
/>
<UserMacro
Name="bsddbDir"
Value="..\..\..\db-4.4.20\build_win32"
/>
<UserMacro
Name="sqlite3Dir"
Value="..\..\..\sqlite-source-3.3.4"
/>
<UserMacro
Name="bz2Dir"
Value="..\..\..\bzip2-1.0.3"
/>
</VisualStudioPropertySheet>
<?xml version="1.0"?>
<project>
<target name="all" description="Build all targets.">
<solution configuration="release">
<projects>
<include name="make_versioninfo.vcproj" />
</projects>
</solution>
<exec program="make_versioninfo" output="pythonnt_rc.h" />
<solution configuration="release" solutionfile="pcbuild.sln">
<excludeprojects>
<include name="_tkinter.vcproj" />
<include name="bz2.vcproj" />
<include name="_bsddb.vcproj" />
<include name="_sqlite3.vcproj" />
<include name="_ssl.vcproj" />
</excludeprojects>
</solution>
</target>
</project>
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="getbuildinfo"
>
<Tool
Name="VCPreBuildEventTool"
Description="Running make_buildinfo.exe"
CommandLine="cd $(SolutionDir)&#x0D;&#x0A;make_buildinfo\make_buildinfo.exe"
/>
</VisualStudioPropertySheet>
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment