Skip to content

Add support for embedded version information on Windows #870

Done

Description

@jgranick

From @alexandervrs on December 5, 2016 22:45

It'd be great to have Windows-only version information for Windows executables.
If I compile with hxcpp, I get an executable with the icon but it is missing the version information:

247c00ebf99283a8071b3a30c4c1c78a2e7d2d87

I also tried with several ways to attach a .rc file with this info:

1 VERSIONINFO
FILEVERSION 1,0,0,0
PRODUCTVERSION 1,0,0,0
FILEOS 0x4
FILETYPE 0x2
{
	BLOCK "StringFileInfo"
	{
		BLOCK "040904E4"
		{
			VALUE "CompanyName", ""
			VALUE "FileVersion", "1.0.0.0"
			VALUE "FileDescription", "Sample"
			VALUE "InternalName", ""
			VALUE "LegalCopyright", "Author Name"
			VALUE "LegalTrademarks", ""
			VALUE "OriginalFilename", "Sample.exe"
			VALUE "ProductName", "Sample"
			VALUE "ProductVersion", "1.0.0.0"
		}
	}
	BLOCK "VarFileInfo"
	{
		VALUE "Translation", 0x0409, 1252
	}
}

Some fields like File Description are important in Windows Applications, as it is used as description in the taskbar and system tray and the others are informative to the user and enrich some other Windows dialogs.

Could there be any way to specify these?
I'd expect something like,

<config:windows version-information="productname" value="test" />
<config:windows version-information="productversion" value="1.0.0.0" /> (also affects PRODUCTVERSION 1,0,0,0)
<config:windows version-information="companyname" value="test" />
<config:windows version-information="fileversion" value="1.0.0.0" /> (also affects FILEVERSION 1,0,0,0)
<config:windows version-information="filedescription" value="test" />
<config:windows version-information="legalcopyright" value="test" />
<config:windows version-information="legaltrademarks" value="test" />
<config:windows version-information="internalname" value="test" />
<config:windows version-information="originalfilename" value="test.exe" />

in the project.xml file

Copied from original issue: openfl/openfl#1370

Activity

  1. changed the title [-]Ability to define Version Information for Windows executables[/-] [+]Add support for embedded version information on Windows[/+] on Jan 10, 2017
  2. EliteMasterEric commented on May 3, 2024

    @EliteMasterEric
    Contributor

    Looked into whether Lime had this feature and found a 7 year old issue, sad.

  3. MAJigsaw77 commented on Dec 1, 2024

    @MAJigsaw77
    Contributor

    This feature can be achieved by defining resourceFile which makes it able to assign the resource.rc file. This feature has been added on hxcpp since this commit.

  4. dimensionscape commented on Nov 26, 2026

    @dimensionscape
    Member

    Lime 8.3.0 added this. Windows builds embed version information from templates/windows/resource/ApplicationMain.rc: the file and product version, company, description, product name and copyright, filled in from the project's <meta /> and <app /> values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions