diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 9eea09d78a..c981e7ee15 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 4279a9a19d..7f2b36071d 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 e69aa8892b..5d7c64a5e5 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 e5e85f4742..2b31e48ef2 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 bd4ebe1174..429a2091c6 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 4fe67b97ad..fe260ca1fc 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 76cc01c819..daba6c13c7 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 adcdb27368..141136a524 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 0885a897e6..e69862e882 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 9f7a09c6fc..e4af05f631 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 0eeabd3803..dbc7d0ade2 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 5efc17c4df..fd3371ef2d 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 0000000000..a58ee432b5 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 0000000000..17bad79303 --- /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_