postgresql/src/port/win32ver.rc
Peter Eisentraut 0a42a2e9ce Remove win32ver.rc from version_stamp.pl
This removes another relic from the old nmake-based Windows build.
version_stamp.pl put version number information into win32ver.rc.  But
win32ver.rc already gets other version number information from the
preprocessor at build time, so it would make more sense if all version
number information would be handled in the same way and we don't have
two places that do it.

What we need for this is having the major version number and the minor
version number as separate integer symbols.  Both configure and
Solution.pm already have that logic, because they compute
PG_VERSION_NUM.  So we just keep all the logic there now.  Put the
minor version number into a new symbol PG_MINORVERSION_NUM.  Also, add
a symbol PG_MAJORVERSION_NUM, which is a number, alongside the
existing PG_MAJORVERSION, which is a string.

Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://www.postgresql.org/message-id/flat/1ee46ac4-a9b2-4531-bf54-5ec2e374634d@2ndquadrant.com
2020-03-10 11:21:41 +01:00

36 lines
1.1 KiB
Plaintext

#include <winver.h>
#include "pg_config.h"
// https://docs.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource
VS_VERSION_INFO VERSIONINFO
FILEVERSION PG_MAJORVERSION_NUM,0,PG_MINORVERSION_NUM,0
PRODUCTVERSION PG_MAJORVERSION_NUM,0,PG_MINORVERSION_NUM,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0x0L
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904B0" // U.S. English, Unicode
BEGIN
VALUE "CompanyName", "PostgreSQL Global Development Group"
VALUE "FileDescription", FILEDESC
VALUE "FileVersion", PG_VERSION
VALUE "InternalName", _INTERNAL_NAME_
VALUE "LegalCopyright", "Portions Copyright (c) 1996-2020, PostgreSQL Global Development Group. Portions Copyright (c) 1994, Regents of the University of California."
VALUE "OriginalFileName", _ORIGINAL_NAME_
VALUE "ProductName", "PostgreSQL"
VALUE "ProductVersion", PG_VERSION
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x0409, 1200 // U.S. English, Unicode
END
END
_ICO_