diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 9eea09d78a16398a77216a2f4a9d421ee0d36e48..c981e7ee15a13f92d00088a9f27698beab520411 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -1,5 +1,5 @@ # -*-makefile-*- -# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.196 2004/10/01 02:06:52 neilc Exp $ +# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.197 2004/10/05 19:30:19 momjian Exp $ #------------------------------------------------------------------------------ # All PostgreSQL makefiles include this file and use the variables it sets, @@ -386,6 +386,23 @@ TAS = @TAS@ %.bz2: % $(BZIP2) -f $< +ifeq ($(PORTNAME),win32) +# Build rules to add versioninfo resources to win32 binaries +WIN32RES += win32ver.o +ifeq ($(PGFILESHLIB),1) +PGFTYPE=VFT_DLL +else +PGFTYPE=VFT_APP +endif +ifneq (,$(PGAPPICON)) +PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\") +endif +win32ver.rc: $(top_builddir)/src/port/win32ver.rc + sed -e "s;FILEDESC;$(PGFILEDESC);" -e "s/VFT_APP/$(PGFTYPE)/" -e "s/_ICO_/$(PGICOSTR)/" $(top_builddir)/src/port/win32ver.rc > win32ver.rc +win32ver.o: win32ver.rc + windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include + rm -f win32ver.rc +endif ifndef PGXS diff --git a/src/backend/Makefile b/src/backend/Makefile index 4279a9a19db2672f5634552b748a7f571e0cb2e4..7f2b36071d47d885c4845f9148ef9344044628fd 100644 --- a/src/backend/Makefile +++ b/src/backend/Makefile @@ -4,10 +4,11 @@ # # Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/backend/Makefile,v 1.105 2004/10/04 13:43:54 momjian Exp $ +# $PostgreSQL: pgsql/src/backend/Makefile,v 1.106 2004/10/05 19:30:20 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "PostgreSQL Database Backend" subdir = src/backend top_builddir = ../.. include $(top_builddir)/src/Makefile.global @@ -60,11 +61,11 @@ endif # cygwin ifeq ($(PORTNAME), win32) -postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a +postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a $(WIN32RES) $(DLLTOOL) --dllname $@$(X) --output-exp $@.exp --def postgres.def - $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(WIN32RES) $(LIBS) $(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def - $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) $@.exp $(OBJS) $(LIBS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) $@.exp $(OBJS) $(WIN32RES) $(LIBS) rm -f $@.exp $@.base postgres.def: $(OBJS) diff --git a/src/bin/initdb/Makefile b/src/bin/initdb/Makefile index e69aa8892b01e463462d6db1a3ca5eef5da57bf4..5d7c64a5e55dea290193719ee02ac30b7fe27841 100644 --- a/src/bin/initdb/Makefile +++ b/src/bin/initdb/Makefile @@ -5,17 +5,18 @@ # Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.46 2004/10/04 18:05:53 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.47 2004/10/05 19:30:21 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "initdb - initialize a new database cluster" subdir = src/bin/initdb top_builddir = ../../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS) -OBJS= initdb.o +OBJS= initdb.o $(WIN32RES) all: submake-libpq submake-libpgport initdb diff --git a/src/bin/pg_controldata/Makefile b/src/bin/pg_controldata/Makefile index e5e85f4742961513ea124a48b295fe92f2c69fe3..2b31e48ef206a1b553c0678f0801ec5e4dfc868a 100644 --- a/src/bin/pg_controldata/Makefile +++ b/src/bin/pg_controldata/Makefile @@ -4,17 +4,18 @@ # # Copyright (c) 1998-2002, PostgreSQL Global Development Group # -# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.10 2004/10/04 13:43:55 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.11 2004/10/05 19:30:21 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "pg_controldata - reads the data from pg_control" subdir = src/bin/pg_controldata top_builddir = ../../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS += -DFRONTEND -OBJS= pg_controldata.o pg_crc.o +OBJS= pg_controldata.o pg_crc.o $(WIN32RES) all: submake-libpgport pg_controldata diff --git a/src/bin/pg_ctl/Makefile b/src/bin/pg_ctl/Makefile index bd4ebe11743b66e19fed7b119705e36d7e1d6969..429a2091c6b0fedd72d9e186eb938b52fb9bb6e1 100644 --- a/src/bin/pg_ctl/Makefile +++ b/src/bin/pg_ctl/Makefile @@ -5,17 +5,18 @@ # Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.17 2004/10/04 18:05:54 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.18 2004/10/05 19:30:22 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "pg_ctl - starts/stops/restarts the PostgreSQL server" subdir = src/bin/pg_ctl top_builddir = ../../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS := -DFRONTEND -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir) $(CPPFLAGS) -OBJS= pg_ctl.o +OBJS= pg_ctl.o $(WIN32RES) all: submake-libpq submake-libpgport pg_ctl diff --git a/src/bin/pg_dump/Makefile b/src/bin/pg_dump/Makefile index 4fe67b97ad6841392e1202da0aa6cb17421cd92e..fe260ca1fcc8487982d6e16d29a60b6de49f72d4 100644 --- a/src/bin/pg_dump/Makefile +++ b/src/bin/pg_dump/Makefile @@ -5,10 +5,11 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.55 2004/10/04 20:32:58 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.56 2004/10/05 19:30:23 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "pg_dump/pg_restore/pg_dumpall - backup and restore PostgreSQL databases" subdir = src/bin/pg_dump top_builddir = ../../.. include $(top_builddir)/src/Makefile.global @@ -17,7 +18,7 @@ override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS) OBJS= pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o \ pg_backup_files.o pg_backup_null.o pg_backup_tar.o \ - dumputils.o + dumputils.o $(WIN32RES) EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o @@ -35,7 +36,7 @@ pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a $(CC) $(CFLAGS) pg_restore.o $(OBJS) $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X) pg_dumpall: pg_dumpall.o dumputils.o $(libpq_builddir)/libpq.a - $(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X) + $(CC) $(CFLAGS) pg_dumpall.o dumputils.o $(EXTRA_OBJS) $(WIN32RES) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X) .PHONY: submake-backend submake-backend: diff --git a/src/bin/pg_resetxlog/Makefile b/src/bin/pg_resetxlog/Makefile index 76cc01c81940c45ae48b3f84ed3f6522e8f9520a..daba6c13c7e1571e1285fbd1d1ee21071f795890 100644 --- a/src/bin/pg_resetxlog/Makefile +++ b/src/bin/pg_resetxlog/Makefile @@ -4,17 +4,18 @@ # # Copyright (c) 1998-2002, PostgreSQL Global Development Group # -# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.12 2004/10/04 13:43:57 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.13 2004/10/05 19:30:23 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "pg_resetxlog - reset PostgreSQL WAL log" subdir = src/bin/pg_resetxlog top_builddir = ../../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS += -DFRONTEND -OBJS= pg_resetxlog.o pg_crc.o +OBJS= pg_resetxlog.o pg_crc.o $(WIN32RES) all: submake-libpgport pg_resetxlog diff --git a/src/bin/pgevent/Makefile b/src/bin/pgevent/Makefile index adcdb27368baad9f4c069ec298e367fd685d8a5e..141136a5248a6f68fdb3d2c6944e926eee7256d4 100644 --- a/src/bin/pgevent/Makefile +++ b/src/bin/pgevent/Makefile @@ -6,6 +6,8 @@ # #------------------------------------------------------------------------- +PGFILEDESC = "Eventlog message formatter" +PGFILESHLIB = 1 subdir = src/bin/pgevent top_builddir = ../../.. include $(top_builddir)/src/Makefile.global @@ -20,19 +22,19 @@ install: all install-lib pgevent.dll: $(OBJS) pgevent.def dllwrap --def pgevent.def -o $(NAME) $(OBJS) -pgmsgevent.o: pgmsgevent.rc - windres pgmsgevent.rc -o pgmsgevent.o +pgmsgevent.o: pgmsgevent.rc win32ver.rc + windres pgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_builddir)/src/include all-lib: $(NAME) install-lib: $(NAME) $(INSTALL_STLIB) $< $(DESTDIR)$(libdir)/$< - + uninstall-lib: rm -f $(DESTDIR)$(libdir)/$(NAME) clean distclean: - rm -f $(OBJS) $(NAME) + rm -f $(OBJS) $(NAME) win32ver.rc clean-lib: rm -f $(NAME) diff --git a/src/bin/pgevent/pgmsgevent.rc b/src/bin/pgevent/pgmsgevent.rc index 0885a897e6f8c8941aa9a6ce627e4f9caa1e9196..e69862e882c7e3bc05635a49c54e773a56c714e1 100644 --- a/src/bin/pgevent/pgmsgevent.rc +++ b/src/bin/pgevent/pgmsgevent.rc @@ -1,2 +1,4 @@ LANGUAGE 0x9,0x1 1 11 MSG00001.bin + +#include "win32ver.rc" diff --git a/src/bin/psql/Makefile b/src/bin/psql/Makefile index 9f7a09c6fc11419853dbc3d3b61c76c3031d148d..e4af05f63104a63241b1e5e10a5e54bb6bd4a8e6 100644 --- a/src/bin/psql/Makefile +++ b/src/bin/psql/Makefile @@ -5,10 +5,12 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.50 2004/10/04 20:36:10 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.51 2004/10/05 19:30:24 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "psql - the PostgreSQL interactive terminal" +PGAPPICON=win32 subdir = src/bin/psql top_builddir = ../../.. include $(top_builddir)/src/Makefile.global @@ -19,7 +21,7 @@ override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS) OBJS= command.o common.o help.o input.o stringutils.o mainloop.o copy.o \ startup.o prompt.o variables.o large_obj.o print.o describe.o \ - psqlscan.o tab-complete.o mbprint.o + psqlscan.o tab-complete.o mbprint.o $(WIN32RES) FLEXFLAGS = -Cfe diff --git a/src/bin/scripts/Makefile b/src/bin/scripts/Makefile index 0eeabd380370af0c9ae92c55742ef2004a8e1f5a..dbc7d0ade245b649e7a36b00c3a3c8a383227c99 100644 --- a/src/bin/scripts/Makefile +++ b/src/bin/scripts/Makefile @@ -5,10 +5,11 @@ # Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group # Portions Copyright (c) 1994, Regents of the University of California # -# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.30 2004/10/04 18:05:55 momjian Exp $ +# $PostgreSQL: pgsql/src/bin/scripts/Makefile,v 1.31 2004/10/05 19:30:25 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "PostgreSQL utility" subdir = src/bin/scripts top_builddir = ../../.. include $(top_builddir)/src/Makefile.global @@ -19,7 +20,7 @@ override CPPFLAGS := -DFRONTEND -I$(top_srcdir)/src/bin/pg_dump -I$(top_srcdir)/ all: submake-libpq submake-backend $(PROGRAMS) -%: %.o +%: %.o $(WIN32RES) $(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X) createdb: createdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o @@ -61,5 +62,5 @@ uninstall: clean distclean maintainer-clean: rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS)) - rm -f common.o dumputils.o print.o mbprint.o + rm -f common.o dumputils.o print.o mbprint.o $(WIN32RES) rm -f dumputils.c print.c mbprint.c diff --git a/src/interfaces/ecpg/preproc/Makefile b/src/interfaces/ecpg/preproc/Makefile index 5efc17c4df637f0f7785d477801199af1df25dbd..fd3371ef2ddb9812c9dcb0ae39e3d36b464caef1 100644 --- a/src/interfaces/ecpg/preproc/Makefile +++ b/src/interfaces/ecpg/preproc/Makefile @@ -4,10 +4,11 @@ # # Copyright (c) 1998-2002, PostgreSQL Global Development Group # -# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.108 2004/10/04 13:43:58 momjian Exp $ +# $PostgreSQL: pgsql/src/interfaces/ecpg/preproc/Makefile,v 1.109 2004/10/05 19:30:25 momjian Exp $ # #------------------------------------------------------------------------- +PGFILEDESC = "ecpg - embedded SQL precompiler for C" subdir = src/interfaces/ecpg/preproc top_builddir = ../../../.. include $(top_builddir)/src/Makefile.global @@ -25,8 +26,9 @@ override CFLAGS += -Wno-error endif override CFLAGS += $(PTHREAD_CFLAGS) -OBJS= preproc.o type.o ecpg.o ecpg_keywords.o output.o\ - keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o +OBJS= preproc.o type.o ecpg.o ecpg_keywords.o output.o \ + keywords.o c_keywords.o ../ecpglib/typename.o descriptor.o variable.o \ + $(WIN32RES) all: submake-libpgport ecpg diff --git a/src/port/win32.ico b/src/port/win32.ico new file mode 100644 index 0000000000000000000000000000000000000000..a58ee432b5037275c3f694b243efa0677017ddba Binary files /dev/null and b/src/port/win32.ico differ diff --git a/src/port/win32ver.rc b/src/port/win32ver.rc new file mode 100644 index 0000000000000000000000000000000000000000..17bad7930372da890754aefa7f6ba1f635baa1e8 --- /dev/null +++ b/src/port/win32ver.rc @@ -0,0 +1,31 @@ +#include +#include "pg_config.h" + +VS_VERSION_INFO VERSIONINFO + FILEVERSION 7,4,999,999 + PRODUCTVERSION 7,4,999,999 + FILEFLAGSMASK 0x17L + FILEFLAGS 0x0L + FILEOS VOS_NT_WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "000004b0" + BEGIN + VALUE "CompanyName", "PostgreSQL Global Development Group" + VALUE "FileDescription", FILEDESC + VALUE "FileVersion", PG_VERSION + VALUE "LegalCopyright", "Portions Copyright (C) 1996-2004 PostgreSQL Global Development Group. Portions Copyright (C) 1994, Regents of the University of California." + VALUE "ProductName", "PostgreSQL" + VALUE "ProductVersion", PG_VERSION + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0, 1200 + END +END + +_ICO_