mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2024-12-28 07:21:26 +03:00
Add resource file to Windows DLL
Add a resource file containing verison information for the Windows DLL. This is only used by the MSVC build for now.
This commit is contained in:
parent
790c230fcf
commit
d404919870
@ -22,6 +22,7 @@ AUTOCONF = .\config.msvc
|
||||
XML_NAME = xml2
|
||||
XML_BASENAME = lib$(XML_NAME)
|
||||
XML_SO = $(XML_BASENAME).dll
|
||||
XML_RES = $(XML_BASENAME).res
|
||||
XML_IMP = $(XML_BASENAME).lib
|
||||
XML_DEF = $(XML_BASENAME).def
|
||||
XML_A = $(XML_BASENAME)_a.lib
|
||||
@ -367,11 +368,13 @@ $(XML_OBJS_A_DLL) : $(XML_INTDIR_A_DLL)
|
||||
# Creates the export definition file (DEF) for libxml.
|
||||
$(XML_INTDIR)\$(XML_DEF) : $(XML_INTDIR) $(XML_DEF).src
|
||||
$(CPP) $(CPPFLAGS) $(XML_DEF).src > $(XML_INTDIR)\$(XML_DEF)
|
||||
$(XML_INTDIR)\$(XML_RES) : $(XML_INTDIR) libxml2.rc
|
||||
rc -Fo $(XML_INTDIR)\$(XML_RES) libxml2.rc
|
||||
|
||||
# Creates the libxml shared object.
|
||||
$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
|
||||
$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF) $(XML_INTDIR)\$(XML_RES)
|
||||
$(LD) $(LDFLAGS) /DLL \
|
||||
/IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(LIBS)
|
||||
/IMPLIB:$(BINDIR)\$(XML_IMP) /OUT:$(BINDIR)\$(XML_SO) $(XML_OBJS) $(XML_INTDIR)\$(XML_RES) $(LIBS)
|
||||
@$(_VC_MANIFEST_EMBED_DLL)
|
||||
|
||||
#$(BINDIR)\$(XML_SO) : $(BINDIR) $(XML_OBJS) $(XML_INTDIR)\$(XML_DEF)
|
||||
|
@ -280,6 +280,18 @@ function discoverVersion()
|
||||
vf.WriteLine("DYNRUNTIME=" + (dynruntime? "1" : "0"));
|
||||
}
|
||||
vf.Close();
|
||||
versionFile = "rcVersion.h"
|
||||
vf = fso.CreateTextFile(versionFile, true);
|
||||
vf.WriteLine("/*");
|
||||
vf.WriteLine(" " + versionFile);
|
||||
vf.WriteLine(" This file is generated automatically by " + WScript.ScriptName + ".");
|
||||
vf.WriteLine("*/");
|
||||
vf.WriteBlankLines(1);
|
||||
vf.WriteLine("#define LIBXML_MAJOR_VERSION " + verMajor);
|
||||
vf.WriteLine("#define LIBXML_MINOR_VERSION " + verMinor);
|
||||
vf.WriteLine("#define LIBXML_MICRO_VERSION " + verMicro);
|
||||
vf.WriteLine("#define LIBXML_DOTTED_VERSION " + "\"" + verMajor + "." + verMinor + "." + verMicro + "\"");
|
||||
vf.Close()
|
||||
}
|
||||
|
||||
/* Configures libxml. This one will generate xmlversion.h from xmlversion.h.in
|
||||
|
36
win32/libxml2.rc
Normal file
36
win32/libxml2.rc
Normal file
@ -0,0 +1,36 @@
|
||||
#include <winver.h>
|
||||
#include "rcVersion.h"
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION LIBXML_MAJOR_VERSION,LIBXML_MINOR_VERSION,LIBXML_MICRO_VERSION,0
|
||||
PRODUCTVERSION LIBXML_MAJOR_VERSION,LIBXML_MINOR_VERSION,LIBXML_MICRO_VERSION,0
|
||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG
|
||||
#else
|
||||
FILEFLAGS 0
|
||||
#endif
|
||||
FILEOS VOS__WINDOWS32
|
||||
FILETYPE VFT_DLL
|
||||
FILESUBTYPE VFT2_UNKNOWN // not used
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "04090000" /* Lang = US English, Charset = ASCII */
|
||||
BEGIN
|
||||
VALUE "FileDescription", "libxml2 library\0"
|
||||
VALUE "FileVersion", LIBXML_DOTTED_VERSION "\0"
|
||||
VALUE "InternalName", "libxml2.dll\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) Daniel Veillard\0"
|
||||
VALUE "LegalTrademarks", "\0"
|
||||
VALUE "OriginalFilename", "libxml2.dll\0"
|
||||
VALUE "ProductName", "libxml2\0"
|
||||
VALUE "ProductVersion", LIBXML_DOTTED_VERSION "\0"
|
||||
VALUE "Comments", "For more information visit http://xmlsoft.org/\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 0 /* US English, ASCII */
|
||||
END
|
||||
END
|
Loading…
Reference in New Issue
Block a user