Re: MSVC Build support with visual studio 2019
On Wed, 3 Jul 2019 at 10:01, Michael Paquier wrote: > On Tue, Jul 02, 2019 at 02:10:11PM +0900, Michael Paquier wrote: > > OK, committed to HEAD for now after perltidy'ing the patch. Let's see > > what the buildfarm has to say about it first. Once we are sure that > > the thing is stable, I'll try to backpatch it. This works on my own > > dev machines with VS 2015 and 2019, but who knows what hides in the > > shadows... > > The buildfarm did not have much to say, so backpatched down to 9.4, > adjusting things on the way. Thanks Michael. Regards, Haribabu Kommi
Re: MSVC Build support with visual studio 2019
On Tue, Jul 02, 2019 at 02:10:11PM +0900, Michael Paquier wrote: > OK, committed to HEAD for now after perltidy'ing the patch. Let's see > what the buildfarm has to say about it first. Once we are sure that > the thing is stable, I'll try to backpatch it. This works on my own > dev machines with VS 2015 and 2019, but who knows what hides in the > shadows... The buildfarm did not have much to say, so backpatched down to 9.4, adjusting things on the way. -- Michael signature.asc Description: PGP signature
Re: MSVC Build support with visual studio 2019
On Mon, Jul 01, 2019 at 07:56:29PM +1000, Haribabu Kommi wrote: > We stopped the support of building with all the visual studio versions less > than 2013. I updated the SDK versions accordingly. I have spent some time looking around, and wikipedia-sensei has proved to be helpful to grasp the release references: https://en.wikipedia.org/wiki/Microsoft_Windows_SDK So the suggestions from the patch are fine. This one was actually forgotten: src/tools/msvc/README:from www.microsoft.com (v6.0 or greater). > The similar change is required for the CreateProject also. I have changed both messages so as the version of VS attempted to be used is reported in the error message directly. > + # The major visual studio that is supported has nmake > + # version >= 14.30, so stick with it as the latest version > > The major visual studio version that is supported has nmake version > <=14.30 Damn. Thanks for pointing out that. > Except for the above two changes, overall the patch is in good shape. OK, committed to HEAD for now after perltidy'ing the patch. Let's see what the buildfarm has to say about it first. Once we are sure that the thing is stable, I'll try to backpatch it. This works on my own dev machines with VS 2015 and 2019, but who knows what hides in the shadows... -- Michael signature.asc Description: PGP signature
Re: MSVC Build support with visual studio 2019
On Thu, 27 Jun 2019 at 17:28, Michael Paquier wrote: > On Wed, Jun 26, 2019 at 10:29:05PM +1000, Haribabu Kommi wrote: > > Thanks for the review. Yes, that patch applies till 9.5, it is my mistake > > in naming the patch. > > I have been able to finally set up an environment with VS 2019 (as > usual this stuff needs time, anyway..), and I can confirm that the > patch is able to compile properly. > Thanks for the review. > - Visual Studio 2017 (including Express > editions), > - as well as standalone Windows SDK releases 6.0 to 8.1. > + Visual Studio 2019 (including Express > editions), > + as well as standalone Windows SDK releases 8.1a to 10. > I would like to understand why this range of requirements is updated. > Is there any reason to do so. If we change these docs, what does it > mean in terms of versions of Visual Studio supported? > We stopped the support of building with all the visual studio versions less than 2013. I updated the SDK versions accordingly. > -or a VS2015Solution or a VS2017Solution, all in Solution.pm, depending on > -the user's build environment) and adding objects implementing the > corresponding > -Project interface (VC2013Project or VC2015Project or VC2017Project from > -MSBuildProject.pm) to it. > +or a VS2015Solution or a VS2017Solution or a VS2019Solution, all in > Solution.pm, > +depending on the user's build environment) and adding objects implementing > +the corresponding Project interface (VC2013Project or VC2015Project or > VC2017Project > +or VC2019Project from MSBuildProject.pm) to it. > This formulation is weird the more we accumulate new objects, let's > put that in a proper list of elements separated with commas except > for the two last ones which should use "or". > > s/greather/greater/. > > The patch still has typos, and the format is not satisfying yet, so I > have done a set of fixes as per the attached. > The change in the patch is good. > > - elsif ($major < 6) > + elsif ($major < 12) > { > croak > - "Unable to determine Visual Studio version: > Visual Studio versions before 6.0 aren't supported."; > + "Unable to determine Visual Studio version: > Visual Studio versions before 12.0 aren't supported."; > Well, this is a separate bug fix, still I don't mind fixing that in > the same patch as we meddle with those code paths now. Good catch. > > - croak $visualStudioVersion; > + carp $visualStudioVersion; > Same here. Just wouldn't it be better to print the version found in > the same message? > Yes, that is a good change, I thought of doing the same, but I don't know how to do it. The similar change is required for the CreateProject also. > + # The major visual studio that is supported has nmake version >= > 14.20 and < 15. > if ($major > 14) > Comment line is too long. It seems to me that the condition here > should be ($major >= 14 && $minor >= 30). That's not completely > correct either as we have a version higher than 14.20 for VS 2019 but > that's better than just using 14.29 or a fake number I guess. > The change is good, but the comment is wrong. + # The major visual studio that is supported has nmake + # version >= 14.30, so stick with it as the latest version The major visual studio version that is supported has nmake version <=14.30 Except for the above two changes, overall the patch is in good shape. Regards, Haribabu Kommi
Re: MSVC Build support with visual studio 2019
On Wed, Jun 26, 2019 at 10:29:05PM +1000, Haribabu Kommi wrote: > Thanks for the review. Yes, that patch applies till 9.5, it is my mistake > in naming the patch. I have been able to finally set up an environment with VS 2019 (as usual this stuff needs time, anyway..), and I can confirm that the patch is able to compile properly. - Visual Studio 2017 (including Express editions), - as well as standalone Windows SDK releases 6.0 to 8.1. + Visual Studio 2019 (including Express editions), + as well as standalone Windows SDK releases 8.1a to 10. I would like to understand why this range of requirements is updated. Is there any reason to do so. If we change these docs, what does it mean in terms of versions of Visual Studio supported? -or a VS2015Solution or a VS2017Solution, all in Solution.pm, depending on -the user's build environment) and adding objects implementing the corresponding -Project interface (VC2013Project or VC2015Project or VC2017Project from -MSBuildProject.pm) to it. +or a VS2015Solution or a VS2017Solution or a VS2019Solution, all in Solution.pm, +depending on the user's build environment) and adding objects implementing +the corresponding Project interface (VC2013Project or VC2015Project or VC2017Project +or VC2019Project from MSBuildProject.pm) to it. This formulation is weird the more we accumulate new objects, let's put that in a proper list of elements separated with commas except for the two last ones which should use "or". s/greather/greater/. The patch still has typos, and the format is not satisfying yet, so I have done a set of fixes as per the attached. - elsif ($major < 6) + elsif ($major < 12) { croak - "Unable to determine Visual Studio version: Visual Studio versions before 6.0 aren't supported."; + "Unable to determine Visual Studio version: Visual Studio versions before 12.0 aren't supported."; Well, this is a separate bug fix, still I don't mind fixing that in the same patch as we meddle with those code paths now. Good catch. - croak $visualStudioVersion; + carp $visualStudioVersion; Same here. Just wouldn't it be better to print the version found in the same message? + # The major visual studio that is supported has nmake version >= 14.20 and < 15. if ($major > 14) Comment line is too long. It seems to me that the condition here should be ($major >= 14 && $minor >= 30). That's not completely correct either as we have a version higher than 14.20 for VS 2019 but that's better than just using 14.29 or a fake number I guess. So for now I have the attached which applies to HEAD. The patch is not indented yet because the conditions in CreateProject() and CreateSolution() get messed up, but I'll figure out something. Any comments? I am wondering the update related to the version range of the standalone SDKs though. No need for backpatched versions yet, first let's agree about the shape of what we want on HEAD. -- Michael diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml index 22a2ffd55e..0bbb314c3b 100644 --- a/doc/src/sgml/install-windows.sgml +++ b/doc/src/sgml/install-windows.sgml @@ -19,10 +19,10 @@ There are several different ways of building PostgreSQL on Windows. The simplest way to build with - Microsoft tools is to install Visual Studio Express 2017 + Microsoft tools is to install Visual Studio Express 2019 for Windows Desktop and use the included compiler. It is also possible to build with the full - Microsoft Visual C++ 2013 to 2017. + Microsoft Visual C++ 2013 to 2019. In some cases that requires the installation of the Windows SDK in addition to the compiler. @@ -69,24 +69,24 @@ 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 from Visual Studio Express 2017 + ways are to use the compilers from Visual Studio Express 2019 for Windows Desktop or those in the Windows SDK - 8.1, which are both free downloads from Microsoft. + 10, which are both free downloads from Microsoft. Both 32-bit and 64-bit builds are possible with the Microsoft Compiler suite. 32-bit PostgreSQL builds are possible with Visual Studio 2013 to - Visual Studio 2017 (including Express editions), - as well as standalone Windows SDK releases 6.0 to 8.1. + Visual Studio 2019 (including Express editions), + as well as standalone Windows SDK releases 8.1a to 10. 64-bit PostgreSQL builds are supported with - Microsoft Windows SDK version 6.0a to 8.1 or + Microsoft Windows SDK version 8.1a to 10 or Visual Studio 2013 and above. Compilation is supported down to Windows 7 and Windows Server 2008 R2 SP1 when building with Visual Studio 2013 to - Visual Studio 2017. + Visual Studio 2019. @@ -166,7 +168,7 @@ $ENV{MSBFLAGS}="/m"; If your build environment
Re: MSVC Build support with visual studio 2019
On Wed, 5 Jun 2019 at 17:22, Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > > On Wed, May 29, 2019 at 10:30 AM Haribabu Kommi > wrote: > >> >> Updated patches are attached. >> >> > All patches apply, build and pass tests. The patch > '0001-support-building-with-visual-studio-2019_v10_to_v9.6_v3.patch' > applies on version 9.5. > > Not sure if more review is needed before moving to 'ready for commite'r, > but I have no more comments to make on current patches. > Thanks for the review. Yes, that patch applies till 9.5, it is my mistake in naming the patch. Regards, Haribabu Kommi
Re: MSVC Build support with visual studio 2019
On Wed, May 29, 2019 at 10:30 AM Haribabu Kommi wrote: > > Updated patches are attached. > > All patches apply, build and pass tests. The patch '0001-support-building-with-visual-studio-2019_v10_to_v9.6_v3.patch' applies on version 9.5. Not sure if more review is needed before moving to 'ready for commite'r, but I have no more comments to make on current patches. Regards, Juan José Santamaría Flecha
Re: MSVC Build support with visual studio 2019
On Mon, May 27, 2019 at 8:14 PM Juan José Santamaría Flecha < juanjo.santama...@gmail.com> wrote: > > On Thu, May 23, 2019 at 3:44 AM Haribabu Kommi > wrote: > >> >> Updated patches are attached for all branches. >> >> > I have gone through all patches and there are a couple of typos: > Thanks for the review. > 1. s/prodcutname/productname/ > > 1.1 In file: 0001-support-building-with-visual-studio-2019_v9.4.patch > @@ -97,8 +97,9 @@ >Visual Studio 2013. Building with >Visual Studio 2015 is supported down to >Windows Vista and Windows Server 2008. > - Building with Visual Studio 2017 is > supported > - down to Windows 7 SP1 and Windows Server > 2008 R2 SP1. > + Building with Visual Studio 2017 and > + Visual Studio 2019 are supported down to > > 1.2 In file: > 0001-support-building-with-visual-studio-2019_v10_to_v9.5.patch > @@ -97,8 +97,9 @@ >Visual Studio 2013. Building with >Visual Studio 2015 is supported down to >Windows Vista and Windows Server 2008. > - Building with Visual Studio 2017 is > supported > - down to Windows 7 SP1 and Windows Server > 2008 R2 SP1. > + Building with Visual Studio 2017 and > + Visual Studio 2019 are supported down to > Corrected. > 2. s/stuido/studio/ > > 2.1 In file: 0001-support-building-with-visual-studio-2019_v9.4.patch > @@ -143,12 +173,12 @@ sub DetermineVisualStudioVersion > sub _GetVisualStudioVersion > { > my ($major, $minor) = @_; > - # visual 2017 hasn't changed the nmake version to 15, so still using > the older version for comparison. > + # The major visual stuido that is suppored has nmake version >= 14.20 > and < 15. > > 2.2 In file: > 0001-support-building-with-visual-studio-2019_v10_to_v9.5.patch > @@ -132,12 +162,12 @@ sub DetermineVisualStudioVersion > sub _GetVisualStudioVersion > { > my ($major, $minor) = @_; > - # visual 2017 hasn't changed the nmake version to 15, so still using > the older version for comparison. > + # The major visual stuido that is suppored has nmake version >= 14.20 > and < 15. > > 2.3 In file: 0001-support-building-with-visual-studio-2019_v11.patch > @@ -139,12 +165,12 @@ sub _GetVisualStudioVersion > { > my ($major, $minor) = @_; > > - # visual 2017 hasn't changed the nmake version to 15, so still using > the older version for comparison. > + # The major visual stuido that is suppored has nmake version >= 14.20 > and < 15. > > 2.4 In file: 0001-Support-building-with-visual-studio-2019_HEAD.patch > @@ -106,17 +132,17 @@ sub _GetVisualStudioVersion > { > my ($major, $minor) = @_; > > - # visual 2017 hasn't changed the nmake version to 15, so still using > the older version for comparison. > + # The major visual stuido that is suppored has nmake version >= 14.20 > and < 15. > Corrected. And also 'supported' spelling is also wrong. Updated patches are attached. Regards, Haribabu Kommi Fujitsu Australia 0001-support-building-with-visual-studio-2019_v11_v3.patch Description: Binary data 0001-support-building-with-visual-studio-2019_v10_to_v9.6_v3.patch Description: Binary data 0001-support-building-with-visual-studio-2019_v9.4_v3.patch Description: Binary data 0001-Support-building-with-visual-studio-2019_HEAD_v3.patch Description: Binary data
Re: MSVC Build support with visual studio 2019
On Thu, May 23, 2019 at 3:44 AM Haribabu Kommi wrote: > > Updated patches are attached for all branches. > > I have gone through all patches and there are a couple of typos: 1. s/prodcutname/productname/ 1.1 In file: 0001-support-building-with-visual-studio-2019_v9.4.patch @@ -97,8 +97,9 @@ Visual Studio 2013. Building with Visual Studio 2015 is supported down to Windows Vista and Windows Server 2008. - Building with Visual Studio 2017 is supported - down to Windows 7 SP1 and Windows Server 2008 R2 SP1. + Building with Visual Studio 2017 and + Visual Studio 2019 are supported down to 1.2 In file: 0001-support-building-with-visual-studio-2019_v10_to_v9.5.patch @@ -97,8 +97,9 @@ Visual Studio 2013. Building with Visual Studio 2015 is supported down to Windows Vista and Windows Server 2008. - Building with Visual Studio 2017 is supported - down to Windows 7 SP1 and Windows Server 2008 R2 SP1. + Building with Visual Studio 2017 and + Visual Studio 2019 are supported down to 2. s/stuido/studio/ 2.1 In file: 0001-support-building-with-visual-studio-2019_v9.4.patch @@ -143,12 +173,12 @@ sub DetermineVisualStudioVersion sub _GetVisualStudioVersion { my ($major, $minor) = @_; - # visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison. + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. 2.2 In file: 0001-support-building-with-visual-studio-2019_v10_to_v9.5.patch @@ -132,12 +162,12 @@ sub DetermineVisualStudioVersion sub _GetVisualStudioVersion { my ($major, $minor) = @_; - # visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison. + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. 2.3 In file: 0001-support-building-with-visual-studio-2019_v11.patch @@ -139,12 +165,12 @@ sub _GetVisualStudioVersion { my ($major, $minor) = @_; - # visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison. + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. 2.4 In file: 0001-Support-building-with-visual-studio-2019_HEAD.patch @@ -106,17 +132,17 @@ sub _GetVisualStudioVersion { my ($major, $minor) = @_; - # visual 2017 hasn't changed the nmake version to 15, so still using the older version for comparison. + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. Other than that, since this is affects comments and docs, I have already tested that the patches build and pass tests on all the intended versions. Regards, Juan José Santamaría Flecha
Re: MSVC Build support with visual studio 2019
On Wed, May 22, 2019 at 7:36 AM Juanjo Santamaria Flecha < juanjo.santama...@gmail.com> wrote: > I have gone through path > '0001-Support-building-with-visual-studio-2019.patch' only, but I am sure > some comments will also apply to back branches. > Thanks for the review. > 1. The VisualStudioVersion value looks odd: > > + $self->{VisualStudioVersion}= '16.0.32.32432'; > > Are you using a pre-release version [1]? > I first developed this patch on the preview version. I updated it to version 16.0.28729.10. > 2. There is a typo: s/stuido/studio/: > > + # The major visual stuido that is suppored has nmake version >= > 14.20 and < 15. > > There is something in the current code that I think should be also > updated. The code for _GetVisualStudioVersion contains: > > if ($major > 14) > { > carp > "The determined version of Visual Studio is newer than the latest > supported version. Returning the latest supported version instead."; > return '14.00'; > } > > Shouldn't the returned value be '14.20' for Visual Studio 2019? > Yes, that will be good to return Visual Studio 2019, updated. Updated patches are attached for all branches. Regards, Haribabu Kommi Fujitsu Australia 0001-Support-building-with-visual-studio-2019_HEAD.patch Description: Binary data 0001-support-building-with-visual-studio-2019_v11.patch Description: Binary data 0001-support-building-with-visual-studio-2019_v9.4.patch Description: Binary data 0001-support-building-with-visual-studio-2019_v10_to_v9.5.patch Description: Binary data
Re: MSVC Build support with visual studio 2019
I have gone through path '0001-Support-building-with-visual-studio-2019.patch' only, but I am sure some comments will also apply to back branches. 1. The VisualStudioVersion value looks odd: + $self->{VisualStudioVersion}= '16.0.32.32432'; Are you using a pre-release version [1]? 2. There is a typo: s/stuido/studio/: + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. There is something in the current code that I think should be also updated. The code for _GetVisualStudioVersion contains: if ($major > 14) { carp "The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; return '14.00'; } Shouldn't the returned value be '14.20' for Visual Studio 2019? Regards, Juan José Santamaría Flecha [1] https://docs.microsoft.com/en-us/visualstudio/releases/2019/history#release-dates-and-build-numbers
Re: MSVC Build support with visual studio 2019
> On Wed, Mar 27, 2019 at 11:42 AM Haribabu Kommi > wrote: > > Visual Studio 2019 is officially released. There is no major change in the > patch, except some small comments update. > > Also attached patches for the back branches also. > I have gone through path '0001-Support-building-with-visual-studio-2019.patch' only, but I am sure some comments will also apply to back branches. 1. The VisualStudioVersion value looks odd: + $self->{VisualStudioVersion}= '16.0.32.32432'; Are you using a pre-release version [1]? 2. There is a typo: s/stuido/studio/: + # The major visual stuido that is suppored has nmake version >= 14.20 and < 15. There is something in the current code that I think should be also updated. The code for _GetVisualStudioVersion contains: if ($major > 14) { carp "The determined version of Visual Studio is newer than the latest supported version. Returning the latest supported version instead."; return '14.00'; } Shouldn't the returned value be '14.20' for Visual Studio 2019? Regards, Juan José Santamaría Flecha [1] https://docs.microsoft.com/en-us/visualstudio/releases/2019/history#release-dates-and-build-numbers
Re: MSVC Build support with visual studio 2019
On Wed, Mar 27, 2019 at 11:42 AM Haribabu Kommi wrote: > > On Wed, Mar 27, 2019 at 3:03 AM Andrew Dunstan < > andrew.duns...@2ndquadrant.com> wrote: > >> >> On 3/20/19 8:36 PM, Haribabu Kommi wrote: >> > Hi Hackers, >> > >> > Here I attached a patch that supports building of PostgreSQL with VS >> 2019. >> > VS 2019 is going to release on Apr 2nd 2019, it will be good if version >> 12 >> > supports compiling. The attached for is for review, it may needs some >> > updates >> > once the final version is released. >> > >> > Commit d9dd406fe281d22d5238d3c26a7182543c711e74 has reduced the >> > minimum visual studio support to 2013 to support C99 standards, >> > because of this >> > reason, the current attached patch cannot be backpatched as it is. >> > >> > I can provide a separate back branches patch later once this patch >> > comes to a stage of commit. Currently all the supported branches are >> > possible to compile with VS 2017. >> > >> > comments? >> > >> > >> >> >> I have verified that this works with VS2019. >> >> >> There are a few typos in the comments that need cleaning up. >> > > Thanks for the review. > > I corrected the typos in the comments, hopefully I covered everything. > Attached is the updated patch. Once the final VS 2019, I will check the > patch if it needs any more updates. > Visual Studio 2019 is officially released. There is no major change in the patch, except some small comments update. Also attached patches for the back branches also. Regards, Haribabu Kommi Fujitsu Australia From 6b21a229400bae51b225dd96d68249d2a61d9ac2 Mon Sep 17 00:00:00 2001 From: Hari Babu Date: Fri, 5 Apr 2019 10:15:57 +1100 Subject: [PATCH] support building with visual studio 2019 --- doc/src/sgml/install-windows.sgml | 21 src/tools/msvc/MSBuildProject.pm | 25 +++ src/tools/msvc/README | 12 +- src/tools/msvc/Solution.pm| 28 ++ src/tools/msvc/VSObjectFactory.pm | 40 +-- 5 files changed, 103 insertions(+), 23 deletions(-) diff --git a/doc/src/sgml/install-windows.sgml b/doc/src/sgml/install-windows.sgml index ac00ac8232..efa9f5dbc2 100644 --- a/doc/src/sgml/install-windows.sgml +++ b/doc/src/sgml/install-windows.sgml @@ -19,10 +19,10 @@ There are several different ways of building PostgreSQL on Windows. The simplest way to build with - Microsoft tools is to install Visual Studio Express 2017 + Microsoft tools is to install Visual Studio Express 2019 for Windows Desktop and use the included compiler. It is also possible to build with the full - Microsoft Visual C++ 2005 to 2017. + Microsoft Visual C++ 2005 to 2019. In some cases that requires the installation of the Windows SDK in addition to the compiler. @@ -69,19 +69,19 @@ 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 from Visual Studio Express 2017 + ways are to use the compilers from Visual Studio Express 2019 for Windows Desktop or those in the Windows SDK - 8.1, which are both free downloads from Microsoft. + 10, which are both free downloads from Microsoft. Both 32-bit and 64-bit builds are possible with the Microsoft Compiler suite. 32-bit PostgreSQL builds are possible with Visual Studio 2005 to - Visual Studio 2017 (including Express editions), - as well as standalone Windows SDK releases 6.0 to 8.1. + Visual Studio 2019 (including Express editions), + as well as standalone Windows SDK releases 6.0 to 10. 64-bit PostgreSQL builds are supported with - Microsoft Windows SDK version 6.0a to 8.1 or + Microsoft Windows SDK version 6.0a to 10 or Visual Studio 2008 and above. Compilation is supported down to Windows XP and Windows Server 2003 when building with @@ -89,8 +89,9 @@ Visual Studio 2013. Building with Visual Studio 2015 is supported down to Windows Vista and Windows Server 2008. - Building with Visual Studio 2017 is supported - down to Windows 7 SP1 and Windows Server 2008 R2 SP1. + Building with Visual Studio 2017 and Visual Studio 2019 + are supported down to Windows 7 SP1 and + Windows Server 2008 R2 SP1. @@ -162,7 +163,7 @@ $ENV{MSBFLAGS}="/m"; 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 + version 10), available for download from https://www.microsoft.com/download;>. diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 47252533a1..3edb11b9b5 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -535,4 +535,29 @@ sub new return $self; } +package VC2019Project; + +# +# Package that encapsulates a Visual C++ 2019
Re: MSVC Build support with visual studio 2019
On Wed, Mar 27, 2019 at 3:03 AM Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > On 3/20/19 8:36 PM, Haribabu Kommi wrote: > > Hi Hackers, > > > > Here I attached a patch that supports building of PostgreSQL with VS > 2019. > > VS 2019 is going to release on Apr 2nd 2019, it will be good if version > 12 > > supports compiling. The attached for is for review, it may needs some > > updates > > once the final version is released. > > > > Commit d9dd406fe281d22d5238d3c26a7182543c711e74 has reduced the > > minimum visual studio support to 2013 to support C99 standards, > > because of this > > reason, the current attached patch cannot be backpatched as it is. > > > > I can provide a separate back branches patch later once this patch > > comes to a stage of commit. Currently all the supported branches are > > possible to compile with VS 2017. > > > > comments? > > > > > > > I have verified that this works with VS2019. > > > There are a few typos in the comments that need cleaning up. > Thanks for the review. I corrected the typos in the comments, hopefully I covered everything. Attached is the updated patch. Once the final VS 2019, I will check the patch if it needs any more updates. Regards, Haribabu Kommi Fujitsu Australia 0001-Support-building-with-visual-studio-2019_v2.patch Description: Binary data
Re: MSVC Build support with visual studio 2019
On 3/20/19 8:36 PM, Haribabu Kommi wrote: > Hi Hackers, > > Here I attached a patch that supports building of PostgreSQL with VS 2019. > VS 2019 is going to release on Apr 2nd 2019, it will be good if version 12 > supports compiling. The attached for is for review, it may needs some > updates > once the final version is released. > > Commit d9dd406fe281d22d5238d3c26a7182543c711e74 has reduced the > minimum visual studio support to 2013 to support C99 standards, > because of this > reason, the current attached patch cannot be backpatched as it is. > > I can provide a separate back branches patch later once this patch > comes to a stage of commit. Currently all the supported branches are > possible to compile with VS 2017. > > comments? > > I have verified that this works with VS2019. There are a few typos in the comments that need cleaning up. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: MSVC Build support with visual studio 2019
I On 3/25/19 3:44 PM, Andrew Dunstan wrote: > On 3/21/19 3:13 AM, Michael Paquier wrote: >> On Thu, Mar 21, 2019 at 12:45:57PM +1100, Haribabu Kommi wrote: >>> The commit f2ab389 is later back-patch to version till 9.3 in commit >>> 19acfd65. I guess that building the windows installer for all the >>> versions using the same visual studio is may be the reason behind >>> that back-patch. >> I did not remember this one, thanks for pointing it out. So my >> memories on that were incorrect. If it is possible to get the code to >> build with MSVC 2019 on all the supported branches, we could do so. > > > > VS2019 is currently in preview. I think we'd probably be better off > waiting until the full release. I don't know of any pressing urgency for > us to support it. > > I see Haribabu mentioned that in his original email. I'll take a look at verifying the patch. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: MSVC Build support with visual studio 2019
On 3/21/19 3:13 AM, Michael Paquier wrote: > On Thu, Mar 21, 2019 at 12:45:57PM +1100, Haribabu Kommi wrote: >> The commit f2ab389 is later back-patch to version till 9.3 in commit >> 19acfd65. I guess that building the windows installer for all the >> versions using the same visual studio is may be the reason behind >> that back-patch. > I did not remember this one, thanks for pointing it out. So my > memories on that were incorrect. If it is possible to get the code to > build with MSVC 2019 on all the supported branches, we could do so. VS2019 is currently in preview. I think we'd probably be better off waiting until the full release. I don't know of any pressing urgency for us to support it. cheers andrew -- Andrew Dunstanhttps://www.2ndQuadrant.com PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Re: MSVC Build support with visual studio 2019
On Thu, Mar 21, 2019 at 12:45:57PM +1100, Haribabu Kommi wrote: > The commit f2ab389 is later back-patch to version till 9.3 in commit > 19acfd65. I guess that building the windows installer for all the > versions using the same visual studio is may be the reason behind > that back-patch. I did not remember this one, thanks for pointing it out. So my memories on that were incorrect. If it is possible to get the code to build with MSVC 2019 on all the supported branches, we could do so. -- Michael signature.asc Description: PGP signature
Re: MSVC Build support with visual studio 2019
On Thu, Mar 21, 2019 at 12:31 PM Michael Paquier wrote: > On Thu, Mar 21, 2019 at 09:47:02AM +0900, Michael Paquier wrote: > > When it comes to support newer versions of MSVC, we have come up > > lately to backpatch that down to two stable versions but not further > > down (see f2ab389 for v10 and v9.6), so it looks sensible to target > > v11 and v10 as well if we were to do it today, and v11/v12 if we do it > > in six months per the latest trends. > > By the way, you mentioned upthread that all the branches can compile > with MSVC 2017, but that's not actually the case for 9.5 and 9.4 if > you don't back-patch f2ab389 further down. > The commit f2ab389 is later back-patch to version till 9.3 in commit 19acfd65. I guess that building the windows installer for all the versions using the same visual studio is may be the reason behind that back-patch. Regards, Haribabu Kommi Fujitsu Australia
Re: MSVC Build support with visual studio 2019
On Thu, Mar 21, 2019 at 09:47:02AM +0900, Michael Paquier wrote: > When it comes to support newer versions of MSVC, we have come up > lately to backpatch that down to two stable versions but not further > down (see f2ab389 for v10 and v9.6), so it looks sensible to target > v11 and v10 as well if we were to do it today, and v11/v12 if we do it > in six months per the latest trends. By the way, you mentioned upthread that all the branches can compile with MSVC 2017, but that's not actually the case for 9.5 and 9.4 if you don't back-patch f2ab389 further down. Or did you mean that the code as-is is compilable if the scripts are patched manually? -- Michael signature.asc Description: PGP signature
Re: MSVC Build support with visual studio 2019
On Thu, Mar 21, 2019 at 11:36:42AM +1100, Haribabu Kommi wrote: > I can provide a separate back branches patch later once this patch comes to > a stage of commit. Currently all the supported branches are possible to > compile with VS 2017. When it comes to support newer versions of MSVC, we have come up lately to backpatch that down to two stable versions but not further down (see f2ab389 for v10 and v9.6), so it looks sensible to target v11 and v10 as well if we were to do it today, and v11/v12 if we do it in six months per the latest trends. -- Michael signature.asc Description: PGP signature