// SPDX-License-Identifier: BSD-3-Clause
/* Copyright 2016-2017, Intel Corporation */

/*
 * common.rc -- common part of PMDK rc files
 */

#include <windows.h>
#include "srcversion.h"

#define VERSION(major, minor, build, revision) major, minor, build, revision

#ifdef _DEBUG
#define VERSION_DEBUG VS_FF_DEBUG
#else
#define VERSION_DEBUG 0
#endif

#ifdef PRERELEASE
#define VERSION_PRERELEASE VS_FF_PRERELEASE
#else
#define VERSION_PRERELEASE 0
#endif

#ifdef BUGFIX
#define VERSION_PATCHED VS_FF_PATCHED
#else
#define VERSION_PATCHED 0
#endif

#ifdef PRIVATE
#define VERSION_PRIVATE VS_FF_PRIVATE
#else
#define VERSION_PRIVATE 0
#endif

#ifdef CUSTOM
#define VERSION_SPECIAL VS_FF_SPECIALBUILD
#else
#define VERSION_SPECIAL 0
#endif

#define VERSION_PRIVATEBUILD VS_FF_PRIVATEBUILD
#define VER_PATCHED VS_FF_PATCHED

VS_VERSION_INFO VERSIONINFO
FILEVERSION	VERSION(MAJOR, MINOR, BUILD, REVISION)
PRODUCTVERSION	VERSION(MAJOR, MINOR, BUILD, REVISION)
FILEFLAGSMASK	VS_FFI_FILEFLAGSMASK
FILEFLAGS	(VERSION_PRIVATEBUILD | VERSION_PRERELEASE | VERSION_DEBUG | VERSION_SPECIAL | VERSION_PATCHED)
FILEOS		VOS__WINDOWS32
FILETYPE	TYPE
FILESUBTYPE	VFT2_UNKNOWN
BEGIN
	BLOCK "StringFileInfo"
	BEGIN
		 BLOCK "040904b0"
		 BEGIN
			VALUE "CompanyName", "Intel"
			VALUE "FileDescription", DESCRIPTION
			VALUE "FileVersion", SRCVERSION
			VALUE "InternalName", "PMDK"
			VALUE "LegalCopyright", "Copyright 2014-2017, Intel Corporation"
			VALUE "OriginalFilename", FILE_NAME
			VALUE "ProductName", "Persistent Memory Development Kit"
			VALUE "ProductVersion", SRCVERSION
#if VERSION_SPECIAL == VS_FF_SPECIALBUILD
			VALUE "SpecialBuild", VERSION_CUSTOM_MSG
#endif
#if VERSION_PRIVATEBUILD == VS_FF_SPECIALBUILD
			VALUE "PrivateBuild", "Not a release build"
#endif
		 END
	END
	BLOCK "VarFileInfo"
	BEGIN
			/* XXX: Update to UNICODE */
			VALUE "Translation", 0x409, 0
	END
END
