diff -Napcdr -x .git postgresql/doc/src/sgml/install-windows.sgml postgresql_dev/doc/src/sgml/install-windows.sgml *** postgresql/doc/src/sgml/install-windows.sgml Sun Oct 14 09:47:50 2012 --- postgresql_dev/doc/src/sgml/install-windows.sgml Sun Oct 14 17:52:14 2012 *************** *** 19,26 **** There are several different ways of building PostgreSQL on Windows. The simplest way to build with ! Microsoft tools is to install a supported version of the ! Microsoft Windows SDK and use the included compiler. It is also possible to build with the full Microsoft Visual C++ 2005, 2008 or 2010. In some cases that requires the installation of the Windows SDK --- 19,26 ---- There are several different ways of building PostgreSQL on Windows. The simplest way to build with ! Microsoft tools is to install Visual Studio Express 2012 ! for Windows Desktop and use the included compiler. It is also possible to build with the full Microsoft Visual C++ 2005, 2008 or 2010. In some cases that requires the installation of the Windows SDK *************** *** 77,93 **** Visual Studio Express or some versions of the Microsoft Windows SDK. If you do not already have a Visual Studio environment set up, the easiest ! way is to use the compilers in the Windows SDK, ! which is a free download from Microsoft. PostgreSQL is known to support compilation using the compilers shipped with Visual Studio 2005 to ! Visual Studio 2010 (including Express editions), as well as standalone Windows SDK releases 6.0 to 7.1. 64-bit PostgreSQL builds are only supported with ! Microsoft Windows SDK version 6.0a and above or Visual Studio 2008 and above. --- 77,94 ---- Visual Studio Express or some versions of the Microsoft Windows SDK. If you do not already have a Visual Studio environment set up, the easiest ! ways are to use the compilers in the Windows SDK 7.1 ! or those from Visual Studio Express 2012 for Windows ! Desktop, which are both free downloads from Microsoft. PostgreSQL is known to support compilation using the compilers shipped with Visual Studio 2005 to ! Visual Studio 2012 (including Express editions), as well as standalone Windows SDK releases 6.0 to 7.1. 64-bit PostgreSQL builds are only supported with ! Microsoft Windows SDK version 6.0a to 7.1 or Visual Studio 2008 and above. *************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\ *** 146,162 **** Microsoft Windows SDK ! It is recommended that you upgrade to the latest supported version ! of the Microsoft Windows SDK (currently version 7.1), available for download from . You must always include the Windows Headers and Libraries part of the SDK. ! If you install the Windows SDK including the Visual C++ Compilers, you don't need Visual Studio to build. --- 147,166 ---- Microsoft Windows SDK ! If your build environment doesn't ship with a supported version of the ! Microsoft Windows SDK it ! is recommended that you upgrade to the latest version (currently version 7.1), available for download from . You must always include the Windows Headers and Libraries part of the SDK. ! If you install a Windows SDK including the Visual C++ Compilers, you don't need Visual Studio to build. + Note that as of Version 8.0a the Windows SDK no longer ships with a + complete command-line build environment. *************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\ *** 198,207 **** Bison can be downloaded from . Flex can be downloaded from . ! If you are using msysGit for accessing the ! PostgreSQL Git repository you probably already ! have recent versions of bison and flex in your Git ! binary directory. --- 202,211 ---- Bison can be downloaded from . Flex can be downloaded from . ! If you are using msysGit or GitHub for ! Windows for accessing the PostgreSQL Git ! repository you probably already have recent versions of bison and flex in your ! Git binary directory. diff -Napcdr -x .git postgresql/src/tools/msvc/MSBuildProject.pm postgresql_dev/src/tools/msvc/MSBuildProject.pm *** postgresql/src/tools/msvc/MSBuildProject.pm Sun Oct 14 09:48:06 2012 --- postgresql_dev/src/tools/msvc/MSBuildProject.pm Sun Oct 14 12:07:35 2012 *************** *** 1,7 **** package MSBuildProject; # ! # Package that encapsulates a MSBuild (Visual C++ 2010) project file # # src/tools/msvc/MSBuildProject.pm # --- 1,7 ---- package MSBuildProject; # ! # Package that encapsulates a MSBuild project file (Visual C++ 2010 or greater) # # src/tools/msvc/MSBuildProject.pm # *************** sub new *** 395,400 **** --- 395,442 ---- $self->{vcver} = '10.00'; return $self; + } + + package VC2012Project; + + # + # Package that encapsulates a Visual C++ 2012 project file + # + + use strict; + use warnings; + use base qw(MSBuildProject); + + sub new + { + my $classname = shift; + my $self = $classname->SUPER::_new(@_); + bless($self, $classname); + + $self->{vcver} = '11.00'; + + return $self; + } + + # This override adds the element + # to the PropertyGroup labeled "Configuration" + sub WriteConfigurationPropertyGroup + { + my ($self, $f, $cfgname, $p) = @_; + my $cfgtype = + ($self->{type} eq "exe") + ?'Application' + :($self->{type} eq "dll"?'DynamicLibrary':'StaticLibrary'); + + print $f < + $cfgtype + false + MultiByte + $p->{wholeopt} + v110 + + EOF } 1; diff -Napcdr -x .git postgresql/src/tools/msvc/README postgresql_dev/src/tools/msvc/README *** postgresql/src/tools/msvc/README Sun Oct 14 09:48:06 2012 --- postgresql_dev/src/tools/msvc/README Sun Oct 14 11:38:00 2012 *************** These configuration arguments are passed *** 92,101 **** (Mkvcbuild.pm) which creates the Visual Studio project and solution files. It does this by using VSObjectFactory::CreateSolution to create an object implementing the Solution interface (this could be either a VS2005Solution, ! a VS2008Solution or a VS2010Solution, all in Solution.pm, depending on the ! user's build environment) and adding objects implementing the corresponding ! Project interface (VC2005Project or VC2008Project from VCBuildProject.pm or ! VC2010Project from MSBuildProject.pm) to it. When Solution::Save is called, the implementations of Solution and Project save their content in the appropriate format. The final step of starting the appropriate build program (msbuild or vcbuild) --- 92,102 ---- (Mkvcbuild.pm) which creates the Visual Studio project and solution files. It does this by using VSObjectFactory::CreateSolution to create an object implementing the Solution interface (this could be either a VS2005Solution, ! a VS2008Solution, a VS2010Solution or a VS2012Solution, all in Solution.pm, ! depending on the user's build environment) and adding objects implementing ! the corresponding Project interface (VC2005Project or VC2008Project from ! VCBuildProject.pm or VC2010Project or VC2012Project from MSBuildProject.pm) ! to it. When Solution::Save is called, the implementations of Solution and Project save their content in the appropriate format. The final step of starting the appropriate build program (msbuild or vcbuild) diff -Napcdr -x .git postgresql/src/tools/msvc/Solution.pm postgresql_dev/src/tools/msvc/Solution.pm *** postgresql/src/tools/msvc/Solution.pm Sun Oct 14 09:48:06 2012 --- postgresql_dev/src/tools/msvc/Solution.pm Sun Oct 14 11:27:32 2012 *************** sub DeterminePlatform *** 63,75 **** { my $self = shift; ! # Determine if we are in 32 or 64-bit mode. Do this by seeing if CL has ! # 64-bit only parameters. $self->{platform} = 'Win32'; ! open(P, "cl /? 2>NUL|") || die "cl command not found"; while (

) { ! if (/^\/favor:{platform} = 'x64'; last; --- 63,74 ---- { my $self = shift; ! # Examine CL help output to determine if we are in 32 or 64-bit mode. $self->{platform} = 'Win32'; ! open(P, "cl /? 2>&1 |") || die "cl command not found"; while (

) { ! if (/^\/favor:<.+AMD64/) { $self->{platform} = 'x64'; last; *************** sub new *** 695,700 **** --- 694,723 ---- $self->{visualStudioName} = 'Visual Studio 2010'; return $self; + } + + package VS2012Solution; + + # + # Package that encapsulates a Visual Studio 2012 solution file + # + + use Carp; + use strict; + use warnings; + use base qw(Solution); + + sub new + { + my $classname = shift; + my $self = $classname->SUPER::_new(@_); + bless($self, $classname); + + $self->{solutionFileVersion} = '12.00'; + $self->{vcver} = '11.00'; + $self->{visualStudioName} = 'Visual Studio 2012'; + + return $self; } 1; diff -Napcdr -x .git postgresql/src/tools/msvc/VSObjectFactory.pm postgresql_dev/src/tools/msvc/VSObjectFactory.pm *** postgresql/src/tools/msvc/VSObjectFactory.pm Sun Oct 14 09:48:06 2012 --- postgresql_dev/src/tools/msvc/VSObjectFactory.pm Sun Oct 14 11:35:14 2012 *************** sub CreateSolution *** 41,46 **** --- 41,50 ---- { return new VS2010Solution(@_); } + elsif ($visualStudioVersion eq '11.00') + { + return new VS2012Solution(@_); + } else { croak "The requested Visual Studio version is not supported."; *************** sub CreateProject *** 68,73 **** --- 72,81 ---- { return new VC2010Project(@_); } + elsif ($visualStudioVersion eq '11.00') + { + return new VC2012Project(@_); + } else { croak "The requested Visual Studio version is not supported."; *************** sub DetermineVisualStudioVersion *** 82,88 **** { # Determine version of nmake command, to set proper version of visual studio ! # we use nmake as it has existed for a long time and still exists in visual studio 2010 open(P, "nmake /? 2>&1 |") || croak "Unable to determine Visual Studio version: The nmake command wasn't found."; --- 90,96 ---- { # Determine version of nmake command, to set proper version of visual studio ! # we use nmake as it has existed for a long time and still exists in current visual studio versions open(P, "nmake /? 2>&1 |") || croak "Unable to determine Visual Studio version: The nmake command wasn't found."; *************** sub DetermineVisualStudioVersion *** 107,117 **** sub _GetVisualStudioVersion { my ($major, $minor) = @_; ! if ($major > 10) { carp "The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; ! return '10.00'; } elsif ($major < 6) { --- 115,125 ---- sub _GetVisualStudioVersion { my ($major, $minor) = @_; ! if ($major > 11) { carp "The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; ! return '11.00'; } elsif ($major < 6) { diff -Napcdr -x .git postgresql/src/tools/msvc/build.pl postgresql_dev/src/tools/msvc/build.pl *** postgresql/src/tools/msvc/build.pl Sun Oct 14 09:48:06 2012 --- postgresql_dev/src/tools/msvc/build.pl Sun Oct 14 09:54:55 2012 *************** elsif ($ARGV[0] ne "RELEASE") *** 50,56 **** # ... and do it ! if ($buildwhat and $vcver eq '10.00') { system( "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf"); --- 50,56 ---- # ... and do it ! if ($buildwhat and $vcver >= 10.00) { system( "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf"); diff -Napcdr -x .git postgresql/src/tools/msvc/gendef.pl postgresql_dev/src/tools/msvc/gendef.pl *** postgresql/src/tools/msvc/gendef.pl Sun Oct 14 09:48:06 2012 --- postgresql_dev/src/tools/msvc/gendef.pl Sun Oct 14 15:35:35 2012 *************** while (<$ARGV[0]/*.obj>) *** 40,45 **** --- 40,46 ---- next if $pieces[6] =~ /^\(/; next if $pieces[6] =~ /^__real/; next if $pieces[6] =~ /^__imp/; + next if $pieces[6] =~ /^__xmm/; next if $pieces[6] =~ /NULL_THUNK_DATA$/; next if $pieces[6] =~ /^__IMPORT_DESCRIPTOR/; next if $pieces[6] =~ /^__NULL_IMPORT/;