Обсуждение: Win32 Version patch

Поиск
Список
Период
Сортировка

Win32 Version patch

От
"Dave Page"
Дата:
Evening committers,

Any ideas when Magnus' win32 version numbering patch is likely to get
applied?

Regards, Dave.

Re: Win32 Version patch

От
Bruce Momjian
Дата:
Dave Page wrote:
> Evening committers,
>
> Any ideas when Magnus' win32 version numbering patch is likely to get
> applied?

Good question.  Last I saw it it was quite large.  Magnus, would you
post a new version so we can look it over again.  I have no problem with
the binary file you suggested.

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Win32 Version patch

От
"Magnus Hagander"
Дата:
> Dave Page wrote:
> > Evening committers,
> >
> > Any ideas when Magnus' win32 version numbering patch is
> likely to get
> > applied?
>
> Good question.  Last I saw it it was quite large.  Magnus,
> would you post a new version so we can look it over again.  I
> have no problem with the binary file you suggested.

Not really, since I haven't changed anything. But I can send the same
patch again. Last time I sent it there were no comments, so I knew of
nothing further to change. If there are more changes wanted, just tell
me what to change...

The only remaining discussion I recall was possibly moving of the ico
file to a different directory. Which I said I'd happily leave up to the
committers :-) If you tell me where you want it I can of course create a
new patch which uses those dirs... But I don't feel up to deciding about
new directories myself ;-)

//Magnus


Вложения

Re: Win32 Version patch

От
"Dave Page"
Дата:

> -----Original Message-----
> From: Magnus Hagander [mailto:mha@sollentuna.net]
> Sent: 02 September 2004 09:47
> To: Bruce Momjian; Dave Page
> Cc: PostgreSQL-patches
> Subject: RE: [PATCHES] Win32 Version patch
>
> But I can send
> the same patch again.

Line 398 should probably be

+ PGFILEDESC=PostgreSQL utility

And not

+ PGFILEDESC=PostgreSQL unitility

Good word though :-)

/D

Re: Win32 Version patch

От
Bruce Momjian
Дата:
Your patch has been added to the PostgreSQL unapplied patches list at:

    http://momjian.postgresql.org/cgi-bin/pgpatches

It will be applied as soon as one of the PostgreSQL committers reviews
and approves it.

If only psql uses the ico file right now, let's leave it in psql
directory.  We can always move it later.

---------------------------------------------------------------------------


Magnus Hagander wrote:
> > Dave Page wrote:
> > > Evening committers,
> > >
> > > Any ideas when Magnus' win32 version numbering patch is
> > likely to get
> > > applied?
> >
> > Good question.  Last I saw it it was quite large.  Magnus,
> > would you post a new version so we can look it over again.  I
> > have no problem with the binary file you suggested.
>
> Not really, since I haven't changed anything. But I can send the same
> patch again. Last time I sent it there were no comments, so I knew of
> nothing further to change. If there are more changes wanted, just tell
> me what to change...
>
> The only remaining discussion I recall was possibly moving of the ico
> file to a different directory. Which I said I'd happily leave up to the
> committers :-) If you tell me where you want it I can of course create a
> new patch which uses those dirs... But I don't feel up to deciding about
> new directories myself ;-)
>
> //Magnus
>

Content-Description: win32ver_2.patch

[ Attachment, skipping... ]

Content-Description: pgsql.ico

[ Attachment, skipping... ]

Content-Description: win32ver.rc

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: Win32 Version patch

От
Bruce Momjian
Дата:
Patch applied.  Thanks.

I made the wording correction suggested by Dave Page.

Cleaned up patch attached.  I think the impact is minimal as I renamed
some things and moved the binary description up to the top of the
Makefile so it looks like a comment.

---------------------------------------------------------------------------


Magnus Hagander wrote:
> > Dave Page wrote:
> > > Evening committers,
> > >
> > > Any ideas when Magnus' win32 version numbering patch is
> > likely to get
> > > applied?
> >
> > Good question.  Last I saw it it was quite large.  Magnus,
> > would you post a new version so we can look it over again.  I
> > have no problem with the binary file you suggested.
>
> Not really, since I haven't changed anything. But I can send the same
> patch again. Last time I sent it there were no comments, so I knew of
> nothing further to change. If there are more changes wanted, just tell
> me what to change...
>
> The only remaining discussion I recall was possibly moving of the ico
> file to a different directory. Which I said I'd happily leave up to the
> committers :-) If you tell me where you want it I can of course create a
> new patch which uses those dirs... But I don't feel up to deciding about
> new directories myself ;-)
>
> //Magnus
>

Content-Description: win32ver_2.patch

[ Attachment, skipping... ]

Content-Description: pgsql.ico

[ Attachment, skipping... ]

Content-Description: win32ver.rc

[ Attachment, skipping... ]

>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
Index: src/Makefile.global.in
===================================================================
RCS file: /cvsroot/pgsql-server/src/Makefile.global.in,v
retrieving revision 1.196
diff -c -c -r1.196 Makefile.global.in
*** src/Makefile.global.in    1 Oct 2004 02:06:52 -0000    1.196
--- src/Makefile.global.in    5 Oct 2004 19:24:17 -0000
***************
*** 386,391 ****
--- 386,408 ----
  %.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

Index: src/backend/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/Makefile,v
retrieving revision 1.105
diff -c -c -r1.105 Makefile
*** src/backend/Makefile    4 Oct 2004 13:43:54 -0000    1.105
--- src/backend/Makefile    5 Oct 2004 19:24:18 -0000
***************
*** 8,13 ****
--- 8,14 ----
  #
  #-------------------------------------------------------------------------

+ PGFILEDESC = "PostgreSQL Database Backend"
  subdir = src/backend
  top_builddir = ../..
  include $(top_builddir)/src/Makefile.global
***************
*** 60,70 ****

  ifeq ($(PORTNAME), win32)

! postgres: $(OBJS) $(DLLINIT) postgres.def libpostgres.a
      $(DLLTOOL) --dllname $@$(X) --output-exp $@.exp --def postgres.def
!     $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) -Wl,--base-file,$@.base $@.exp $(OBJS) $(LIBS)
      $(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def
!     $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) $@.exp $(OBJS) $(LIBS)
      rm -f $@.exp $@.base

  postgres.def: $(OBJS)
--- 61,71 ----

  ifeq ($(PORTNAME), win32)

! 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) $(WIN32RES) $(LIBS)
      $(DLLTOOL) --dllname $@$(X) --base-file $@.base --output-exp $@.exp --def postgres.def
!     $(CC) $(CFLAGS) $(LDFLAGS) -o $@$(X) $@.exp $(OBJS) $(WIN32RES) $(LIBS)
      rm -f $@.exp $@.base

  postgres.def: $(OBJS)
Index: src/bin/initdb/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/initdb/Makefile,v
retrieving revision 1.46
diff -c -c -r1.46 Makefile
*** src/bin/initdb/Makefile    4 Oct 2004 18:05:53 -0000    1.46
--- src/bin/initdb/Makefile    5 Oct 2004 19:24:21 -0000
***************
*** 9,21 ****
  #
  #-------------------------------------------------------------------------

  subdir = src/bin/initdb
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global

  override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)

! OBJS=    initdb.o

  all: submake-libpq submake-libpgport initdb

--- 9,22 ----
  #
  #-------------------------------------------------------------------------

+ 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 $(WIN32RES)

  all: submake-libpq submake-libpgport initdb

Index: src/bin/pg_controldata/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_controldata/Makefile,v
retrieving revision 1.10
diff -c -c -r1.10 Makefile
*** src/bin/pg_controldata/Makefile    4 Oct 2004 13:43:55 -0000    1.10
--- src/bin/pg_controldata/Makefile    5 Oct 2004 19:24:21 -0000
***************
*** 8,20 ****
  #
  #-------------------------------------------------------------------------

  subdir = src/bin/pg_controldata
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global

  override CPPFLAGS += -DFRONTEND

! OBJS= pg_controldata.o pg_crc.o

  all: submake-libpgport pg_controldata

--- 8,21 ----
  #
  #-------------------------------------------------------------------------

+ 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 $(WIN32RES)

  all: submake-libpgport pg_controldata

Index: src/bin/pg_ctl/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_ctl/Makefile,v
retrieving revision 1.17
diff -c -c -r1.17 Makefile
*** src/bin/pg_ctl/Makefile    4 Oct 2004 18:05:54 -0000    1.17
--- src/bin/pg_ctl/Makefile    5 Oct 2004 19:24:21 -0000
***************
*** 9,21 ****
  #
  #-------------------------------------------------------------------------

  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

  all: submake-libpq submake-libpgport pg_ctl

--- 9,22 ----
  #
  #-------------------------------------------------------------------------

+ 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 $(WIN32RES)

  all: submake-libpq submake-libpgport pg_ctl

Index: src/bin/pg_dump/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_dump/Makefile,v
retrieving revision 1.55
diff -c -c -r1.55 Makefile
*** src/bin/pg_dump/Makefile    4 Oct 2004 20:32:58 -0000    1.55
--- src/bin/pg_dump/Makefile    5 Oct 2004 19:24:21 -0000
***************
*** 9,14 ****
--- 9,15 ----
  #
  #-------------------------------------------------------------------------

+ 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,23 ****

  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

  EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o

--- 18,24 ----

  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 $(WIN32RES)

  EXTRA_OBJS = $(top_builddir)/src/backend/parser/keywords.o

***************
*** 35,41 ****
      $(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)

  .PHONY: submake-backend
  submake-backend:
--- 36,42 ----
      $(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) $(WIN32RES) $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)

  .PHONY: submake-backend
  submake-backend:
Index: src/bin/pg_resetxlog/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pg_resetxlog/Makefile,v
retrieving revision 1.12
diff -c -c -r1.12 Makefile
*** src/bin/pg_resetxlog/Makefile    4 Oct 2004 13:43:57 -0000    1.12
--- src/bin/pg_resetxlog/Makefile    5 Oct 2004 19:24:21 -0000
***************
*** 8,20 ****
  #
  #-------------------------------------------------------------------------

  subdir = src/bin/pg_resetxlog
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global

  override CPPFLAGS += -DFRONTEND

! OBJS= pg_resetxlog.o pg_crc.o

  all: submake-libpgport pg_resetxlog

--- 8,21 ----
  #
  #-------------------------------------------------------------------------

+ 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 $(WIN32RES)

  all: submake-libpgport pg_resetxlog

Index: src/bin/pgevent/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pgevent/Makefile,v
retrieving revision 1.2
diff -c -c -r1.2 Makefile
*** src/bin/pgevent/Makefile    5 Oct 2004 17:26:39 -0000    1.2
--- src/bin/pgevent/Makefile    5 Oct 2004 19:24:22 -0000
***************
*** 6,11 ****
--- 6,13 ----
  #
  #-------------------------------------------------------------------------

+ PGFILEDESC = "Eventlog message formatter"
+ PGFILESHLIB = 1
  subdir = src/bin/pgevent
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global
***************
*** 20,38 ****
  pgevent.dll: $(OBJS) pgevent.def
      dllwrap --def pgevent.def -o $(NAME) $(OBJS)

! pgmsgevent.o: pgmsgevent.rc
!     windres pgmsgevent.rc -o pgmsgevent.o

  all-lib: $(NAME)

  install-lib: $(NAME)
      $(INSTALL_STLIB) $< $(DESTDIR)$(libdir)/$<
!
  uninstall-lib:
      rm -f $(DESTDIR)$(libdir)/$(NAME)

  clean distclean:
!     rm -f $(OBJS) $(NAME)

  clean-lib:
      rm -f $(NAME)
--- 22,40 ----
  pgevent.dll: $(OBJS) pgevent.def
      dllwrap --def pgevent.def -o $(NAME) $(OBJS)

! 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) win32ver.rc

  clean-lib:
      rm -f $(NAME)
Index: src/bin/pgevent/pgmsgevent.rc
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/pgevent/pgmsgevent.rc,v
retrieving revision 1.1
diff -c -c -r1.1 pgmsgevent.rc
*** src/bin/pgevent/pgmsgevent.rc    20 Jun 2004 01:32:49 -0000    1.1
--- src/bin/pgevent/pgmsgevent.rc    5 Oct 2004 19:24:22 -0000
***************
*** 1,2 ****
--- 1,4 ----
  LANGUAGE 0x9,0x1
  1 11 MSG00001.bin
+
+ #include "win32ver.rc"
Index: src/bin/psql/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/psql/Makefile,v
retrieving revision 1.50
diff -c -c -r1.50 Makefile
*** src/bin/psql/Makefile    4 Oct 2004 20:36:10 -0000    1.50
--- src/bin/psql/Makefile    5 Oct 2004 19:24:22 -0000
***************
*** 9,14 ****
--- 9,16 ----
  #
  #-------------------------------------------------------------------------

+ PGFILEDESC = "psql - the PostgreSQL interactive terminal"
+ PGAPPICON=win32
  subdir = src/bin/psql
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global
***************
*** 19,25 ****

  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

  FLEXFLAGS = -Cfe

--- 21,27 ----

  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 $(WIN32RES)

  FLEXFLAGS = -Cfe

Index: src/bin/scripts/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/bin/scripts/Makefile,v
retrieving revision 1.30
diff -c -c -r1.30 Makefile
*** src/bin/scripts/Makefile    4 Oct 2004 18:05:55 -0000    1.30
--- src/bin/scripts/Makefile    5 Oct 2004 19:24:22 -0000
***************
*** 9,14 ****
--- 9,15 ----
  #
  #-------------------------------------------------------------------------

+ PGFILEDESC = "PostgreSQL utility"
  subdir = src/bin/scripts
  top_builddir = ../../..
  include $(top_builddir)/src/Makefile.global
***************
*** 19,25 ****

  all: submake-libpq submake-backend $(PROGRAMS)

! %: %.o
      $(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)

  createdb: createdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
--- 20,26 ----

  all: submake-libpq submake-backend $(PROGRAMS)

! %: %.o $(WIN32RES)
      $(CC) $(CFLAGS) $^ $(libpq) $(LDFLAGS) $(LIBS) -o $@$(X)

  createdb: createdb.o common.o dumputils.o $(top_builddir)/src/backend/parser/keywords.o
***************
*** 61,65 ****

  clean distclean maintainer-clean:
      rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS))
!     rm -f common.o dumputils.o print.o mbprint.o
      rm -f dumputils.c print.c mbprint.c
--- 62,66 ----

  clean distclean maintainer-clean:
      rm -f $(addsuffix $(X), $(PROGRAMS)) $(addsuffix .o, $(PROGRAMS))
!     rm -f common.o dumputils.o print.o mbprint.o $(WIN32RES)
      rm -f dumputils.c print.c mbprint.c
Index: src/interfaces/ecpg/preproc/Makefile
===================================================================
RCS file: /cvsroot/pgsql-server/src/interfaces/ecpg/preproc/Makefile,v
retrieving revision 1.108
diff -c -c -r1.108 Makefile
*** src/interfaces/ecpg/preproc/Makefile    4 Oct 2004 13:43:58 -0000    1.108
--- src/interfaces/ecpg/preproc/Makefile    5 Oct 2004 19:24:24 -0000
***************
*** 8,13 ****
--- 8,14 ----
  #
  #-------------------------------------------------------------------------

+ PGFILEDESC = "ecpg - embedded SQL precompiler for C"
  subdir = src/interfaces/ecpg/preproc
  top_builddir = ../../../..
  include $(top_builddir)/src/Makefile.global
***************
*** 25,32 ****
  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

  all: submake-libpgport ecpg

--- 26,34 ----
  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 \
!     $(WIN32RES)

  all: submake-libpgport ecpg