build: use the project version as product version in the windows resource file

And the API version as the file version.
parent ace3855a
#define VERSION_NUMBER @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@ #define API_VERSION_NUMBER @API_VERSION_MAJOR@,@API_VERSION_MINOR@,@API_VERSION_REVISION@,0
#define VERSION_NUMBER_STR "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_REVISION@" #define API_VERSION_NUMBER_STR "@API_VERSION_MAJOR@.@API_VERSION_MINOR@.@API_VERSION_REVISION@"
#define PROJECT_VERSION_NUMBER @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_REVISION@,0
#define PROJECT_VERSION_NUMBER_STR "@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_REVISION@"
#include <windows.h> #include <windows.h>
1 VERSIONINFO 1 VERSIONINFO
FILETYPE VFT_DLL FILETYPE VFT_DLL
FILEOS VOS_NT_WINDOWS32 FILEOS VOS_NT_WINDOWS32
PRODUCTVERSION VERSION_NUMBER PRODUCTVERSION PROJECT_VERSION_NUMBER
FILEVERSION VERSION_NUMBER FILEVERSION API_VERSION_NUMBER
BEGIN BEGIN
BLOCK "StringFileInfo" BLOCK "StringFileInfo"
BEGIN BEGIN
...@@ -15,9 +17,9 @@ BEGIN ...@@ -15,9 +17,9 @@ BEGIN
BEGIN BEGIN
VALUE "CompanyName", "VideoLAN" VALUE "CompanyName", "VideoLAN"
VALUE "ProductName", "dav1d" VALUE "ProductName", "dav1d"
VALUE "ProductVersion", VERSION_NUMBER_STR VALUE "ProductVersion", PROJECT_VERSION_NUMBER_STR
VALUE "FileVersion", VERSION_NUMBER_STR VALUE "FileVersion", API_VERSION_NUMBER_STR
VALUE "FileDescription", "dav1d AV1 decoder" VALUE "FileDescription", "dav1d " PROJECT_VERSION_NUMBER_STR " - AV1 decoder"
VALUE "InternalName", "dav1d" VALUE "InternalName", "dav1d"
VALUE "OriginalFilename", "libdav1d.dll" VALUE "OriginalFilename", "libdav1d.dll"
VALUE "LegalCopyright", "Copyright \251 @COPYRIGHT_YEARS@ VideoLAN and dav1d Authors" VALUE "LegalCopyright", "Copyright \251 @COPYRIGHT_YEARS@ VideoLAN and dav1d Authors"
......
...@@ -147,10 +147,12 @@ if host_machine.system() == 'windows' and get_option('default_library') != 'stat ...@@ -147,10 +147,12 @@ if host_machine.system() == 'windows' and get_option('default_library') != 'stat
rc_version_array = meson.project_version().split('.') rc_version_array = meson.project_version().split('.')
winmod = import('windows') winmod = import('windows')
rc_data = configuration_data() rc_data = configuration_data()
rc_data.set('VERSION_MAJOR', rc_version_array[0]) rc_data.set('PROJECT_VERSION_MAJOR', rc_version_array[0])
rc_data.set('VERSION_MINOR', rc_version_array[1]) rc_data.set('PROJECT_VERSION_MINOR', rc_version_array[1])
rc_data.set('VERSION_REVISION', rc_version_array[2]) rc_data.set('PROJECT_VERSION_REVISION', rc_version_array[2])
rc_data.set('VERSION_EXTRA', '0') rc_data.set('API_VERSION_MAJOR', dav1d_api_version_major)
rc_data.set('API_VERSION_MINOR', dav1d_api_version_minor)
rc_data.set('API_VERSION_REVISION', dav1d_api_version_revision)
rc_data.set('COPYRIGHT_YEARS', '2019') rc_data.set('COPYRIGHT_YEARS', '2019')
rc_file = configure_file( rc_file = configure_file(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment