win32 version info

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "PostgreSQL-patches" <pgsql-patches(at)postgresql(dot)org>
Cc: <gavinmroy(at)gmail(dot)com>
Subject: win32 version info
Date: 2004-07-26 18:08:02
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE34BF2E@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

This patch along with the attached files (.tar.gz unpacks in src/) adds
VERSIONINFO to all binaries under win32. This is generally considered a
good thing (actually, I think it's required to be allowed to call your
program "Designed for Microsoft Windows". We're not going to get that
anyway, but it gives those of you who don't know about it an idea of how
common/good it is).

The string-based version number is read from whatever is in pg_config.h.

The patch also requires a new define in pg_config.h along the line of:
#define PG_VERSION_NUMERIC 7,4,999,999
(note - commas, not dots)

This is because the versioninfo structure has a 4-number numeric field
that is the one that is used when comparing versions.

As pg_config.h is generated from configure.in, I know the change has to
be made there. And since I'm not that experienced with autoconf, I'm
hoping the eventual committer can add this. I assume just a simple
define right along the line where it sets the version string would be
the easiest. It just has to be bumped on new releases (so it should
probably go in the "what do we do when doing a new release" list as
well).

As the number has to be numerical and should always be increasing, I set
the devel verison number to 7,4,999,999. That should get us well out of
the way of any future 7.4 releases, and when we actually release 7.5 we
change it to 7,5,0,0. I don't think we need/should increase the version
between beta builds etc - let's just focus on the actual releases.

The patch also makes sure that the already existing versioninfo resource
available to libpq.dll is actually compiled and linked when building
with mingw. This one can't use the same #include to get the actual
version number because we don't have the necessary files on MSVC
installs.

Finally, the patch adds an elephant icon to psql.exe (so it'll go nicely
in the start menu for example). This icon was taken from Gavin Roys
postgresql artwork page (http://pgsql.gavinroy.com/art).

//Magnus

Attachment Content-Type Size
resource.tar.gz application/x-gzip 15.5 KB
resource.patch application/octet-stream 17.7 KB

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Peter Eisentraut 2004-07-26 18:28:57 Re: win32 version info
Previous Message Peter Eisentraut 2004-07-26 15:59:20 Re: pgxs: build infrastructure for extensions v4