/*
 * Inspired by Wine file include/wine_common_ver.rc
 * Copyright 2001 Dmitry Timoshkov
 *
 * Most version components are set to reasonable defaults here.
 * If you're including this for a .DLL, #define REACTOS_VERSION_DLL before the #include.
 * Other things to #define:
 * REACTOS_STR_FILE_DESCRIPTION
 * REACTOS_STR_INTERNAL_NAME
 * REACTOS_STR_ORIGINAL_FILENAME
 *
 */

#include "winver.h"
#include "version.h"
#include "buildno.h"

/* Define some defaults (shouldn't be overwritten by applications */
#define REACTOS_DEFAULT_STR_COMPANY_NAME    "ReactOS Development Team"
#define REACTOS_DEFAULT_STR_DESCRIPTION     "ReactOS Core Component"
#define REACTOS_DEFAULT_STR_INTERNAL_NAME   ""
#define REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT "Copyright 1998-" COPYRIGHT_YEAR " ReactOS Team"
#define REACTOS_DEFAULT_STR_PRODUCT_NAME    "ReactOS Operating System"

/* Set defaults for everything, unless overridden */
#ifndef REACTOS_FILEVERSION
#ifdef REACTOS_VERSION_DLL
#define REACTOS_FILEVERSION REACTOS_DLL_VERSION_MAJOR,KERNEL_VERSION_MINOR,KERNEL_VERSION_PATCH_LEVEL,0
#else
#define REACTOS_FILEVERSION KERNEL_VERSION_MAJOR,KERNEL_VERSION_MINOR,KERNEL_VERSION_PATCH_LEVEL,0
#endif /* REACTOS_VERSION_DLL */
#endif /* REACTOS_FILEVERSION */

#ifndef REACTOS_PRODUCTVERSION
#define REACTOS_PRODUCTVERSION KERNEL_VERSION_MAJOR,KERNEL_VERSION_MINOR,KERNEL_VERSION_PATCH_LEVEL,0
#endif /* REACTOS_PRODUCTVERSION */

#ifndef REACTOS_FILEFLAGSMASK
#define REACTOS_FILEFLAGSMASK 0x3fL
#endif /* REACTOS_FILEFLAGSMASK */

#ifndef REACTOS_FILEFLAGS
#ifdef _DEBUG
#define REACTOS_FILEFLAGS VS_FF_DEBUG
#else
#define REACTOS_FILEFLAGS 0x0L
#endif /* _DEBUG */
#endif /* REACTOS_FILEFLAGS */

#ifndef REACTOS_FILEOS
#define REACTOS_FILEOS VOS_NT_WINDOWS32
#endif /* REACTOS_FILEOS */

#ifndef REACTOS_FILETYPE
#ifdef REACTOS_VERSION_DLL
#define REACTOS_FILETYPE VFT_DLL
#else
#define REACTOS_FILETYPE VFT_APP
#endif /* REACTOS_VERSION_DLL */
#endif /* REACTOS_FILETYPE */

#ifndef REACTOS_FILESUBTYPE
#define REACTOS_FILESUBTYPE VFT2_UNKNOWN
#endif /* REACTOS_FILESUBTYPE */

#ifndef REACTOS_STR_COMPANY_NAME
#define REACTOS_STR_COMPANY_NAME REACTOS_DEFAULT_STR_COMPANY_NAME
#endif /* REACTOS_STR_COMPANY_NAME */

#ifndef REACTOS_STR_FILE_DESCRIPTION
#define REACTOS_STR_FILE_DESCRIPTION REACTOS_DEFAULT_STR_FILE_DESCRIPTION
#endif /* REACTOS_STR_FILE_DESCRIPTION */

#ifndef REACTOS_STR_FILE_VERSION
#ifdef REACTOS_VERSION_DLL
#define REACTOS_STR_FILE_VERSION REACTOS_DLL_VERSION_RC
#else
#define REACTOS_STR_FILE_VERSION KERNEL_VERSION_RC
#endif /* REACTOS_VERSION_DLL */
#endif /* REACTOS_STR_FILE_VERSION */

#ifndef REACTOS_STR_INTERNAL_NAME
#define REACTOS_STR_INTERNAL_NAME REACTOS_DEFAULT_STR_INTERNAL_NAME
#endif /* REACTOS_STR_INTERNAL_NAME */

#ifndef REACTOS_STR_LEGAL_COPYRIGHT
#define REACTOS_STR_LEGAL_COPYRIGHT REACTOS_DEFAULT_STR_LEGAL_COPYRIGHT
#endif /* REACTOS_STR_LEGAL_COPYRIGHT */

#ifndef REACTOS_STR_ORIGINAL_FILENAME
#define REACTOS_STR_ORIGINAL_FILENAME ""
#endif /* REACTOS_STR_ORIGINAL_FILENAME */

#ifndef REACTOS_STR_PRODUCT_NAME
#define REACTOS_STR_PRODUCT_NAME REACTOS_DEFAULT_STR_PRODUCT_NAME
#endif /* REACTOS_STR_PRODUCT_NAME */

#ifndef REACTOS_STR_PRODUCT_VERSION
#define REACTOS_STR_PRODUCT_VERSION KERNEL_VERSION_RC
#endif /* REACTOS_STR_PRODUCT_VERSION */

#ifndef REACTOS_STR_PRODUCT_BUILD
#define REACTOS_STR_PRODUCT_BUILD KERNEL_VERSION_BUILD_RC
#endif /* REACTOS_STR_PRODUCT_BUILD */

/* The version resource itself */
VS_VERSION_INFO VERSIONINFO
FILEVERSION     REACTOS_FILEVERSION
PRODUCTVERSION  REACTOS_PRODUCTVERSION
FILEFLAGSMASK   REACTOS_FILEFLAGSMASK
FILEFLAGS       REACTOS_FILEFLAGS
FILEOS          REACTOS_FILEOS
FILETYPE        REACTOS_FILETYPE
FILESUBTYPE     REACTOS_FILESUBTYPE
BEGIN
    BLOCK "StringFileInfo"
    BEGIN
        BLOCK "040904b0"
        BEGIN
            VALUE "CompanyName",        REACTOS_STR_COMPANY_NAME
            VALUE "FileDescription",    REACTOS_STR_FILE_DESCRIPTION
            VALUE "FileVersion",        REACTOS_STR_FILE_VERSION
            VALUE "InternalName",       REACTOS_STR_INTERNAL_NAME
#ifdef REACTOS_STR_ORIGINAL_COPYRIGHT
            VALUE "OriginalCopyright",  REACTOS_STR_ORIGINAL_COPYRIGHT
#endif /* REACTOS_STR_ORIGINAL_COPYRIGHT */
            VALUE "LegalCopyright",     REACTOS_STR_LEGAL_COPYRIGHT
            VALUE "OriginalFilename",   REACTOS_STR_ORIGINAL_FILENAME
            VALUE "ProductName",        REACTOS_STR_PRODUCT_NAME
            VALUE "ProductVersion",     REACTOS_STR_PRODUCT_VERSION
#ifdef REACTOS_OLESELFREGISTER
            VALUE "OLESelfRegister",    ""
#endif /* REACTOS_OLESELFREGISTER */
        END
    END
    BLOCK "VarFileInfo"
    BEGIN
        VALUE "Translation", 0x409, 1200
    END
END
