From: Brar Piening <brar@gmx.de>
To: Noah Misch <noah@leadboat.com>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Visual Studio 2012 RC
Date: Sun, 14 Oct 2012 23:13:46 +0200
Message-ID: <507B2B0A.2030506@gmx.de> (raw)
In-Reply-To: <20121002011201.GC30396@tornado.leadboat.com>
References: <4FCA84F6.5090706@gmx.de>
<CABUevEzT4B+MyM6-VH4_vvg1KFys4XAAKQcaKbbHRKH7mF7SSw@mail.gmail.com>
<4FD3F553.9060105@gmx.de>
<CABUevEwEYa8Ay5aK9kk+FPCWs6xiwnW-e1B2mcx3Ff3NMaBuhg@mail.gmail.com>
<4FEB0D39.6080108@enterprisedb.com>
<50526BA6.3030103@gmx.de>
<20121002011201.GC30396@tornado.leadboat.com>
Noah Misch wrote:
> My build log filled 8.8 MiB, a large increase from the 432 KiB of the "chough"
> build log. This isn't strictly a problem, but do you happen to have ideas for
> curbing the noise?
Not yet.
> I find no functional problems with the patch, but some comment updates and
> other trivia need attention. The patch itself was reversed; it applied
> cleanly with "patch -R". I regenerated it in the usual direction for the
> portions I quote below.
>
> src/tools/msvc/MSBuildProject.pm:4:# Package that encapsulates a MSBuild (Visual C++ 2010) project file
>
> Say something like "Visual C++ 2010 or greater".
>
> src/tools/msvc/VSObjectFactory.pm:93:# we use nmake as it has existed for a long time and still exists in visual studio 2010
>
> Likewise, modify this comnent to be open-ended. If nmake ever disappears,
> we'll be updating this code and can see to change the comment.
fixed
>
>
>> *** a/doc/src/sgml/install-windows.sgml
>> --- b/doc/src/sgml/install-windows.sgml
>> ***************
>> *** 22,28 ****
>> Microsoft tools is to install a supported version of the
>> <productname>Microsoft Windows SDK</productname> and use the included
>> compiler. It is also possible to build with the full
>> ! <productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>. In some cases
>> that requires the installation of the <productname>Windows SDK</productname>
>> in addition to the compiler.
>> </para>
>> --- 22,28 ----
>> Microsoft tools is to install a supported version of the
>> <productname>Microsoft Windows SDK</productname> and use the included
>> compiler. It is also possible to build with the full
>> ! <productname>Microsoft Visual C++ 2005, 2008, 2010 or 2012</productname>. In some cases
>> that requires the installation of the <productname>Windows SDK</productname>
>> in addition to the compiler.
>> </para>
> I think this paragraph should be more like the one in the next patch hunk:
> call out Visual Studio 2012 Express for Windows Desktop and Windows SDK 7.1 as
> the main recommendations. Perhaps even demote the SDK entirely and just
> recommend VS 2012. It'd odd to recommend only a past-version tool if a
> current-version tool works just as well.
fixed.
> I would write "Windows SDK 7.1" here and remove the parenthesized bit.
> There's a later mention of support for older versions.
>
>> ! (<= 7.1) or those from <productname>Visual Studio Express 2012 for Windows
>> ! Desktop</productname>, which are both free downloads from Microsoft.
fixed.
> The part ending here looks like this:
>
> <varlistentry>
> <term><productname>Microsoft Windows SDK</productname></term>
> <listitem><para>
> It is recommended that you upgrade to the latest supported version
> of the <productname>Microsoft Windows SDK</productname> (currently
> version 7.1), available for download from
> <ulink url="http://www.microsoft.com/downloads/"></;.
> </para>
> <para>
> You must always include the
> <application>Windows Headers and Libraries</application> part of the SDK.
> If you install the <productname>Windows SDK</productname>
> including the <application>Visual C++ Compilers</application>,
> you don't need <productname>Visual Studio</productname> to build.
> Note that as of Version 8.0a the Windows SDK no longer ships with a
> complete command-line build environment.
> </para></listitem>
> </varlistentry>
>
> Since SDK version 7.1 is named as the "latest supported version", I understand
> from that text that installing SDK version 8.0a along with compilers from
> another source (VS 2012 full, VS 2012 Express for Desktop) is considered
> "unsupported" as a PostgreSQL build environment. Is that your intent?
No, not really.
What I want to say is that you'll need the SDK to build postgres.
Using a Visual Studio version that ships with a supported SDK version
(full versions of VS 2005 to 2010 as well as any version of VS 2012)
will work.
On the other hand standalone SDK versions that ship with compilers will
also work.
The major gotcha here is the fact that old sdk versions ship without
compilers and old VS Express versions ship without SDK and you'll need
both to build.
I've tried to change the wording to make this more clear but perhaps
someone else (native speaker) finds a better aproach to make this clear.
>
>> *** a/src/tools/msvc/MSBuildProject.pm
>> --- b/src/tools/msvc/MSBuildProject.pm
>> ***************
>> *** 397,400 **** sub new
>> --- 397,440 ----
>> 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;
>> + }
>> +
>> + sub WriteConfigurationPropertyGroup
> Please add a comment explaining what this override does differently. (I think
> it just adds the "<PlatformToolset>" element.)
done.
Regards,
Brar
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 ****
<para>
There are several different ways of building PostgreSQL on
<productname>Windows</productname>. The simplest way to build with
! Microsoft tools is to install a supported version of the
! <productname>Microsoft Windows SDK</productname> and use the included
compiler. It is also possible to build with the full
<productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>. In some cases
that requires the installation of the <productname>Windows SDK</productname>
--- 19,26 ----
<para>
There are several different ways of building PostgreSQL on
<productname>Windows</productname>. The simplest way to build with
! Microsoft tools is to install <productname>Visual Studio Express 2012
! for Windows Desktop</productname> and use the included
compiler. It is also possible to build with the full
<productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>. In some cases
that requires the installation of the <productname>Windows SDK</productname>
***************
*** 77,93 ****
<productname>Visual Studio Express</productname> or some versions of the
<productname>Microsoft Windows SDK</productname>. If you do not already have a
<productname>Visual Studio</productname> environment set up, the easiest
! way is to use the compilers in the <productname>Windows SDK</productname>,
! which is a free download from Microsoft.
</para>
<para>
PostgreSQL is known to support compilation using the compilers shipped with
<productname>Visual Studio 2005</productname> to
! <productname>Visual Studio 2010</productname> (including Express editions),
as well as standalone Windows SDK releases 6.0 to 7.1.
64-bit PostgreSQL builds are only supported with
! <productname>Microsoft Windows SDK</productname> version 6.0a and above or
<productname>Visual Studio 2008</productname> and above.
</para>
--- 77,94 ----
<productname>Visual Studio Express</productname> or some versions of the
<productname>Microsoft Windows SDK</productname>. If you do not already have a
<productname>Visual Studio</productname> environment set up, the easiest
! ways are to use the compilers in the <productname>Windows SDK 7.1</productname>
! or those from <productname>Visual Studio Express 2012 for Windows
! Desktop</productname>, which are both free downloads from Microsoft.
</para>
<para>
PostgreSQL is known to support compilation using the compilers shipped with
<productname>Visual Studio 2005</productname> to
! <productname>Visual Studio 2012</productname> (including Express editions),
as well as standalone Windows SDK releases 6.0 to 7.1.
64-bit PostgreSQL builds are only supported with
! <productname>Microsoft Windows SDK</productname> version 6.0a to 7.1 or
<productname>Visual Studio 2008</productname> and above.
</para>
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 146,162 ****
<varlistentry>
<term><productname>Microsoft Windows SDK</productname></term>
<listitem><para>
! It is recommended that you upgrade to the latest supported version
! of the <productname>Microsoft Windows SDK</productname> (currently
version 7.1), available for download from
<ulink url="http://www.microsoft.com/downloads/"></;.
</para>
<para>
You must always include the
<application>Windows Headers and Libraries</application> part of the SDK.
! If you install the <productname>Windows SDK</productname>
including the <application>Visual C++ Compilers</application>,
you don't need <productname>Visual Studio</productname> to build.
</para></listitem>
</varlistentry>
--- 147,166 ----
<varlistentry>
<term><productname>Microsoft Windows SDK</productname></term>
<listitem><para>
! If your build environment doesn't ship with a supported version of the
! <productname>Microsoft Windows SDK</productname> it
! is recommended that you upgrade to the latest version (currently
version 7.1), available for download from
<ulink url="http://www.microsoft.com/downloads/"></;.
</para>
<para>
You must always include the
<application>Windows Headers and Libraries</application> part of the SDK.
! If you install a <productname>Windows SDK</productname>
including the <application>Visual C++ Compilers</application>,
you don't need <productname>Visual Studio</productname> to build.
+ Note that as of Version 8.0a the Windows SDK no longer ships with a
+ complete command-line build environment.
</para></listitem>
</varlistentry>
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 198,207 ****
Bison can be downloaded from <ulink url="http://gnuwin32.sourceforge.net"></;.
Flex can be downloaded from
<ulink url="http://www.postgresql.org/ftp/misc/winflex/"></;.
! If you are using <productname>msysGit</productname> for accessing the
! PostgreSQL <productname>Git</productname> repository you probably already
! have recent versions of bison and flex in your <productname>Git</productname>
! binary directory.
</para>
<note>
--- 202,211 ----
Bison can be downloaded from <ulink url="http://gnuwin32.sourceforge.net"></;.
Flex can be downloaded from
<ulink url="http://www.postgresql.org/ftp/misc/winflex/"></;.
! If you are using <productname>msysGit</productname> or <productname>GitHub for
! Windows</productname> for accessing the PostgreSQL <productname>Git</productname>
! repository you probably already have recent versions of bison and flex in your
! <productname>Git</productname> binary directory.
</para>
<note>
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 <PlatformToolset> 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 <<EOF;
+ <PropertyGroup Condition="'\$(Configuration)|\$(Platform)'=='$cfgname|$self->{platform}'" Label="Configuration">
+ <ConfigurationType>$cfgtype</ConfigurationType>
+ <UseOfMfc>false</UseOfMfc>
+ <CharacterSet>MultiByte</CharacterSet>
+ <WholeProgramOptimization>$p->{wholeopt}</WholeProgramOptimization>
+ <PlatformToolset>v110</PlatformToolset>
+ </PropertyGroup>
+ 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 (<P>)
{
! if (/^\/favor:</)
{
$self->{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 (<P>)
{
! 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/;
Attachments:
[text/plain] VisualStudio2012_v03.patch (14.3K, ../507B2B0A.2030506@gmx.de/2-VisualStudio2012_v03.patch)
download | inline diff:
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 ****
<para>
There are several different ways of building PostgreSQL on
<productname>Windows</productname>. The simplest way to build with
! Microsoft tools is to install a supported version of the
! <productname>Microsoft Windows SDK</productname> and use the included
compiler. It is also possible to build with the full
<productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>. In some cases
that requires the installation of the <productname>Windows SDK</productname>
--- 19,26 ----
<para>
There are several different ways of building PostgreSQL on
<productname>Windows</productname>. The simplest way to build with
! Microsoft tools is to install <productname>Visual Studio Express 2012
! for Windows Desktop</productname> and use the included
compiler. It is also possible to build with the full
<productname>Microsoft Visual C++ 2005, 2008 or 2010</productname>. In some cases
that requires the installation of the <productname>Windows SDK</productname>
***************
*** 77,93 ****
<productname>Visual Studio Express</productname> or some versions of the
<productname>Microsoft Windows SDK</productname>. If you do not already have a
<productname>Visual Studio</productname> environment set up, the easiest
! way is to use the compilers in the <productname>Windows SDK</productname>,
! which is a free download from Microsoft.
</para>
<para>
PostgreSQL is known to support compilation using the compilers shipped with
<productname>Visual Studio 2005</productname> to
! <productname>Visual Studio 2010</productname> (including Express editions),
as well as standalone Windows SDK releases 6.0 to 7.1.
64-bit PostgreSQL builds are only supported with
! <productname>Microsoft Windows SDK</productname> version 6.0a and above or
<productname>Visual Studio 2008</productname> and above.
</para>
--- 77,94 ----
<productname>Visual Studio Express</productname> or some versions of the
<productname>Microsoft Windows SDK</productname>. If you do not already have a
<productname>Visual Studio</productname> environment set up, the easiest
! ways are to use the compilers in the <productname>Windows SDK 7.1</productname>
! or those from <productname>Visual Studio Express 2012 for Windows
! Desktop</productname>, which are both free downloads from Microsoft.
</para>
<para>
PostgreSQL is known to support compilation using the compilers shipped with
<productname>Visual Studio 2005</productname> to
! <productname>Visual Studio 2012</productname> (including Express editions),
as well as standalone Windows SDK releases 6.0 to 7.1.
64-bit PostgreSQL builds are only supported with
! <productname>Microsoft Windows SDK</productname> version 6.0a to 7.1 or
<productname>Visual Studio 2008</productname> and above.
</para>
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 146,162 ****
<varlistentry>
<term><productname>Microsoft Windows SDK</productname></term>
<listitem><para>
! It is recommended that you upgrade to the latest supported version
! of the <productname>Microsoft Windows SDK</productname> (currently
version 7.1), available for download from
<ulink url="http://www.microsoft.com/downloads/"></>.
</para>
<para>
You must always include the
<application>Windows Headers and Libraries</application> part of the SDK.
! If you install the <productname>Windows SDK</productname>
including the <application>Visual C++ Compilers</application>,
you don't need <productname>Visual Studio</productname> to build.
</para></listitem>
</varlistentry>
--- 147,166 ----
<varlistentry>
<term><productname>Microsoft Windows SDK</productname></term>
<listitem><para>
! If your build environment doesn't ship with a supported version of the
! <productname>Microsoft Windows SDK</productname> it
! is recommended that you upgrade to the latest version (currently
version 7.1), available for download from
<ulink url="http://www.microsoft.com/downloads/"></>.
</para>
<para>
You must always include the
<application>Windows Headers and Libraries</application> part of the SDK.
! If you install a <productname>Windows SDK</productname>
including the <application>Visual C++ Compilers</application>,
you don't need <productname>Visual Studio</productname> to build.
+ Note that as of Version 8.0a the Windows SDK no longer ships with a+ complete command-line build environment.
</para></listitem>
</varlistentry>
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 198,207 ****
Bison can be downloaded from <ulink url="http://gnuwin32.sourceforge.net"></>.
Flex can be downloaded from
<ulink url="http://www.postgresql.org/ftp/misc/winflex/"></>.
! If you are using <productname>msysGit</productname> for accessing the
! PostgreSQL <productname>Git</productname> repository you probably already
! have recent versions of bison and flex in your <productname>Git</productname>
! binary directory.
</para>
<note>
--- 202,211 ----
Bison can be downloaded from <ulink url="http://gnuwin32.sourceforge.net"></>.
Flex can be downloaded from
<ulink url="http://www.postgresql.org/ftp/misc/winflex/"></>.
! If you are using <productname>msysGit</productname> or <productname>GitHub for
! Windows</productname> for accessing the PostgreSQL <productname>Git</productname>
! repository you probably already have recent versions of bison and flex in your
! <productname>Git</productname> binary directory.
</para>
<note>
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 <PlatformToolset> 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 <<EOF;+ <PropertyGroup Condition="'\$(Configuration)|\$(Platform)'=='$cfgname|$self->{platform}'" Label="Configuration">+ <ConfigurationType>$cfgtype</ConfigurationType>+ <UseOfMfc>false</UseOfMfc>+ <CharacterSet>MultiByte</CharacterSet>+ <WholeProgramOptimization>$p->{wholeopt}</WholeProgramOptimization>+ <PlatformToolset>v110</PlatformToolset>+ </PropertyGroup>+ 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 (<P>)
{
! if (/^\/favor:</)
{
$self->{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 (<P>)
{
! 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/;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: brar@gmx.de, noah@leadboat.com, heikki.linnakangas@enterprisedb.com, magnus@hagander.net
Subject: Re: Visual Studio 2012 RC
In-Reply-To: <507B2B0A.2030506@gmx.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox