Skip to content

Add support for embedded version information on Windows #870

@jgranick

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

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