/*
   Licensed under the MIT license:

   Copyright (c) 2024 Mladen Turk

   Permission is  hereby granted,  free of charge,  to any  person obtaining
   a  copy  of  this  software   and  associated  documentation  files  (the
   "Software"),  to  deal in  the  Software  without restriction,  including
   without  limitation the  rights  to use,  copy,  modify, merge,  publish,
   distribute, sublicense, and/or sell copies of the Software, and to permit
   persons  to whom  the Software  is  furnished to  do so,  subject to  the
   following conditions:

   The above copyright  notice and this permission notice  shall be included
   in all copies or substantial portions of the Software.

   THE  SOFTWARE  IS  PROVIDED  "AS  IS",  WITHOUT  WARRANTY  OF  ANY  KIND,
   EXPRESS  OR IMPLIED,  INCLUDING  BUT  NOT LIMITED  TO  THE WARRANTIES  OF
   MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
   NO EVENT SHALL THE AUTHORS OR  COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
   DAMAGES OR  OTHER LIABILITY, WHETHER  IN AN  ACTION OF CONTRACT,  TORT OR
   OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
   USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

#include <windows.h>

#define XML_DESCRIPTION \
  "Expat is a C library for parsing XML, started by James Clark. " \
  "Expat is a stream-oriented XML parser."

#define CPP_TOSTR_HELPER(n)     #n
#define CPP_TOSTR(n)            CPP_TOSTR_HELPER(n)


#define XML_MAJOR_VERSION       2
#define XML_MINOR_VERSION       7
#define XML_MICRO_VERSION       3
#if defined(_VENDOR_NUM)
# define XML_PATCH_VERSION      _VENDOR_NUM
#else
# define XML_PATCH_VERSION      0
#endif
#if defined(_VENDOR_SFX)
# define XML_VENDOR_SFX         CPP_TOSTR(_VENDOR_SFX)
#else
# define XML_VENDOR_SFX         ""
#endif

#define XML_VERSION_STRING \
                          CPP_TOSTR(XML_MAJOR_VERSION) "."  \
                          CPP_TOSTR(XML_MINOR_VERSION) "."  \
                          CPP_TOSTR(XML_MICRO_VERSION)      \
                          XML_VENDOR_SFX

#define XML_VERSION_STRING_CSV      XML_MAJOR_VERSION,      \
                                    XML_MINOR_VERSION,      \
                                    XML_MICRO_VERSION,      \
                                    XML_PATCH_VERSION


#ifdef XML_UNICODE_WCHAR_T
#define XML_DLL_BASENAME        "libexpatw-2"
#else
#define XML_DLL_BASENAME        "libexpat-2"
#endif
#define XML_COPYRIGHT           "MIT/X License"

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST  "libexpat.manifest"

VS_VERSION_INFO VERSIONINFO
 FILEVERSION XML_VERSION_STRING_CSV
 PRODUCTVERSION XML_VERSION_STRING_CSV
 FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
#ifdef _DEBUG
 FILEFLAGS 0x1L
#else
 FILEFLAGS 0x0L
#endif
 FILEOS VOS_NT_WINDOWS32
 FILETYPE VFT_DLL
 FILESUBTYPE 0x0L
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904b0"
    BEGIN
      VALUE "Comments",         XML_DESCRIPTION
      VALUE "CompanyName",      "Expat maintainers"
      VALUE "FileDescription",  "Expat Windows port"
      VALUE "FileVersion",      XML_VERSION_STRING
      VALUE "InternalName",     XML_DLL_BASENAME ".dll"
      VALUE "LegalCopyright",   XML_COPYRIGHT
      VALUE "OriginalFilename", XML_DLL_BASENAME ".dll"
      VALUE "ProductName",      "Expat"
      VALUE "ProductVersion",   XML_VERSION_STRING
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 1200
  END
END

