1#define MY_VS_FFI_FILEFLAGSMASK  0x0000003FL
2#define MY_VOS_NT_WINDOWS32  0x00040004L
3#define MY_VOS_CE_WINDOWS32  0x00050004L
4
5#define MY_VFT_APP  0x00000001L
6#define MY_VFT_DLL  0x00000002L
7
8// #include <WinVer.h>
9
10#ifndef MY_VERSION
11#include "7zVersion.h"
12#endif
13
14#define MY_VER MY_VER_MAJOR,MY_VER_MINOR,MY_VER_BUILD,0
15
16#ifdef DEBUG
17#define DBG_FL VS_FF_DEBUG
18#else
19#define DBG_FL 0
20#endif
21
22#define MY_VERSION_INFO(fileType, descr, intName, origName)  \
23LANGUAGE 9, 1 \
241 VERSIONINFO \
25  FILEVERSION MY_VER \
26  PRODUCTVERSION MY_VER \
27  FILEFLAGSMASK MY_VS_FFI_FILEFLAGSMASK \
28  FILEFLAGS DBG_FL \
29  FILEOS MY_VOS_NT_WINDOWS32 \
30  FILETYPE fileType \
31  FILESUBTYPE 0x0L \
32BEGIN \
33    BLOCK "StringFileInfo" \
34    BEGIN  \
35        BLOCK "040904b0" \
36        BEGIN \
37            VALUE "CompanyName", "Igor Pavlov" \
38            VALUE "FileDescription", descr \
39            VALUE "FileVersion", MY_VERSION  \
40            VALUE "InternalName", intName \
41            VALUE "LegalCopyright", MY_COPYRIGHT \
42            VALUE "OriginalFilename", origName \
43            VALUE "ProductName", "7-Zip" \
44            VALUE "ProductVersion", MY_VERSION \
45        END \
46    END \
47    BLOCK "VarFileInfo" \
48    BEGIN \
49        VALUE "Translation", 0x409, 1200 \
50    END \
51END
52
53#define MY_VERSION_INFO_APP(descr, intName) MY_VERSION_INFO(MY_VFT_APP, descr, intName, intName ".exe")
54
55#define MY_VERSION_INFO_DLL(descr, intName) MY_VERSION_INFO(MY_VFT_DLL, descr, intName, intName ".dll")
56