SDL_image: change version in top-level version.rc and check with test-versioning.sh

From 72c92759cfd8ce8214cdf12336b00e5a56f7953e Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Wed, 11 May 2022 23:24:24 +0300
Subject: [PATCH] change version in top-level version.rc and check with
 test-versioning.sh

---
 test-versioning.sh | 68 ++++++++++++++++++++++++----------------------
 version.rc         |  8 +++---
 2 files changed, 39 insertions(+), 37 deletions(-)

diff --git a/test-versioning.sh b/test-versioning.sh
index 210b724a..f9b8857b 100755
--- a/test-versioning.sh
+++ b/test-versioning.sh
@@ -63,39 +63,41 @@ else
     not_ok "Makefile.os2 $version disagrees with SDL_image.h $ref_version"
 fi
 
-tuple=$(sed -ne 's/^ *FILEVERSION *//p' VisualC/Version.rc | tr -d '\r')
-ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
-
-if [ "$ref_tuple" = "$tuple" ]; then
-    ok "Version.rc FILEVERSION $tuple"
-else
-    not_ok "Version.rc FILEVERSION $tuple disagrees with SDL_image.h $ref_tuple"
-fi
-
-tuple=$(sed -ne 's/^ *PRODUCTVERSION *//p' VisualC/Version.rc | tr -d '\r')
-
-if [ "$ref_tuple" = "$tuple" ]; then
-    ok "Version.rc PRODUCTVERSION $tuple"
-else
-    not_ok "Version.rc PRODUCTVERSION $tuple disagrees with SDL_image.h $ref_tuple"
-fi
-
-tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]+)\\0"\r?$/\1/p' VisualC/Version.rc | tr -d '\r')
-ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
-
-if [ "$ref_tuple" = "$tuple" ]; then
-    ok "Version.rc FileVersion $tuple"
-else
-    not_ok "Version.rc FileVersion $tuple disagrees with SDL_image.h $ref_tuple"
-fi
-
-tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]+)\\0"\r?$/\1/p' VisualC/Version.rc | tr -d '\r')
-
-if [ "$ref_tuple" = "$tuple" ]; then
-    ok "Version.rc ProductVersion $tuple"
-else
-    not_ok "Version.rc ProductVersion $tuple disagrees with SDL_image.h $ref_tuple"
-fi
+for rcfile in version.rc VisualC/Version.rc; do
+    tuple=$(sed -ne 's/^ *FILEVERSION *//p' "$rcfile" | tr -d '\r')
+    ref_tuple="${ref_major},${ref_minor},${ref_micro},0"
+
+    if [ "$ref_tuple" = "$tuple" ]; then
+        ok "$rcfile FILEVERSION $tuple"
+    else
+        not_ok "$rcfile FILEVERSION $tuple disagrees with SDL_image.h $ref_tuple"
+    fi
+
+    tuple=$(sed -ne 's/^ *PRODUCTVERSION *//p' "$rcfile" | tr -d '\r')
+
+    if [ "$ref_tuple" = "$tuple" ]; then
+        ok "$rcfile PRODUCTVERSION $tuple"
+    else
+        not_ok "$rcfile PRODUCTVERSION $tuple disagrees with SDL_image.h $ref_tuple"
+    fi
+
+    tuple=$(sed -Ene 's/^ *VALUE "FileVersion", "([0-9, ]+)\\0"\r?$/\1/p' "$rcfile" | tr -d '\r')
+    ref_tuple="${ref_major}, ${ref_minor}, ${ref_micro}, 0"
+
+    if [ "$ref_tuple" = "$tuple" ]; then
+        ok "$rcfile FileVersion $tuple"
+    else
+        not_ok "$rcfile FileVersion $tuple disagrees with SDL_image.h $ref_tuple"
+    fi
+
+    tuple=$(sed -Ene 's/^ *VALUE "ProductVersion", "([0-9, ]+)\\0"\r?$/\1/p' "$rcfile" | tr -d '\r')
+
+    if [ "$ref_tuple" = "$tuple" ]; then
+        ok "$rcfile ProductVersion $tuple"
+    else
+        not_ok "$rcfile ProductVersion $tuple disagrees with SDL_image.h $ref_tuple"
+    fi
+done
 
 version=$(sed -Ene '/CFBundleShortVersionString/,+1 s/.*<string>(.*)<\/string>.*/\1/p' Xcode/Info-Framework.plist)
 
diff --git a/version.rc b/version.rc
index 8d423d7b..237dcd64 100644
--- a/version.rc
+++ b/version.rc
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
 //
 
 VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,6,0
- PRODUCTVERSION 2,0,6,0
+ FILEVERSION 2,5,0,0
+ PRODUCTVERSION 2,5,0,0
  FILEFLAGSMASK 0x3fL
  FILEFLAGS 0x0L
  FILEOS 0x40004L
@@ -23,12 +23,12 @@ BEGIN
         BEGIN
             VALUE "CompanyName", "\0"
             VALUE "FileDescription", "SDL_image\0"
-            VALUE "FileVersion", "2, 0, 6, 0\0"
+            VALUE "FileVersion", "2, 5, 0, 0\0"
             VALUE "InternalName", "SDL_image\0"
             VALUE "LegalCopyright", "Copyright  2022 Sam Lantinga\0"
             VALUE "OriginalFilename", "SDL_image.dll\0"
             VALUE "ProductName", "Simple DirectMedia Layer\0"
-            VALUE "ProductVersion", "2, 0, 6, 0\0"
+            VALUE "ProductVersion", "2, 5, 0, 0\0"
         END
     END
     BLOCK "VarFileInfo"