$VERSIONINFO: Difference between revisions

From QB64 Phoenix Edition Wiki
Jump to navigation Jump to search
No edit summary
Tags: Undo Reverted
No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 8: Line 8:
{{PageParameters}}
{{PageParameters}}
* Text ''keys'' can be: '''Comments, CompanyName, FileDescription, FileVersion, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, ProductVersion, Web'''
* Text ''keys'' can be: '''Comments, CompanyName, FileDescription, FileVersion, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, ProductVersion, Web'''
* Numeric {{Parameter|keys}} can be:'''FILEVERSION#''' and '''PRODUCTVERSION#'''  
* Numeric {{Parameter|keys}} can be:'''FILEVERSION#''' and '''PRODUCTVERSION#'''
**When provided, the numerical keys '''FILEVERSION#''' and '''PRODUCTVERSION#''' will also provide values to the text keys '''FileVersion''' and '''ProductVersion,''' if the text versions are not provided separately. (QB64-PE v0.6.0 and up)
**When provided, the numerical keys '''FILEVERSION#''' and '''PRODUCTVERSION#''' will also provide values to the text keys '''FileVersion''' and '''ProductVersion,''' if the text versions are not provided separately. (QB64-PE v0.6.0 and up)


Line 16: Line 16:
* Numeric key=''value'' must be 4 comma-separated numerical text values entered by programmer which usually stand for major, minor, revision and build numbers).
* Numeric key=''value'' must be 4 comma-separated numerical text values entered by programmer which usually stand for major, minor, revision and build numbers).
* A manifest file is automatically embedded into the resulting .exe file so that Common Controls v6.0 gets linked at runtime, if required.
* A manifest file is automatically embedded into the resulting .exe file so that Common Controls v6.0 gets linked at runtime, if required.
* '''[[Keywords_currently_not_supported_by_QB64#Keywords_not_supported_in_Linux_or_macOS_versions|Keyword not supported in Linux or macOS versions]]'''
* '''[[Keywords currently not supported by QB64#Keywords_not_supported_in_Linux_or_macOS_versions|Keyword not supported in Linux or macOS versions]]'''




{{PageAvailability}}
{{PageAvailability}}
<!-- QB64 = a version or none, QBPE = a version or all, Platforms = yes or no -->
<gallery widths="48px" heights="48px" mode="nolines">
<gallery widths="48px" heights="48px" mode="nolines">
File:Qb64.png|'''v1.2'''
File:Qb64.png|'''v1.2'''
Line 28: Line 29:
File:Osx.png|'''no'''
File:Osx.png|'''no'''
</gallery>
</gallery>
<!-- additional availability notes go below here -->




Line 36: Line 38:
{{Cl|$VERSIONINFO}}:FILEVERSION#=1,0,0,0
{{Cl|$VERSIONINFO}}:FILEVERSION#=1,0,0,0
{{Cl|$VERSIONINFO}}:PRODUCTVERSION#=1,0,0,0
{{Cl|$VERSIONINFO}}:PRODUCTVERSION#=1,0,0,0
{{CodeEnd}}  
{{CodeEnd}}




{{PageSeeAlso}}
{{PageSeeAlso}}
* [[$EXEICON]]  
* [[$EXEICON]]
* [[_ICON]]
* [[_ICON]]
* [https://msdn.microsoft.com/library/windows/desktop/aa381058(v=vs.85).aspx VERSIONINFO resource (MSDN)]
* [https://msdn.microsoft.com/library/windows/desktop/aa381058(v=vs.85).aspx VERSIONINFO resource (MSDN)]

Latest revision as of 00:33, 5 February 2023

The $VERSIONINFO metacommand adds text metadata to the resulting executable for identification purposes across the OS. Windows-only.


Syntax

$VERSIONINFO:key=value


Parameters

  • Text keys can be: Comments, CompanyName, FileDescription, FileVersion, InternalName, LegalCopyright, LegalTrademarks, OriginalFilename, ProductName, ProductVersion, Web
  • Numeric keys can be:FILEVERSION# and PRODUCTVERSION#
    • When provided, the numerical keys FILEVERSION# and PRODUCTVERSION# will also provide values to the text keys FileVersion and ProductVersion, if the text versions are not provided separately. (QB64-PE v0.6.0 and up)


Description

  • Text and numerical values are string literals without quotes entered by programmer. No variables are accepted. (variable names would be interpreted as literals).
  • Numeric key=value must be 4 comma-separated numerical text values entered by programmer which usually stand for major, minor, revision and build numbers).
  • A manifest file is automatically embedded into the resulting .exe file so that Common Controls v6.0 gets linked at runtime, if required.
  • Keyword not supported in Linux or macOS versions


Availability


Examples

Example: Adding metadata to a Windows exe compiled with QB64:

$VERSIONINFO:CompanyName=Your company name goes here
$VERSIONINFO:FILEVERSION#=1,0,0,0
$VERSIONINFO:PRODUCTVERSION#=1,0,0,0


See also



Navigation:
Main Page with Articles and Tutorials
Keyword Reference - Alphabetical
Keyword Reference - By usage
Report a broken link