[Xapian-devel] Resource version in php_xapian.dll (windows)
Daniel Ménard
Daniel.Menard at bdsp.tm.fr
Wed Jun 13 17:26:33 BST 2007
(following my mail in xapian-discuss on 11.06)
I revisited my resource file and came up with a much simpler solution.
I'm now using the new version.h file (no need to duplicate version
strings) and add php-src to the include path given to rc.exe so I can
get the precise php version.
On my windows, the resulting dll appears as
"Xapian 1.0.1 bindings for PHP 5.2.2"
Here is what I changed:
- In win32/Makefile, target COPYMAKFILES, added:
if exist $(XAPIAN_BINDINGS) copy version.rc $(XAPIAN_BINDINGS)\php
- In win32/win32_bindings_php.mak:
added version.res to LIB_XAPIAN_OBJS
LIB_XAPIAN_OBJS= ".\xapian_wrap.obj" ".\version.res"
added a rule to build version.res from version.rc:
".\version.res": version.rc
$(RSC) /v \
/fo version.res \
/I "$(XAPIAN_CORE_REL_PHP)\include" \
/I "$(PHP_SRC_DIR)\main" \
/d PHP_MAJOR_VERSION="\"$(PHP_MAJOR_VERSION)\"" \
version.rc
- and here is the resource file I use (new file "version.rc" in win32):
#include "winres.h"
#include "xapian\version.h"
#include "php_version.h"
VS_VERSION_INFO VERSIONINFO
FILEVERSION XAPIAN_MAJOR_VERSION,XAPIAN_MINOR_VERSION,XAPIAN_REVISION
PRODUCTVERSION XAPIAN_MAJOR_VERSION,XAPIAN_MINOR_VERSION,XAPIAN_REVISION
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS VS_FF_DEBUG
#else
FILEFLAGS 0x0L
#endif
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "ProductName", "Xapian"
VALUE "ProductVersion", XAPIAN_VERSION
VALUE "FileDescription", "Xapian " XAPIAN_VERSION "
bindings for PHP " PHP_VERSION
VALUE "LegalCopyright", "Copyright (C) 2007 Xapian"
VALUE "FileVersion", XAPIAN_VERSION
VALUE "URL", "http://www.xapian.org/"
VALUE "LegalTrademarks", "Xapian is an Open Source Search
Engine Library released under the GPL."
END
END
END
Is there a chance for this to be incorporated in future versions of
windows makefiles...?
(after proper checking by someone more competent than me, of course!)
Cheers,
--
Daniel Ménard
More information about the Xapian-devel
mailing list