QB64.org Forum

Active Forums => QB64 Discussion => Topic started by: hanness on April 25, 2019, 03:07:18 pm

Title: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: hanness on April 25, 2019, 03:07:18 pm
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.
Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: Petr on April 28, 2019, 07:25:54 am
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.  
Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: FellippeHeitor on April 28, 2019, 07:31:38 am
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).

  [ This attachment cannot be displayed inline in 'Print Page' view ]  
Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: FellippeHeitor on April 28, 2019, 07:44:17 am
That also reminds me I forgot to update the version number before we released v1.3! /nervous laughter
Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: FellippeHeitor on April 28, 2019, 07:57:53 am
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.
Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: Petr on April 28, 2019, 05:16:44 pm
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. 
Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: hanness on April 29, 2019, 02:52:13 am
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.

Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: hanness on April 29, 2019, 02:59:03 am
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:

Title: Re: $VERSIONINFO not behaving as expected (Assuming my expectations are correct)
Post by: FellippeHeitor on April 29, 2019, 03:24:39 am
Hummm. Will check.