From 05a96641b4aef8a8f61db9d55cc051f39260b12f Mon Sep 17 00:00:00 2001 From: Trent Nelson Date: Wed, 19 Mar 2008 07:45:19 +0000 Subject: [PATCH] Refine the Visual Studio 2008 build solution in order to improve how we deal with external components, as well as fixing outstanding issues with Windows x64 build support. Introduce two new .vcproj files, _bsddb44.vcproj and sqlite3.vcproj, which replace the previous pre-link event scripts for _bsddb and _sqlite3 respectively. The new project files inherit from our property files as if they were any other Python module. This has numerous benefits. First, the components get built with exactly the same compiler flags and settings as the rest of Python. Second, it makes it much easier to debug problems in the external components when they're part of the build system. Third, they'll benefit from profile guided optimisation in the release builds, just like the rest of Python core. I've also introduced a slightly new pattern for managing externals in subversion. New components get checked in as -.x, where matches the exact vendor version string. After the initial import of the external component, the .x is tagged as .0 (i.e. tcl-8.4.18.x -> tcl-8.4.18.0). Some components may not need any tweaking, whereas there are others that might (tcl/tk fall into this bucket). In that case, the relevant modifications are made to the .x branch, which will be subsequently tagged as .1 (and then n+1 going forward) when they build successfully and all tests pass. Buildbots will be converted to rely on these explicit tags only, which makes it easy for us to switch them over to a new version as and when required. (Simple change to external(-amd64).bat: if we've bumped tcl to 8.4.18.1, change the .bat to rmdir 8.4.18.0 if it exists and check out a new .1 copy.) --- PCbuild/_bsddb.vcproj | 43 +- PCbuild/_bsddb44.vcproj | 1252 +++++++++++++++++++++++++++++ PCbuild/_sqlite3.vcproj | 26 +- PCbuild/_tkinter.vcproj | 12 +- PCbuild/pcbuild.sln | 38 + PCbuild/pyproject.vsprops | 38 +- PCbuild/sqlite3.vcproj | 743 +++++++++++++++++ Tools/buildbot/external-amd64.bat | 27 +- 8 files changed, 2101 insertions(+), 78 deletions(-) create mode 100644 PCbuild/_bsddb44.vcproj create mode 100644 PCbuild/sqlite3.vcproj diff --git a/PCbuild/_bsddb.vcproj b/PCbuild/_bsddb.vcproj index 3efdcce0c50..f9d77e86578 100644 --- a/PCbuild/_bsddb.vcproj +++ b/PCbuild/_bsddb.vcproj @@ -1,7 +1,7 @@ @@ -423,7 +418,7 @@ /> diff --git a/PCbuild/_bsddb44.vcproj b/PCbuild/_bsddb44.vcproj new file mode 100644 index 00000000000..73032caafd7 --- /dev/null +++ b/PCbuild/_bsddb44.vcproj @@ -0,0 +1,1252 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/PCbuild/_sqlite3.vcproj b/PCbuild/_sqlite3.vcproj index 646c5453fc2..19d549752df 100644 --- a/PCbuild/_sqlite3.vcproj +++ b/PCbuild/_sqlite3.vcproj @@ -1,7 +1,7 @@ @@ -446,12 +428,9 @@ /> diff --git a/PCbuild/_tkinter.vcproj b/PCbuild/_tkinter.vcproj index e3baa5cee17..e8f8aa5ed3c 100644 --- a/PCbuild/_tkinter.vcproj +++ b/PCbuild/_tkinter.vcproj @@ -56,7 +56,7 @@ /> + + + + + + + diff --git a/PCbuild/sqlite3.vcproj b/PCbuild/sqlite3.vcproj new file mode 100644 index 00000000000..a88b30fcbb7 --- /dev/null +++ b/PCbuild/sqlite3.vcproj @@ -0,0 +1,743 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tools/buildbot/external-amd64.bat b/Tools/buildbot/external-amd64.bat index 0ea4d641607..7a8b1697546 100644 --- a/Tools/buildbot/external-amd64.bat +++ b/Tools/buildbot/external-amd64.bat @@ -1,7 +1,5 @@ @rem Fetches (and builds if necessary) external dependencies -@REM XXX FIXME - building for x64 disabled for now. - @rem Assume we start inside the Python source directory cd .. call "%VS90COMNTOOLS%vsvars32.bat" @@ -16,9 +14,6 @@ if exist db-4.4.20 if not exist db-4.4.20\build_win32\this_is_for_vs9 ( rd /s/q db-4.4.20 ) if not exist db-4.4.20 svn export http://svn.python.org/projects/external/db-4.4.20-vs9 db-4.4.20 -if not exist db-4.4.20\build_win32\debug\libdb44sd.lib ( - vcbuild db-4.4.20\build_win32\db_static.vcproj "Debug AMD64|x64" -) @rem OpenSSL if not exist openssl-0.9.8g ( @@ -27,22 +22,20 @@ if not exist openssl-0.9.8g ( ) @rem tcltk -if not exist tcl8.4.16 ( +if not exist tcl8.4.18.1 ( if exist tcltk rd /s/q tcltk if exist tcl8.4.12 rd /s/q tcl8.4.12 if exist tk8.4.12 rd /s/q tk8.4.12 - svn export http://svn.python.org/projects/external/tcl8.4.16 - svn export http://svn.python.org/projects/external/tk8.4.16 -@REM cd tcl8.4.16\win -@REM nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 -@REM nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 INSTALLDIR=..\..\tcltk install -@REM cd ..\.. -@REM cd tk8.4.16\win -@REM nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 TCLDIR=..\..\tcl8.4.16 -@REM nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 TCLDIR=..\..\tcl8.4.16 INSTALLDIR=..\..\tcltk install -@REM cd ..\.. + if exist tcl8.4.16 rd /s/q tcl8.4.16 + if exist tk8.4.16 rd /s/q tk8.4.16 + svn export http://svn.python.org/projects/external/tcl-8.4.18.1 + svn export http://svn.python.org/projects/external/tk-8.4.18.1 + cd tcl-8.4.18.1 + nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=../../tcltk64 clean all install + cd ..\.. + cd tk-8.4.18.1 + nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=../../tcltk64 TCLDIR=../../tcl-8.4.18.1 clean all install ) @rem sqlite if not exist sqlite-source-3.3.4 svn export http://svn.python.org/projects/external/sqlite-source-3.3.4 -@REM if not exist build\PCbuild\sqlite3.dll copy sqlite-source-3.3.4\sqlite3.dll build\PCbuild