如何创建.RC文件以包含版本信息&图标?

时间:2017-06-04 17:29:20

标签: c# sdk resources rc.exe

我对这个东西有点新鲜。我想生成一个包含版本信息和版本的.rc文件。其中还包含图标..

版本信息:

VS_VERSION_INFO VERSIONINFO
FILEVERSION    1,0,0,0
PRODUCTVERSION 1,0,0,0
{
    BLOCK "StringFileInfo"
    {
        BLOCK "040904b0"
        {
            VALUE "CompanyName",        "JACK Inc.\0"
            VALUE "FileDescription",    "MyApp\0"
            VALUE "FileVersion",        "1.0.0.0\0"
            VALUE "LegalCopyright",     "© 2017 JACK Inc. All Rights Reserved\0"
            VALUE "OriginalFilename",   "MyApp\0"
            VALUE "ProductName",        "MyApp\0"
            VALUE "ProductVersion",     "1.0.0.0\0"
        }
    }
    BLOCK "VarFileInfo"
    {
        VALUE "Translation", 0x409, 1200
    }
}

图标部分:

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_MYAPP_ICON          ICON                    "icon1.ico"
IDI_MYAPP_ICON_SMALL    ICON                    "icon2.ico"

我已经有了windows sdk,我将使用rc.exe将其编译为.res文件,以用作csproj文件中的Win32Resource。我只是对如何正确编写.rc文件以包含上述两个内容感到困惑..请帮助...

0 个答案:

没有答案