Skip to content

Add version info and other details to windows exe properties#2743

Merged
briaguya0 merged 4 commits intoHarbourMasters:developfrom
Archez:win-exe-properties
Apr 25, 2023
Merged

Add version info and other details to windows exe properties#2743
briaguya0 merged 4 commits intoHarbourMasters:developfrom
Archez:win-exe-properties

Conversation

@Archez
Copy link
Contributor

@Archez Archez commented Apr 24, 2023

This adds the build version/name and other details to the windows exe properties.

This makes it so hovering over the exe will display the version number.

Version info was added by leveraging https://learn.microsoft.com/en-us/windows/win32/menurc/versioninfo-resource and adding the required fields to our resource file. I added a generated header (similar to build.c) that will contain the version number and other values generated via CMake, and is included into the resource file.

Unfortunately, Windows treats version numbers as 4 values, so there is a trailing 0 that can't be removed.

If someone prefers to not show this much info, or to swap something to something else, please let me know.

Hover

image

Left: Before, Right: After

image

Build Artifacts

@briaguya0
Copy link
Contributor

is "Product name" a good place for the version name? do you have an example of how it's used by a couple other applications?

@Archez
Copy link
Contributor Author

Archez commented Apr 25, 2023

is "Product name" a good place for the version name? do you have an example of how it's used by a couple other applications?

Most examples of exes on my PC seem to have ProductName and FileDescription either totally or nearly identical (so basically name of program)

Here ProductVersion can be a raw string, so I could concatenate the version string and version name together there, and have ProductName be Ship of Harkinian instead.

Also FileDescription is displayed on hovering.

@briaguya0
Copy link
Contributor

how would you feel about about

File description: Ship of Harkinian - Khan Charlie
Product name: Ship of Harkinian
Product version: 6.1.2

@briaguya0
Copy link
Contributor

Here ProductVersion can be a raw string, so I could concatenate the version string and version name together there, and have ProductName be Ship of Harkinian instead.

This actually might be better than having the version name in the file description

@briaguya0 briaguya0 merged commit 000a5d2 into HarbourMasters:develop Apr 25, 2023
@Archez Archez deleted the win-exe-properties branch April 25, 2023 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants