Review Request 121400: Add a new macro to create VERSIONINFO resources for Windows
Alex Merry
alex.merry at kde.org
Wed Dec 10 23:27:11 UTC 2014
> On Dec. 10, 2014, 8:38 p.m., Alex Merry wrote:
> > What happens if you miss out an argument (ie: you put an empty string in the file)? Is that the same as not including the corresponding VALUE line in the file at all?
> >
> > Also, it would be nice to be able to optionally pass the version as an argument, in case either PROJECT_VERSION isn't set for some reason or the user wants a different version for some reason. The default should still be PROJECT_VERSION, of course (but your function should check it is set and cause a fatal error otherwise).
>
> Nicolás Alvarez wrote:
> Putting an empty string in the file is not the same as leaving out the VALUE in the sense that the both cases are represented differently in the compiled file. However, I believe all tools that read the resource treat both cases the same way.
>
> I'll work on adding a version argument now. I'm guessing the user would pass VERSION 1.2.3.4 and my macro would parse it into components in order to build the FILEVERSION field (comma-separated)?
Yep. Check the string(REPLACE) command - you can probably just replace all . with ,
- Alex
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/121400/#review71745
-----------------------------------------------------------
On Dec. 9, 2014, 5:01 a.m., Nicolás Alvarez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/121400/
> -----------------------------------------------------------
>
> (Updated Dec. 9, 2014, 5:01 a.m.)
>
>
> Review request for Build System and KDE Frameworks.
>
>
> Repository: extra-cmake-modules
>
>
> Description
> -------
>
> Windows has a way for executables and shared libraries (DLLs) to contain version information in a machine-readable format. This information can be seen in Explorer in the file properties (http://goo.gl/UbJGte) and also in the tooltip when hovering the file. It's also used by Windows Installer to avoid overwriting an existing DLL with an older version.
>
> This change adds a CMake macro to generate a Windows resource script with version information passed to the macro.
>
> The macro documentation is a single line, obviously needs work.
>
>
> Diffs
> -----
>
> modules/ECMCreateVersionResource.cmake PRE-CREATION
> modules/ECMVersionResource.rc.in PRE-CREATION
>
> Diff: https://git.reviewboard.kde.org/r/121400/diff/
>
>
> Testing
> -------
>
> Tested with CMake 3.0.2 in kcoreaddons (review /r/121401), MSVC2013, Windows 7. Explorer tooltip shows description and version. File properties shows all the new information.
>
>
> Thanks,
>
> Nicolás Alvarez
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-buildsystem/attachments/20141210/cfd94c15/attachment-0001.html>
More information about the Kde-buildsystem
mailing list