Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda67c91

Browse files
committed
Add Win32 version info to client binaries.
Magnus Hagander
1 parentabef6b5 commitda67c91

File tree

14 files changed

+91
-28
lines changed

14 files changed

+91
-28
lines changed

‎src/Makefile.global.in

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# -*-makefile-*-
2-
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.196 2004/10/01 02:06:52 neilc Exp $
2+
# $PostgreSQL: pgsql/src/Makefile.global.in,v 1.197 2004/10/05 19:30:19 momjian Exp $
33

44
#------------------------------------------------------------------------------
55
# All PostgreSQL makefiles include this file and use the variables it sets,
@@ -386,6 +386,23 @@ TAS = @TAS@
386386
%.bz2:%
387387
$(BZIP2) -f$<
388388

389+
ifeq ($(PORTNAME),win32)
390+
# Build rules to add versioninfo resources to win32 binaries
391+
WIN32RES += win32ver.o
392+
ifeq ($(PGFILESHLIB),1)
393+
PGFTYPE=VFT_DLL
394+
else
395+
PGFTYPE=VFT_APP
396+
endif
397+
ifneq (,$(PGAPPICON))
398+
PGICOSTR=$(subst /,\/,IDI_ICON ICON \"$(top_builddir)/src/port/$(PGAPPICON).ico\")
399+
endif
400+
win32ver.rc:$(top_builddir)/src/port/win32ver.rc
401+
sed -e"s;FILEDESC;$(PGFILEDESC);" -e"s/VFT_APP/$(PGFTYPE)/" -e"s/_ICO_/$(PGICOSTR)/"$(top_builddir)/src/port/win32ver.rc> win32ver.rc
402+
win32ver.o: win32ver.rc
403+
windres -i win32ver.rc -o win32ver.o --include-dir=$(top_builddir)/src/include
404+
rm -f win32ver.rc
405+
endif
389406

390407
ifndefPGXS
391408

‎src/backend/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
#
55
# Copyright (c) 1994, Regents of the University of California
66
#
7-
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.105 2004/10/04 13:43:54 momjian Exp $
7+
# $PostgreSQL: pgsql/src/backend/Makefile,v 1.106 2004/10/05 19:30:20 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

11+
PGFILEDESC = "PostgreSQL Database Backend"
1112
subdir = src/backend
1213
top_builddir = ../..
1314
include$(top_builddir)/src/Makefile.global
@@ -60,11 +61,11 @@ endif # cygwin
6061

6162
ifeq ($(PORTNAME), win32)
6263

63-
postgres:$(OBJS)$(DLLINIT) postgres.def libpostgres.a
64+
postgres:$(OBJS)$(DLLINIT) postgres.def libpostgres.a$(WIN32RES)
6465
$(DLLTOOL) --dllname$@$(X) --output-exp$@.exp --def postgres.def
65-
$(CC)$(CFLAGS)$(LDFLAGS) -o$@$(X) -Wl,--base-file,$@.base$@.exp$(OBJS)$(LIBS)
66+
$(CC)$(CFLAGS)$(LDFLAGS) -o$@$(X) -Wl,--base-file,$@.base$@.exp$(OBJS)$(WIN32RES)$(LIBS)
6667
$(DLLTOOL) --dllname$@$(X) --base-file$@.base --output-exp$@.exp --def postgres.def
67-
$(CC)$(CFLAGS)$(LDFLAGS) -o$@$(X)$@.exp$(OBJS)$(LIBS)
68+
$(CC)$(CFLAGS)$(LDFLAGS) -o$@$(X)$@.exp$(OBJS)$(WIN32RES)$(LIBS)
6869
rm -f$@.exp$@.base
6970

7071
postgres.def:$(OBJS)

‎src/bin/initdb/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.46 2004/10/04 18:05:53 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/initdb/Makefile,v 1.47 2004/10/05 19:30:21 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

12+
PGFILEDESC = "initdb - initialize a new database cluster"
1213
subdir = src/bin/initdb
1314
top_builddir = ../../..
1415
include$(top_builddir)/src/Makefile.global
1516

1617
overrideCPPFLAGS := -DFRONTEND -I$(libpq_srcdir)$(CPPFLAGS)
1718

18-
OBJS=initdb.o
19+
OBJS=initdb.o$(WIN32RES)
1920

2021
all: submake-libpq submake-libpgport initdb
2122

‎src/bin/pg_controldata/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
#
55
# Copyright (c) 1998-2002, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.10 2004/10/04 13:43:55 momjian Exp $
7+
# $PostgreSQL: pgsql/src/bin/pg_controldata/Makefile,v 1.11 2004/10/05 19:30:21 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

11+
PGFILEDESC = "pg_controldata - reads the data from pg_control"
1112
subdir = src/bin/pg_controldata
1213
top_builddir = ../../..
1314
include$(top_builddir)/src/Makefile.global
1415

1516
overrideCPPFLAGS += -DFRONTEND
1617

17-
OBJS= pg_controldata.o pg_crc.o
18+
OBJS= pg_controldata.o pg_crc.o$(WIN32RES)
1819

1920
all: submake-libpgport pg_controldata
2021

‎src/bin/pg_ctl/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,18 @@
55
# Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.17 2004/10/04 18:05:54 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/pg_ctl/Makefile,v 1.18 2004/10/05 19:30:22 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

12+
PGFILEDESC = "pg_ctl - starts/stops/restarts the PostgreSQL server"
1213
subdir = src/bin/pg_ctl
1314
top_builddir = ../../..
1415
include$(top_builddir)/src/Makefile.global
1516

1617
overrideCPPFLAGS := -DFRONTEND -DDEF_PGPORT=$(DEF_PGPORT) -I$(libpq_srcdir)$(CPPFLAGS)
1718

18-
OBJS=pg_ctl.o
19+
OBJS=pg_ctl.o$(WIN32RES)
1920

2021
all: submake-libpq submake-libpgport pg_ctl
2122

‎src/bin/pg_dump/Makefile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.55 2004/10/04 20:32:58 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/pg_dump/Makefile,v 1.56 2004/10/05 19:30:23 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

12+
PGFILEDESC = "pg_dump/pg_restore/pg_dumpall - backup and restore PostgreSQL databases"
1213
subdir = src/bin/pg_dump
1314
top_builddir = ../../..
1415
include$(top_builddir)/src/Makefile.global
@@ -17,7 +18,7 @@ override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
1718

1819
OBJS=pg_backup_archiver.o pg_backup_db.o pg_backup_custom.o\
1920
pg_backup_files.o pg_backup_null.o pg_backup_tar.o\
20-
dumputils.o
21+
dumputils.o$(WIN32RES)
2122

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

@@ -35,7 +36,7 @@ pg_restore: pg_restore.o $(OBJS) $(libpq_builddir)/libpq.a
3536
$(CC)$(CFLAGS) pg_restore.o$(OBJS)$(EXTRA_OBJS)$(libpq)$(LDFLAGS)$(LIBS) -o$@$(X)
3637

3738
pg_dumpall: pg_dumpall.o dumputils.o$(libpq_builddir)/libpq.a
38-
$(CC)$(CFLAGS) pg_dumpall.o dumputils.o$(EXTRA_OBJS)$(libpq)$(LDFLAGS)$(LIBS) -o$@$(X)
39+
$(CC)$(CFLAGS) pg_dumpall.o dumputils.o$(EXTRA_OBJS)$(WIN32RES)$(libpq)$(LDFLAGS)$(LIBS) -o$@$(X)
3940

4041
.PHONY: submake-backend
4142
submake-backend:

‎src/bin/pg_resetxlog/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@
44
#
55
# Copyright (c) 1998-2002, PostgreSQL Global Development Group
66
#
7-
# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.12 2004/10/04 13:43:57 momjian Exp $
7+
# $PostgreSQL: pgsql/src/bin/pg_resetxlog/Makefile,v 1.13 2004/10/05 19:30:23 momjian Exp $
88
#
99
#-------------------------------------------------------------------------
1010

11+
PGFILEDESC = "pg_resetxlog - reset PostgreSQL WAL log"
1112
subdir = src/bin/pg_resetxlog
1213
top_builddir = ../../..
1314
include$(top_builddir)/src/Makefile.global
1415

1516
overrideCPPFLAGS += -DFRONTEND
1617

17-
OBJS= pg_resetxlog.o pg_crc.o
18+
OBJS= pg_resetxlog.o pg_crc.o$(WIN32RES)
1819

1920
all: submake-libpgport pg_resetxlog
2021

‎src/bin/pgevent/Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
#
77
#-------------------------------------------------------------------------
88

9+
PGFILEDESC = "Eventlog message formatter"
10+
PGFILESHLIB = 1
911
subdir = src/bin/pgevent
1012
top_builddir = ../../..
1113
include$(top_builddir)/src/Makefile.global
@@ -20,19 +22,19 @@ install: all install-lib
2022
pgevent.dll:$(OBJS) pgevent.def
2123
dllwrap --def pgevent.def -o$(NAME)$(OBJS)
2224

23-
pgmsgevent.o: pgmsgevent.rc
24-
windres pgmsgevent.rc -o pgmsgevent.o
25+
pgmsgevent.o: pgmsgevent.rc win32ver.rc
26+
windres pgmsgevent.rc -o pgmsgevent.o --include-dir=$(top_builddir)/src/include
2527

2628
all-lib:$(NAME)
2729

2830
install-lib:$(NAME)
2931
$(INSTALL_STLIB)$<$(DESTDIR)$(libdir)/$<
30-
32+
3133
uninstall-lib:
3234
rm -f$(DESTDIR)$(libdir)/$(NAME)
3335

3436
cleandistclean:
35-
rm -f$(OBJS)$(NAME)
37+
rm -f$(OBJS)$(NAME) win32ver.rc
3638

3739
clean-lib:
3840
rm -f$(NAME)

‎src/bin/pgevent/pgmsgevent.rc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
LANGUAGE 0x9,0x1
22
1 11 MSG00001.bin
3+
4+
#include "win32ver.rc"

‎src/bin/psql/Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@
55
# Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
66
# Portions Copyright (c) 1994, Regents of the University of California
77
#
8-
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.50 2004/10/04 20:36:10 momjian Exp $
8+
# $PostgreSQL: pgsql/src/bin/psql/Makefile,v 1.51 2004/10/05 19:30:24 momjian Exp $
99
#
1010
#-------------------------------------------------------------------------
1111

12+
PGFILEDESC = "psql - the PostgreSQL interactive terminal"
13+
PGAPPICON=win32
1214
subdir = src/bin/psql
1315
top_builddir = ../../..
1416
include$(top_builddir)/src/Makefile.global
@@ -19,7 +21,7 @@ override CPPFLAGS := -DFRONTEND -I$(libpq_srcdir) $(CPPFLAGS)
1921

2022
OBJS=command.o common.o help.o input.o stringutils.o mainloop.o copy.o\
2123
startup.o prompt.o variables.o large_obj.o print.o describe.o\
22-
psqlscan.o tab-complete.o mbprint.o
24+
psqlscan.o tab-complete.o mbprint.o$(WIN32RES)
2325

2426
FLEXFLAGS = -Cfe
2527

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp