pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brar Piening <brar@gmx.de>
To: 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: Fri, 14 Sep 2012 01:26:30 +0200
Message-ID: <50526BA6.3030103@gmx.de> (raw)
In-Reply-To: <4FEB0D39.6080108@enterprisedb.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>

Heikki Linnakangas wrote:
> I don't think we can realistically support VS2012 until Microsoft 
> releases the gratis Visual Studio Express 2012 for Windows Desktop.

As they've released now I've updated my Patch with docs and ask for review.

Regards,

Brar
diff -Napcdr -x .git postgres/doc/src/sgml/install-windows.sgml postgres_dev/doc/src/sgml/install-windows.sgml
*** postgres/doc/src/sgml/install-windows.sgml	Thu Sep 13 23:17:21 2012
--- postgres_dev/doc/src/sgml/install-windows.sgml	Thu Sep 13 23:22:03 2012
***************
*** 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>
--- 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>
***************
*** 77,91 ****
    <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</productname>
!   (<= 7.1) 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 and above or
--- 77,90 ----
    <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
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 158,165 ****
        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>
  
--- 157,162 ----
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 201,210 ****
        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>
--- 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>
diff -Napcdr -x .git postgres/src/tools/msvc/MSBuildProject.pm postgres_dev/src/tools/msvc/MSBuildProject.pm
*** postgres/src/tools/msvc/MSBuildProject.pm	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/MSBuildProject.pm	Thu Sep 13 23:22:03 2012
*************** 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
- {
-     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;
--- 397,400 ----
diff -Napcdr -x .git postgres/src/tools/msvc/Solution.pm postgres_dev/src/tools/msvc/Solution.pm
*** postgres/src/tools/msvc/Solution.pm	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/Solution.pm	Thu Sep 13 23:22:03 2012
*************** sub new
*** 689,716 ****
  	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;
--- 689,692 ----
diff -Napcdr -x .git postgres/src/tools/msvc/VSObjectFactory.pm postgres_dev/src/tools/msvc/VSObjectFactory.pm
*** postgres/src/tools/msvc/VSObjectFactory.pm	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/VSObjectFactory.pm	Thu Sep 13 23:22:03 2012
*************** sub CreateSolution
*** 41,50 ****
  	{
  		return new VS2010Solution(@_);
  	}
- 	elsif ($visualStudioVersion eq '11.00')
- 	{
- 		return new VS2012Solution(@_);
- 	}
  	else
  	{
  		croak "The requested Visual Studio version is not supported.";
--- 41,46 ----
*************** sub CreateProject
*** 72,81 ****
  	{
  		return new VC2010Project(@_);
  	}
- 	elsif ($visualStudioVersion eq '11.00')
- 	{
- 		return new VC2012Project(@_);
- 	}
  	else
  	{
  		croak "The requested Visual Studio version is not supported.";
--- 68,73 ----
*************** sub DetermineVisualStudioVersion
*** 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)
  	{
--- 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)
  	{
diff -Napcdr -x .git postgres/src/tools/msvc/build.pl postgres_dev/src/tools/msvc/build.pl
*** postgres/src/tools/msvc/build.pl	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/build.pl	Thu Sep 13 23:22:03 2012
*************** elsif ($ARGV[0] ne "RELEASE")
*** 50,56 ****
  
  # ... and do it
  
! if ($buildwhat and $vcver >= 10.00)
  {
  	system(
  "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf");
--- 50,56 ----
  
  # ... and do it
  
! if ($buildwhat and $vcver eq '10.00')
  {
  	system(
  "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf");

Attachments:

  [text/plain] VisualStudio2012_v02.patch (8.5K, ../50526BA6.3030103@gmx.de/2-VisualStudio2012_v02.patch)
  download | inline diff:
diff -Napcdr -x .git postgres/doc/src/sgml/install-windows.sgml postgres_dev/doc/src/sgml/install-windows.sgml
*** postgres/doc/src/sgml/install-windows.sgml	Thu Sep 13 23:17:21 2012
--- postgres_dev/doc/src/sgml/install-windows.sgml	Thu Sep 13 23:22:03 2012
***************
*** 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>
--- 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>
***************
*** 77,91 ****
    <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</productname>
!   (<= 7.1) 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 and above or
--- 77,90 ----
    <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
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 158,165 ****
        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>
  
--- 157,162 ----
*************** $ENV{PATH}=$ENV{PATH} . ';c:\some\where\
*** 201,210 ****
        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>
--- 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>
diff -Napcdr -x .git postgres/src/tools/msvc/MSBuildProject.pm postgres_dev/src/tools/msvc/MSBuildProject.pm
*** postgres/src/tools/msvc/MSBuildProject.pm	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/MSBuildProject.pm	Thu Sep 13 23:22:03 2012
*************** 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
- {
-     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;
--- 397,400 ----
diff -Napcdr -x .git postgres/src/tools/msvc/Solution.pm postgres_dev/src/tools/msvc/Solution.pm
*** postgres/src/tools/msvc/Solution.pm	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/Solution.pm	Thu Sep 13 23:22:03 2012
*************** sub new
*** 689,716 ****
  	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;
--- 689,692 ----
diff -Napcdr -x .git postgres/src/tools/msvc/VSObjectFactory.pm postgres_dev/src/tools/msvc/VSObjectFactory.pm
*** postgres/src/tools/msvc/VSObjectFactory.pm	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/VSObjectFactory.pm	Thu Sep 13 23:22:03 2012
*************** sub CreateSolution
*** 41,50 ****
  	{
  		return new VS2010Solution(@_);
  	}
- 	elsif ($visualStudioVersion eq '11.00')
- 	{
- 		return new VS2012Solution(@_);
- 	}
  	else
  	{
  		croak "The requested Visual Studio version is not supported.";
--- 41,46 ----
*************** sub CreateProject
*** 72,81 ****
  	{
  		return new VC2010Project(@_);
  	}
- 	elsif ($visualStudioVersion eq '11.00')
- 	{
- 		return new VC2012Project(@_);
- 	}
  	else
  	{
  		croak "The requested Visual Studio version is not supported.";
--- 68,73 ----
*************** sub DetermineVisualStudioVersion
*** 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)
  	{
--- 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)
  	{
diff -Napcdr -x .git postgres/src/tools/msvc/build.pl postgres_dev/src/tools/msvc/build.pl
*** postgres/src/tools/msvc/build.pl	Thu Sep 13 23:17:32 2012
--- postgres_dev/src/tools/msvc/build.pl	Thu Sep 13 23:22:03 2012
*************** elsif ($ARGV[0] ne "RELEASE")
*** 50,56 ****
  
  # ... and do it
  
! if ($buildwhat and $vcver >= 10.00)
  {
  	system(
  "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf");
--- 50,56 ----
  
  # ... and do it
  
! if ($buildwhat and $vcver eq '10.00')
  {
  	system(
  "msbuild $buildwhat.vcxproj /verbosity:detailed /p:Configuration=$bconf");

view thread (54+ messages)  latest in thread

Message-ID: <50526BA6.3030103@gmx.de>
Permalink:  ../50526BA6.3030103@gmx.de/
Also on:    postgresql.org/message-id/50526BA6.3030103@gmx.de

 ·  · 

reply

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, heikki.linnakangas@enterprisedb.com, magnus@hagander.net
  Subject: Re: Visual Studio 2012 RC
  In-Reply-To: <50526BA6.3030103@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