shithub: dav1d

Download patch

ref: 408d0486889f4f6d92f73abdeaef250659a10bc7
parent: ace3855a60379a76624bc01d74bae7fc40233c54
author: James Almer <jamrial@gmail.com>
date: Sat Mar 9 06:06:15 EST 2019

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

And the API version as the file version.

--- a/src/dav1d.rc.in
+++ b/src/dav1d.rc.in
@@ -1,5 +1,7 @@
-#define VERSION_NUMBER @VERSION_MAJOR@,@VERSION_MINOR@,@VERSION_REVISION@,@VERSION_EXTRA@
-#define VERSION_NUMBER_STR "@VERSION_MAJOR@.@VERSION_MINOR@.@VERSION_REVISION@"
+#define API_VERSION_NUMBER @API_VERSION_MAJOR@,@API_VERSION_MINOR@,@API_VERSION_REVISION@,0
+#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>
 
@@ -6,8 +8,8 @@
 1 VERSIONINFO
 FILETYPE VFT_DLL
 FILEOS VOS_NT_WINDOWS32
-PRODUCTVERSION VERSION_NUMBER
-FILEVERSION VERSION_NUMBER
+PRODUCTVERSION PROJECT_VERSION_NUMBER
+FILEVERSION API_VERSION_NUMBER
 BEGIN
   BLOCK "StringFileInfo"
   BEGIN
@@ -15,9 +17,9 @@
     BEGIN
       VALUE "CompanyName", "VideoLAN"
       VALUE "ProductName", "dav1d"
-      VALUE "ProductVersion", VERSION_NUMBER_STR
-      VALUE "FileVersion", VERSION_NUMBER_STR
-      VALUE "FileDescription", "dav1d AV1 decoder"
+      VALUE "ProductVersion", PROJECT_VERSION_NUMBER_STR
+      VALUE "FileVersion", API_VERSION_NUMBER_STR
+      VALUE "FileDescription", "dav1d " PROJECT_VERSION_NUMBER_STR " - AV1 decoder"
       VALUE "InternalName", "dav1d"
       VALUE "OriginalFilename", "libdav1d.dll"
       VALUE "LegalCopyright", "Copyright \251 @COPYRIGHT_YEARS@ VideoLAN and dav1d Authors"
--- a/src/meson.build
+++ b/src/meson.build
@@ -147,10 +147,12 @@
     rc_version_array = meson.project_version().split('.')
     winmod = import('windows')
     rc_data = configuration_data()
-    rc_data.set('VERSION_MAJOR', rc_version_array[0])
-    rc_data.set('VERSION_MINOR', rc_version_array[1])
-    rc_data.set('VERSION_REVISION', rc_version_array[2])
-    rc_data.set('VERSION_EXTRA', '0')
+    rc_data.set('PROJECT_VERSION_MAJOR', rc_version_array[0])
+    rc_data.set('PROJECT_VERSION_MINOR', rc_version_array[1])
+    rc_data.set('PROJECT_VERSION_REVISION', rc_version_array[2])
+    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_file = configure_file(