///////////////////////////
//
// Version
//

#include <windows.h>

/* On some evc3/evc4 targets the windows.h doesn't include winver.h or doesn't
 * define needed file version flags, so we redefine them here.
 */
#ifndef VS_FF_DEBUG
#  define VS_FF_DEBUG    0x00000001L
#endif

#ifndef VOS__WINDOWS32
#  define VOS__WINDOWS32 0x00000004L
#endif

#ifndef VFT_DLL
#  define VFT_DLL        0x00000002L
#endif

#ifndef VFT2_UNKNOWN
#  define VFT2_UNKNOWN   0x00000000L
#endif

#include <stl/_stlport_version.h>

#define STRINGIZE(X) STRINGIZE_AUX(X)
#define STRINGIZE_AUX(X) #X

#define CONCAT(A, B) CONCAT_AUX(A, B)
#define CONCAT_AUX(A, B) CONCAT_AUX2(A ## B)
#define CONCAT_AUX2(X) X

#define VERSION_ID _STLPORT_MAJOR, _STLPORT_MINOR, _STLPORT_PATCHLEVEL, 0
#define VERSION_STR STRINGIZE(_STLPORT_MAJOR._STLPORT_MINOR._STLPORT_PATCHLEVEL)

#if !defined (__GNUC__)
//MSVC rc ressource compiler.
#  define DLLNAME_STRING2(buildstr) \
  STRINGIZE(CONCAT(CONCAT(stlport_, CONCAT(buildstr, CONCAT(_STLPORT_MAJOR, _STLPORT_MINOR))), .dll))
#else
//GNU windress ressource compiler.
#  define DLLNAME_STRING2(buildstr) "stlport_" STRINGIZE(buildstr) STRINGIZE(_STLPORT_MAJOR) STRINGIZE(_STLPORT_MINOR) ".dll"
#endif

VS_VERSION_INFO VERSIONINFO
FILEVERSION VERSION_ID
PRODUCTVERSION VERSION_ID
FILEFLAGSMASK 0x3fL

FILEFLAGS VS_FF_DEBUG

FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
FILESUBTYPE VFT2_UNKNOWN
BEGIN
  BLOCK "StringFileInfo"
  BEGIN
    BLOCK "040904B0"
    BEGIN
      VALUE "CompanyName", "STLport Consulting, Inc.\0"
      VALUE "FileDescription", "STLport\0"
      VALUE "FileVersion", VERSION_STR
      VALUE "InternalName", "STLPORT.DLL\0"
      VALUE "LegalCopyright", "Copyright (C) Boris Fomitchev\0"

      VALUE "OriginalFilename", DLLNAME_STRING2(BUILD)

      VALUE "ProductName", "STLport Standard ANSI C++ Library\0"
      VALUE "ProductVersion", VERSION_STR
#ifdef BUILD_INFOS
      VALUE "SpecialBuild", STRINGIZE(COMP) " " STRINGIZE(BUILD_INFOS)
#endif
    END
  END
  BLOCK "VarFileInfo"
  BEGIN
    VALUE "Translation", 0x409, 1200
  END
END
