Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-12249

Windows DLLs should contain language info and a complete VERSIONINFO block in their rc file

XMLWordPrintable

    • Icon: Suggestion Suggestion
    • Resolution: Done
    • Icon: P3: Somewhat important P3: Somewhat important
    • 4.8.0
    • 4.6.3
    • Build tools: Other
    • None

      The Windows DLLs need an hint about their language in their VERSIONINFO block (in the ressource) because WiX (Windows Installer Tools) need it to decide about replacing files e.g. while upgrading. I`m using latest WiX (3.5) and when running light.exe on the file I get the warning: "warning LGHT1076 : ICE60: The file xyz.dll is not a Font, and its version is not a companion file reference. It should have a language specified in the Language column.". Because information like a file's language are automatically retrieved, it is required to fix the DLL. Also Microsoft disadvises to bypass this error because of possible later occuring side-effects.

      Looking at the VERSIONINFO block I further suggest to include all required fields and not only the important ones.

      Here is an example:

      IDI_ICON1 ICON DISCARDABLE "library.ico"

      VS_VERSION_INFO VERSIONINFO
      FILEVERSION VER_FILEVERSION
      PRODUCTVERSION VER_PRODUCTVERSION
      FILEFLAGSMASK VS_FFI_FILEFLAGSMASK /* 0x3fL */
      FILEFLAGS VER_DEBUG
      FILEOS VOS__WINDOWS32
      FILETYPE VFT_DLL
      FILESUBTYPE VFT2_UNKNOWN /* 0x0L */
      BEGIN
      BLOCK "StringFileInfo"
      BEGIN
      BLOCK "040904B0"
      BEGIN
      VALUE "Comments", "\0"
      VALUE "CompanyName", "\0"
      VALUE "FileDescription", "\0"
      VALUE "FileVersion", "\0"
      VALUE "InternalName", "\0"
      VALUE "LegalCopyright", "\0"
      VALUE "LegalTrademarks", "\0"
      VALUE "OriginalFilename", "\0"
      VALUE "ProductName", "\0"
      VALUE "ProductVersion", "\0"
      END
      END

      BLOCK "VarFileInfo"
      BEGIN
      /* The following line should only be modified for localized versions. */
      /* It consists of any number of WORD,WORD pairs, with each pair */
      /* describing a language,codepage combination supported by the file. */
      /* */
      /* For example, a file might have values "0x409,1252" indicating that it */
      /* supports English language (0x409) in the Windows ANSI codepage (1252). */

      VALUE "Translation", 0x409, 1252
      END
      END /* End of Version info */

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            jbornema Joerg Bornemann
            munahid Gerrit Albrecht
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes