Re: Building psqlODBC installers

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Craig Ringer <craig(at)2ndquadrant(dot)com>, "Inoue, Hiroshi" <inoue(at)tpf(dot)co(dot)jp>
Cc: "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>, Hiroshi Saito <hiroshi(at)winpg(dot)jp>, Dave Page <dpage(at)pgadmin(dot)org>
Subject: Re: Building psqlODBC installers
Date: 2014-06-17 16:29:20
Message-ID: 53A06CE0.2070907@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

On 06/16/2014 07:00 PM, Heikki Linnakangas wrote:
> I'll try to whip the MSbuild system into shape, so that it can build all
> the installers in one command. I'd also like to remove the dependency to
> PowerShell. Surely plain MSBuild can do what we want, so let's avoid the
> extra dependency if we can.

Ok, I came up with the attached. To build, just type:

MSBuild

at the top level of the source tree. This builds all four versions of
the driver: x86_ANSI, x86_Unicode, x64_ANSI and x64_Unicode, and also
builds the installers, both 32-bit and 64-bit versions.

The build can be configured by copying
winbuild/configuration-defaults.props file as
winbuild/configuration-local.props, and modifying as needed.

This completely removes all the other methods to build on Windows: the
NMake files, the PowerShell scripts, the .bat files and the plain
.vcproj/.sln files at the top level.

The main project file that "MSBuild" launches is called winbuild.proj. I
used winbuild/platformbuild.vcxproj as the model for winbuild.proj, but
it has been heavily modified.

There are some rough edges: building without MSDTC support doesn't work,
for example. But the default configuration works. I'm using Microsoft
Windows SDK 7.1 in my system, I haven't tested this with other SDK or
Visual Studio versions.

One notable change over the existing powershell system is that the this
extracts the driver's version number from version.h, while the
powershell scripts did it the other way 'round. This is better, because
now you don't need to modify both files when bumping the version number.

Question: Is everyone OK with this approach? Does this work for the
SDK/compiler versions that you are actively using? If you have a problem
with this, please speak up now. If there's some feature or configuration
that's missing, I can work to add that, as long as we agree on this
general direction of replacing all the other build mechanisms with plain
MSBuild files.

- Heikki

Attachment Content-Type Size
winbuild-1.patch text/x-diff 162.1 KB

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Jade Koskela 2014-06-17 19:07:44 Re: Problem in SQLFreeHandle (Statement)
Previous Message John Smith 2014-06-17 16:12:07 Re: Precision problems with storage of float/double