From: Bruno Haible Date: Wed, 13 Mar 2019 23:01:04 +0000 (+0100) Subject: libtextstyle: Add metainformation for Windows. X-Git-Tag: v0.20~132 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25342a4b854bf1935863d32a2b610478f58eeed1;p=thirdparty%2Fgettext.git libtextstyle: Add metainformation for Windows. * libtextstyle/lib/libtextstyle.rc: New file. * libtextstyle/lib/Makefile.am (EXTRA_DIST): Add it. (WOE32_LIBADD): New variable. (libtextstyle.res.lo): New rule. (libtextstyle_la_LIBADD, libtextstyle_la_DEPENDENCIES): Augment. --- diff --git a/libtextstyle/lib/Makefile.am b/libtextstyle/lib/Makefile.am index a698245ca..702d8d692 100644 --- a/libtextstyle/lib/Makefile.am +++ b/libtextstyle/lib/Makefile.am @@ -231,23 +231,33 @@ config.h: $(BUILT_SOURCES) $(srcdir)/libtextstyle.sym fi MOSTLYCLEANFILES += config.h config.h-t -# TEMPORARY -if false - -## Version information according to Woe32 conventions. -#EXTRA_DIST += libtextstyle.rc -#if WOE32 -#WOE32_LIBADD = libtextstyle.res.lo -#libtextstyle.res.lo : $(srcdir)/libtextstyle.rc -# $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) `$(SHELL) $(top_srcdir)/build-aux/windres-options --escape $(VERSION)` -i $(srcdir)/libtextstyle.rc -o libtextstyle.res.lo --output-format=coff -#MOSTLYCLEANFILES += libtextstyle.res.lo -#else -#WOE32_LIBADD = -#endif -#libtextstyle_la_LIBADD += $(WOE32_LIBADD) -#libtextstyle_la_DEPENDENCIES += $(WOE32_LIBADD) - +# Version information according to Woe32 conventions. +EXTRA_DIST += libtextstyle.rc +if WOE32 +WOE32_LIBADD = libtextstyle.res.lo +# This rule is executed only on Woe32 systems. +# Use $(RC) with libtool, $(WINDRES) when not using libtool. +# The following sed expressions come from the windres-options script. They are +# inlined here, so that they can be written in a Makefile without requiring a +# temporary file. They must contain literal newlines rather than semicolons, +# so that they work with the sed-3.02 that is shipped with MSYS. +libtextstyle.res.lo: $(srcdir)/libtextstyle.rc + nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \ + sed_extract_major='/^[0-9]/{'$${nl}'s/^\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{'$${nl}'s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p'$${nl}q$${nl}'}'$${nl}'c\'$${nl}0$${nl}q; \ + $(LIBTOOL) --tag=RC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(RC) \ + "-DPACKAGE_VERSION_STRING=\\\"$(VERSION)\\\"" \ + "-DPACKAGE_VERSION_MAJOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_major"` \ + "-DPACKAGE_VERSION_MINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_minor"` \ + "-DPACKAGE_VERSION_SUBMINOR="`echo '$(VERSION)' | sed -n -e "$$sed_extract_subminor"` \ + -i $(srcdir)/libtextstyle.rc -o libtextstyle.res.lo --output-format=coff +MOSTLYCLEANFILES += libtextstyle.res.lo +else +WOE32_LIBADD = endif +libtextstyle_la_LIBADD += $(WOE32_LIBADD) +libtextstyle_la_DEPENDENCIES += $(WOE32_LIBADD) # Parametrization of the 'relocatable-lib-lgpl' module. AM_CPPFLAGS += -DDEPENDS_ON_LIBICONV=1 diff --git a/libtextstyle/lib/libtextstyle.rc b/libtextstyle/lib/libtextstyle.rc new file mode 100644 index 000000000..4536676e4 --- /dev/null +++ b/libtextstyle/lib/libtextstyle.rc @@ -0,0 +1,38 @@ +/* Resources for textstyle.dll */ + +#include + +VS_VERSION_INFO VERSIONINFO + FILEVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 + PRODUCTVERSION PACKAGE_VERSION_MAJOR,PACKAGE_VERSION_MINOR,PACKAGE_VERSION_SUBMINOR,0 + FILEFLAGSMASK 0x3fL /* VS_FFI_FILEFLAGSMASK */ +#ifdef _DEBUG + FILEFLAGS 0x1L /* VS_FF_DEBUG */ +#else + FILEFLAGS 0x0L +#endif + FILEOS 0x10004L /* VOS_DOS_WINDOWS32 */ + FILETYPE 0x2L /* VFT_DLL */ + FILESUBTYPE 0x0L /* VFT2_UNKNOWN */ +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "04090000" /* Lang = US English, Charset = ASCII */ + BEGIN + VALUE "Comments", "This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License version 3 or later. You should have received a copy of the GNU General Public License along with this library; if not, see \0" + VALUE "CompanyName", "Free Software Foundation\0" + VALUE "FileDescription", "GPLed libtextstyle for Windows\0" + VALUE "FileVersion", PACKAGE_VERSION_STRING "\0" + VALUE "InternalName", "textstyle.dll\0" + VALUE "LegalCopyright", "Copyright (C) 2006-2019\0" + VALUE "LegalTrademarks", "\0" + VALUE "OriginalFilename", "textstyle.dll\0" + VALUE "ProductName", "GNU libtextstyle: Text styling library\0" + VALUE "ProductVersion", PACKAGE_VERSION_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0 /* US English, ASCII */ + END +END