Skip to content

Commit

Permalink
windows: support DLL version
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Apr 6, 2016
1 parent 84a3917 commit 64eb389
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -96,6 +96,7 @@ CMakeFiles
/doc/sphinx/
/lib/icudump
/lib/grn_ecmascript.out
/lib/metadata.rc
/coverage
/coverage.info
/test/unit/lib/*-*.*.*/
Expand Down
10 changes: 7 additions & 3 deletions configure.ac
Expand Up @@ -4,6 +4,9 @@ AC_INIT([groonga], groonga_version, [groonga@razil.jp])
AC_CONFIG_MACRO_DIR([m4])
AM_CONFIG_HEADER(config.h)

GRN_VERSION_RC=`echo groonga_version | sed -e 's/\./,/g'`
AC_SUBST(GRN_VERSION_RC)

AM_INIT_AUTOMAKE([foreign tar-pax subdir-objects])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])

Expand Down Expand Up @@ -205,9 +208,9 @@ AC_SUBST(NO_STRICT_ALIASING_CFLAGS)
AC_SUBST(NO_FLOAT_EQUAL_CFLAGS)
AC_SUBST(NO_BAD_FUNCTION_CAST_CFLAGS)

AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
LT_INIT([dlopen win32-dll])
LT_LANG([Windows Resource])
LT_OUTPUT

LT_CURRENT=0
LT_REVISION=0
Expand Down Expand Up @@ -1643,6 +1646,7 @@ GROONGA_HTTPD_DEFAULT_DATABASE_PATH="`
AC_SUBST(GROONGA_HTTPD_DEFAULT_DATABASE_PATH)

AC_OUTPUT([
lib/metadata.rc
packages/rpm/centos/groonga.spec
packages/apt/debian/groonga-keyring.postrm
packages/apt/env.sh
Expand Down
11 changes: 11 additions & 0 deletions lib/Makefile.am
Expand Up @@ -59,6 +59,17 @@ SUFFIXES = .lemon .c
$(LEMON) $<
endif

if PLATFORM_WIN32
libgroonga_la_SOURCES += \
metadata.rc

.rc.lo:
$(LIBTOOL) $(AM_V_lt) --tag=RC \
$(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=compile \
$(RC) $(RCFLAGS) -o $@ $<
endif

EXTRA_DIST = \
grn_ecmascript.c \
grn_ecmascript.h \
Expand Down
8 changes: 0 additions & 8 deletions lib/libgroonga.c

This file was deleted.

28 changes: 28 additions & 0 deletions lib/metadata.rc.in
@@ -0,0 +1,28 @@
#include <windows.h>

#define LANG_CODE_US_ENGLISH 0x0409
#define CHARSET_UNICODE 0x04b0
#define US_ENGLISH_UNICODE "040904b0"

VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,@GRN_VERSION_RC@
PRODUCTVERSION 0,@GRN_VERSION_RC@
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK US_ENGLISH_UNICODE
BEGIN
VALUE "CompanyName", "Groonga project"
VALUE "FileDescription", "Full text search engine library"
VALUE "FileVersion", "@GRN_VERSION@"
VALUE "InternalName", "libgroonga"
VALUE "OriginalFilename", "@GRN_DLL_FILENAME@"
VALUE "ProductName", "libgroonga"
VALUE "ProductVersion", "@GRN_VERSION@"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", LANG_CODE_US_ENGLISH, CHARSET_UNICODE
END
END

0 comments on commit 64eb389

Please sign in to comment.