Author Topic: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)  (Read 3984 times)

0 Members and 1 Guest are viewing this topic.

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
It's possible I'm simply missing something here since this is the first time I'm using $VERSIONINFO but here is what I am finding:

$VERSIONINFO:FILEVERSION# is working as I would expect. In other words, if I right-click on the resulting executable, select properties, and go to the "Details" tab, I see the "File version" correctly listed there. However, I have tried several other parameters such as LegalCopyright, ProductName, and CompanyName and none of these show any information on that details tab.

Am I misunderstanding how this should work?

Additional Info:

I am running QB64 1.3 on Windows 10 1809 with all the latest Windows updates.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
I also tried it under Windows 7. The FileDescription and FILEVERSION# are saved correctly. All other records are missing. The program I ran the test for:

Code: QB64: [Select]
  1. pip
  2.  
  3. $VERSIONINFO:CompanyName=TEST - Company Names
  4. $VERSIONINFO:FILEVERSION#=1,1,5,7
  5. $VERSIONINFO:PRODUCTVERSION#=1,2,5,7
  6. $VERSIONINFO:InternalName=TEST - InternalName
  7. $VERSIONINFO:LegalCopyright=TEST - LegalCopyright
  8.  
  9. $VERSIONINFO:LegalTrademarks='TEST - LegalTrademarks'
  10. $VERSIONINFO:OriginalFilename='TEST - OriginalFileName'
  11. $VERSIONINFO:ProductName='TEST - ProductName'
  12. $VERSIONINFO:Web='TEST - WEB url:'
  13. $VERSIONINFO:Comments='TEST - comments'
  14. $VERSIONINFO:FileDescription=TEST - FileDescription
  15.  
  16. SUB pip
  17.     BEEP
  18.  

FellippeHeitor

  • Guest
Maybe newer Windows versions just don't have support to *showing* these properties, but they do get saved to the file correctly (something you can check by inspecting the binary itself with something like Resource Hacker - or maybe even a hex viewer).

  [ You are not allowed to view this attachment ]  

FellippeHeitor

  • Guest
That also reminds me I forgot to update the version number before we released v1.3! /nervous laughter

FellippeHeitor

  • Guest
A bit more info:

When you use $VERSIONINFO, all QB64 does is generate a text file with the information you added, which is the same we do when $EXEICON is used. The file, called a resource descriptor, can be found under internal/temp/icon.rc. You can inspect it to see that we are following Microsoft's format as seen here: https://docs.microsoft.com/en-us/windows/desktop/menurc/versioninfo-resource

It's the job of the C++ compiler to actually embed the icon/version information into the final binary. Whatever's not showing is, as I said, simply not showing, but it's surely there.

Offline Petr

  • Forum Resident
  • Posts: 1720
  • The best code is the DNA of the hops.
    • View Profile
Thank you for answer, Fellippe. It's not the first time, when Windows don't show something. But if Source Hacker it show, it is Windows problem. Nothing that would surprise me with Microsoft. 

Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
I guess that there must be different ways storing that information. I notice that some other executables from various programs do show that information. I don't know if Windows maybe gets that information from a different location.

So clearly, however they are storing that information, Windows is able to read it.


Offline hanness

  • Forum Regular
  • Posts: 210
    • View Profile
Sorry, I should have included a screenshot of an example. Below is screenshot showing what the installer for the latest version of VMware Workstation Pro looks like:


FellippeHeitor

  • Guest
Hummm. Will check.