Skip to content

Commit

Permalink
Added VersionInfo to all OpenHPI exe and dll files
Browse files Browse the repository at this point in the history
  • Loading branch information
avpak committed May 8, 2011
1 parent bb676b9 commit 051bab5
Show file tree
Hide file tree
Showing 26 changed files with 328 additions and 26 deletions.
8 changes: 7 additions & 1 deletion Makefile.mingw32.def
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ ARCH := x86
#ARCH := amd64

VERSION := 2.17.0
# This is for resource compiler
BINARY_VERSION := 2,17,0,0

############################################################################
TOOLCHAIN_PATH := /home/avpak/usr/cross/mingw32

CC := ${TOOLCHAIN_PATH}/bin/i386-mingw32-gcc
CXX := ${TOOLCHAIN_PATH}/bin/i386-mingw32-g++
AS := ${TOOLCHAIN_PATH}/bin/i386-mingw32-as
RC := ${TOOLCHAIN_PATH}/bin/i386-mingw32-windres

GLIB_DIR := /home/avpak/usr/cross/mingw32/i386-mingw32/glib-2.0

Expand All @@ -19,6 +22,9 @@ GTHREAD_LIBS := -L ${GLIB_DIR}/lib -lgthread-2.0
GMODULE_LIBS := -L ${GLIB_DIR}/lib -lgmodule-2.0
############################################################################

CPPFLAGS := -DVERSION=\"${VERSION}\" -D_WIN32_WINNT=0x0501 -DOH_DBG_MSGS -Wall
CPPFLAGS := -DVERSION=\"${VERSION}\" -D_WIN32_WINNT=0x0501 -DOH_DBG_MSGS
RCFLAGS := -DVERSION=\"${VERSION}\" -DBINARY_VERSION=${BINARY_VERSION} --use-temp-file
CFLAGS := -Wall
CXXFLAGS := -Wall
LDFLAGS := -no-undefined --enable-runtime-pseudo-reloc

2 changes: 1 addition & 1 deletion README.windows
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Build instructions:
- Enter OpenHPI source tree root directory.
- Modify Makefile.mingw32.def:
-- ARCH in order to point architecture for produced binaries
-- TOOLCHAIN_PATH in order that CC, CXX and AS point to correct files.
-- TOOLCHAIN_PATH in order that CC, CXX, AS and RC point to correct files.
-- GLIB_DIR: in order that GLIB_INCLUDES and GLIB_LIBS
point to valid directories with glib headers and libraries.
- Run "make -f Makefile.mingw32".
Expand Down
2 changes: 1 addition & 1 deletion baselib/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ AM_CPPFLAGS = -DG_LOG_DOMAIN=\"baselib\"
INCLUDES = \
@OPENHPI_INCLUDES@ -I$(top_srcdir)/transport -I$(top_srcdir)/marshal @OH_SSL_INCLUDES@

EXTRA_DIST = Makefile.mingw32
EXTRA_DIST = Makefile.mingw32 version.rc

lib_LTLIBRARIES = libopenhpi.la

Expand Down
9 changes: 7 additions & 2 deletions baselib/Makefile.mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ SRC := conf.c \
lock.c \
ohpi.cpp \
safhpi.cpp \
session.cpp
session.cpp \
version.rc

OBJ := $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC}))
OBJ := $(patsubst %.rc, %.o, $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC})))

DEFS := -DG_LOG_DOMAIN=\"baselib\"
DEFS += -DSAHPI_API="__declspec(dllexport)"
Expand All @@ -25,6 +26,7 @@ LIBS += -L ../marshal -lopenhpimarshal
CPPFLAGS += ${DEFS} ${INCLUDES}

.PHONY: all clean
.SUFFIXES: .rc

all : ${TARGET}

Expand All @@ -33,6 +35,9 @@ ${TARGET} : ${OBJ}
-Wl,--out-implib,${@:.dll=.a} \
-Wl,--output-def,${@:.dll=.def}

.rc.o:
${RC} ${RCFLAGS} $< $@

clean:
rm -f ${OBJ} ${TARGET} ${TARGET:.dll=.a} ${TARGET:.dll=.def}

32 changes: 32 additions & 0 deletions baselib/version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <winver.h>

LANGUAGE 0x09,0x01 // English(US)

VS_VERSION_INFO VERSIONINFO

FILEVERSION BINARY_VERSION
PRODUCTVERSION BINARY_VERSION
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN

BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // English(US), Multilingual
BEGIN
VALUE "Comments", ""
VALUE "CompanyName", "OpenHPI Community (http://openhpi.org/)"
VALUE "FileDescription", "OpenHPI Base Library (SAI-HPI-B.03.02 compliant)"
VALUE "FileVersion", VERSION
VALUE "InternalName", "libopenhpi"
VALUE "LegalCopyright", "OpenHPI is distrubuted under BSD license"
VALUE "OriginalFilename", "libopenhpi.dll"
VALUE "ProductName", "OpenHPI"
VALUE "ProductVersion", VERSION
END
END
END

2 changes: 1 addition & 1 deletion clients/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ INCLUDES = @OPENHPI_INCLUDES@
SUBDIRS = hpixml
DIST_SUBDIRS = hpixml

EXTRA_DIST = Makefile.mingw32
EXTRA_DIST = Makefile.mingw32 version.rc

COMMONLIBS = $(top_builddir)/baselib/libopenhpi.la

Expand Down
8 changes: 6 additions & 2 deletions clients/Makefile.mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ TARGETS := hpialarms.exe \
ohhandler.exe \
ohparam.exe

OBJS := $(patsubst %.exe, %.o, ${TARGETS}) clients.o
OBJS := $(patsubst %.exe, %.o, ${TARGETS}) clients.o version.o

DEFS := -DG_LOG_DOMAIN=\"client\"
DEFS += -DSAHPI_API="__declspec(dllimport)"
Expand All @@ -34,12 +34,16 @@ LIBS += -L ../utils -lopenhpiutils
CPPFLAGS += ${DEFS} ${INCLUDES}

.PHONY: all clean
.SUFFIXES: .rc

all : ${TARGETS}

%.exe : %.o clients.o
%.exe : %.o clients.o version.o
${CXX} -o $@ $^ ${LIBS}

.rc.o:
${RC} ${RCFLAGS} $< $@

clean:
rm -f ${OBJS} ${TARGETS} clients.o

2 changes: 1 addition & 1 deletion clients/hpixml/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ AM_CCASFLAGS = -DSCHEMA=\"$(srcdir)/schema.xsd\"

INCLUDES = @OPENHPI_INCLUDES@

EXTRA_DIST = Makefile.mingw32 schema.xsd
EXTRA_DIST = Makefile.mingw32 schema.xsd version.rc

bin_PROGRAMS = hpixml

Expand Down
9 changes: 7 additions & 2 deletions clients/hpixml/Makefile.mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ SRC := \
../clients.c \
hpi.cpp \
hpi_xml_writer.cpp \
schema.S \
main.cpp \
schema.S \
version.rc \
xml_writer.cpp

OBJ := $(patsubst %.S, %.o,$(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC} ) ) )
OBJ := $(patsubst %.rc, %.o, $(patsubst %.S, %.o,$(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC}))))

DEFS := -DG_LOG_DOMAIN=\"hpixml\" -DSCHEMA=\"schema.xsd\"

Expand All @@ -24,12 +25,16 @@ LIBS += -L ../../baselib -lopenhpi
CPPFLAGS += ${DEFS} ${INCLUDES}

.PHONY: all clean
.SUFFIXES: .rc

all : ${TARGET}

${TARGET} : ${OBJ}
${CXX} -o $@ $^ ${LIBS}

.rc.o:
${RC} ${RCFLAGS} $< $@

clean:
rm -f ${OBJ} ${TARGET}

32 changes: 32 additions & 0 deletions clients/hpixml/version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <winver.h>

LANGUAGE 0x09,0x01 // English(US)

VS_VERSION_INFO VERSIONINFO

FILEVERSION BINARY_VERSION
PRODUCTVERSION BINARY_VERSION
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN

BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // English(US), Multilingual
BEGIN
VALUE "Comments", ""
VALUE "CompanyName", "OpenHPI Community (http://openhpi.org/)"
VALUE "FileDescription", "OpenHPI XML Client"
VALUE "FileVersion", VERSION
VALUE "InternalName", "hpixml"
VALUE "LegalCopyright", "OpenHPI is distrubuted under BSD license"
VALUE "OriginalFilename", "hpixml.exe"
VALUE "ProductName", "OpenHPI"
VALUE "ProductVersion", VERSION
END
END
END

32 changes: 32 additions & 0 deletions clients/version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <winver.h>

LANGUAGE 0x09,0x01 // English(US)

VS_VERSION_INFO VERSIONINFO

FILEVERSION BINARY_VERSION
PRODUCTVERSION BINARY_VERSION
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN

BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // English(US), Multilingual
BEGIN
VALUE "Comments", ""
VALUE "CompanyName", "OpenHPI Community (http://openhpi.org/)"
VALUE "FileDescription", "OpenHPI Client"
VALUE "FileVersion", VERSION
VALUE "InternalName", ""
VALUE "LegalCopyright", "OpenHPI is distrubuted under BSD license"
VALUE "OriginalFilename", ""
VALUE "ProductName", "OpenHPI"
VALUE "ProductVersion", VERSION
END
END
END

2 changes: 1 addition & 1 deletion marshal/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ MAINTAINERCLEANFILES = Makefile.in *~

AM_CPPFLAGS = -DG_LOG_DOMAIN=\"marshal\"

EXTRA_DIST = Makefile.mingw32
EXTRA_DIST = Makefile.mingw32 version.rc

INCLUDES = @OPENHPI_INCLUDES@
# just to clear LIBS
Expand Down
9 changes: 7 additions & 2 deletions marshal/Makefile.mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ TARGET := libopenhpimarshal.dll

SRC := marshal.c \
marshal_hpi.c \
marshal_hpi_types.c
marshal_hpi_types.c \
version.rc

OBJ := $(patsubst %.c, %.o, ${SRC})
OBJ := $(patsubst %.rc, %.o, $(patsubst %.c, %.o, ${SRC}))

DEFS := -DG_LOG_DOMAIN=\"marshal\"

Expand All @@ -17,12 +18,16 @@ LIBS := ${GLIB_LIBS}
CPPFLAGS += ${DEFS} ${INCLUDES}

.PHONY: all clean
.SUFFIXES: .rc

all : ${TARGET}

${TARGET} : ${OBJ}
${CC} -shared -o $@ $^ ${LIBS}

.rc.o:
${RC} ${RCFLAGS} $< $@

clean:
rm -f ${OBJ} ${TARGET}

32 changes: 32 additions & 0 deletions marshal/version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <winver.h>

LANGUAGE 0x09,0x01 // English(US)

VS_VERSION_INFO VERSIONINFO

FILEVERSION BINARY_VERSION
PRODUCTVERSION BINARY_VERSION
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN

BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // English(US), Multilingual
BEGIN
VALUE "Comments", ""
VALUE "CompanyName", "OpenHPI Community (http://openhpi.org/)"
VALUE "FileDescription", "OpenHPI Marshal Library"
VALUE "FileVersion", VERSION
VALUE "InternalName", "libopenhpimarshal"
VALUE "LegalCopyright", "OpenHPI is distrubuted under BSD license"
VALUE "OriginalFilename", "libopenhpimarshal.dll"
VALUE "ProductName", "OpenHPI"
VALUE "ProductVersion", VERSION
END
END
END

3 changes: 2 additions & 1 deletion openhpid/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ DIST_SUBDIRS = t
EXTRA_DIST = \
openhpid.sh.in \
Makefile.mingw32 \
openhpid-win32.cpp
openhpid-win32.cpp \
version.rc

# daemon library
noinst_LTLIBRARIES = libopenhpidaemon.la
Expand Down
9 changes: 7 additions & 2 deletions openhpid/Makefile.mingw32
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ SRC := alarm.c \
session.c \
threaded.c \
server.cpp \
openhpid-win32.cpp
openhpid-win32.cpp \
version.rc

OBJ := $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC} ) )
OBJ := $(patsubst %.rc, %.o, $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, ${SRC})))

DEFS := -DG_LOG_DOMAIN=\"openhpid\"

Expand All @@ -32,12 +33,16 @@ LIBS += -L ../marshal -lopenhpimarshal
CPPFLAGS += ${DEFS} ${INCLUDES}

.PHONY: all clean
.SUFFIXES: .rc

all : ${TARGET}

${TARGET} : ${OBJ}
${CXX} -o $@ $^ ${LIBS}

.rc.o:
${RC} ${RCFLAGS} $< $@

clean:
rm -f ${OBJ} ${TARGET}

32 changes: 32 additions & 0 deletions openhpid/version.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#include <winver.h>

LANGUAGE 0x09,0x01 // English(US)

VS_VERSION_INFO VERSIONINFO

FILEVERSION BINARY_VERSION
PRODUCTVERSION BINARY_VERSION
FILEFLAGSMASK 0
FILEFLAGS 0
FILEOS VOS_NT_WINDOWS32
FILETYPE VFT_APP
FILESUBTYPE VFT2_UNKNOWN

BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4" // English(US), Multilingual
BEGIN
VALUE "Comments", ""
VALUE "CompanyName", "OpenHPI Community (http://openhpi.org/)"
VALUE "FileDescription", "OpenHPI Daemon"
VALUE "FileVersion", VERSION
VALUE "InternalName", "openhpid"
VALUE "LegalCopyright", "OpenHPI is distrubuted under BSD license"
VALUE "OriginalFilename", "openhpid.exe"
VALUE "ProductName", "OpenHPI"
VALUE "ProductVersion", VERSION
END
END
END

Loading

0 comments on commit 051bab5

Please sign in to comment.