Switch versioning scheme to be the same as GLib and Flatpak For stable releases, this gives us the ability to make bugfix-only point releases such as 2.24.1 if we want to, and distinguish between them programmatically. For example, this ability could have been useful after 2.0.16 to fix Xwayland regressions, and after 2.0.18 to fix event loop regressions. For development releases, this gives us the ability to make multiple prereleases during the same feature cycle, and distinguish between them programmatically. For example, this would have been useful during 2.0.22 development, which went through three prereleases before reaching the final release. Signed-off-by: Simon McVittie <smcv@collabora.com>
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5327874..718d38f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,8 +58,8 @@ include(${SDL2_SOURCE_DIR}/cmake/sdlchecks.cmake)
# See docs/release_checklist.md
set(SDL_MAJOR_VERSION 2)
-set(SDL_MINOR_VERSION 0)
-set(SDL_MICRO_VERSION 23)
+set(SDL_MINOR_VERSION 23)
+set(SDL_MICRO_VERSION 0)
set(SDL_INTERFACE_AGE 0)
set(SDL_BINARY_AGE 23)
set(SDL_VERSION "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}.${SDL_MICRO_VERSION}")
@@ -74,11 +74,15 @@ set(SDL_CMAKE_DEBUG_POSTFIX "d"
mark_as_advanced(CMAKE_IMPORT_LIBRARY_SUFFIX SDL_CMAKE_DEBUG_POSTFIX)
# Calculate a libtool-like version number
-math(EXPR LT_CURRENT "${SDL_MICRO_VERSION} - ${SDL_INTERFACE_AGE}")
+math(EXPR LT_CURRENT "${SDL_MINOR_VERSION} - ${SDL_INTERFACE_AGE}")
math(EXPR LT_AGE "${SDL_BINARY_AGE} - ${SDL_INTERFACE_AGE}")
math(EXPR LT_MAJOR "${LT_CURRENT}- ${LT_AGE}")
set(LT_REVISION "${SDL_INTERFACE_AGE}")
-set(LT_RELEASE "${SDL_MAJOR_VERSION}.${SDL_MINOR_VERSION}")
+# For historical reasons, the library name redundantly includes the major
+# version twice: libSDL2-2.0.so.0.
+# TODO: in SDL 3, set the OUTPUT_NAME to plain SDL3, which will simplify
+# it to libSDL3.so.0
+set(LT_RELEASE "2.0")
set(LT_VERSION "${LT_MAJOR}.${LT_AGE}.${LT_REVISION}")
#message(STATUS "${LT_VERSION} :: ${LT_AGE} :: ${LT_REVISION} :: ${LT_CURRENT} :: ${LT_RELEASE}")
diff --git a/Makefile.os2 b/Makefile.os2
index 53e7421..89985e6 100644
--- a/Makefile.os2
+++ b/Makefile.os2
@@ -12,8 +12,8 @@
LIBNAME = SDL2
MAJOR_VERSION = 2
-MINOR_VERSION = 0
-MICRO_VERSION = 23
+MINOR_VERSION = 23
+MICRO_VERSION = 0
VERSION = $(MAJOR_VERSION).$(MINOR_VERSION).$(MICRO_VERSION)
DESCRIPTION = Simple DirectMedia Layer 2
diff --git a/WhatsNew.txt b/WhatsNew.txt
index 727ccc6..401b0a7 100644
--- a/WhatsNew.txt
+++ b/WhatsNew.txt
@@ -2,10 +2,22 @@
This is a list of major changes in SDL's version history.
---------------------------------------------------------------------------
-2.0.24:
+2.24.0:
---------------------------------------------------------------------------
General:
+* New version numbering scheme, similar to GLib and Flatpak.
+ * An even number in the minor version (second component) indicates
+ a production-ready stable release such as 2.24.0, which would have
+ been 2.0.24 under the old system.
+ * The patchlevel (micro version, third component) indicates a
+ bugfix-only update: for example, 2.24.1 would be a bugfix-only
+ release to fix bugs in 2.24.0, without adding new features.
+ * An odd number in the minor version indicates a prerelease such
+ as 2.23.0. Stable distributions should not use these prereleases.
+ * The patchlevel indicates successive prereleases, for example
+ 2.23.1 and 2.23.2 would be prereleases during development of
+ the SDL 2.24.0 stable release.
* Added SDL_bsearch() to the stdlib routines
* Added functions to get the platform dependent name for a joystick or game controller:
* SDL_JoystickPathForIndex()
diff --git a/Xcode/SDL/Info-Framework.plist b/Xcode/SDL/Info-Framework.plist
index 76626f6..bb7986b 100644
--- a/Xcode/SDL/Info-Framework.plist
+++ b/Xcode/SDL/Info-Framework.plist
@@ -19,10 +19,10 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
- <string>2.0.23</string>
+ <string>2.23.0</string>
<key>CFBundleSignature</key>
<string>SDLX</string>
<key>CFBundleVersion</key>
- <string>2.0.23</string>
+ <string>2.23.0</string>
</dict>
</plist>
diff --git a/build-scripts/winrtbuild.ps1 b/build-scripts/winrtbuild.ps1
index 1e0ac7a..ab83581 100644
--- a/build-scripts/winrtbuild.ps1
+++ b/build-scripts/winrtbuild.ps1
@@ -39,7 +39,7 @@
#
# Base version of SDL, used for packaging purposes
-$SDLVersion = "2.0.23"
+$SDLVersion = "2.23.0"
# Gets the .bat file that sets up an MSBuild environment, given one of
# Visual Studio's, "PlatformToolset"s.
diff --git a/configure.ac b/configure.ac
index bddb621..27c9316 100644
--- a/configure.ac
+++ b/configure.ac
@@ -12,8 +12,8 @@ orig_CFLAGS="$CFLAGS"
dnl Set various version strings - taken gratefully from the GTk sources
# See docs/release_checklist.md
SDL_MAJOR_VERSION=2
-SDL_MINOR_VERSION=0
-SDL_MICRO_VERSION=23
+SDL_MINOR_VERSION=23
+SDL_MICRO_VERSION=0
SDL_INTERFACE_AGE=0
SDL_BINARY_AGE=23
SDL_VERSION=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION.$SDL_MICRO_VERSION
@@ -29,8 +29,11 @@ AC_SUBST(SDL_VERSION)
LT_INIT([win32-dll])
LT_LANG([Windows Resource])
-LT_RELEASE=$SDL_MAJOR_VERSION.$SDL_MINOR_VERSION
-LT_CURRENT=`expr $SDL_MICRO_VERSION - $SDL_INTERFACE_AGE`
+# For historical reasons, the library name redundantly includes the major
+# version twice: libSDL2-2.0.so.0.
+# TODO: in SDL 3, stop using -release, which will simplify it to libSDL3.so.0
+LT_RELEASE=2.0
+LT_CURRENT=`expr $SDL_MINOR_VERSION - $SDL_INTERFACE_AGE`
LT_REVISION=$SDL_INTERFACE_AGE
LT_AGE=`expr $SDL_BINARY_AGE - $SDL_INTERFACE_AGE`
m4_pattern_allow([^LT_])
diff --git a/docs/release_checklist.md b/docs/release_checklist.md
index 4fec36d..2d4c5f9 100644
--- a/docs/release_checklist.md
+++ b/docs/release_checklist.md
@@ -1,8 +1,10 @@
# Release checklist
+## New feature release
+
* Update `WhatsNew.txt`
-* Bump version number to 2.0.EVEN for stable release
+* Bump version number to 2.EVEN.0 in all these locations:
* `configure.ac`, `CMakeLists.txt`: `SDL_*_VERSION`
* `Xcode/SDL/Info-Framework.plist`: `CFBundleShortVersionString`,
@@ -16,16 +18,14 @@
* Bump ABI version information
* `configure.ac`: `CMakeLists.txt`: `SDL_INTERFACE_AGE`, `SDL_BINARY_AGE`
- * `SDL_INTERFACE_AGE += 1`
* `SDL_BINARY_AGE += 1`
- * if any functions have been added, set `SDL_INTERFACE_AGE` to 0
+ * set `SDL_INTERFACE_AGE` to 0
* if backwards compatibility has been broken,
set both `SDL_BINARY_AGE` and `SDL_INTERFACE_AGE` to 0
* `Xcode/SDL/SDL.xcodeproj/project.pbxproj`: `DYLIB_CURRENT_VERSION`,
`DYLIB_COMPATIBILITY_VERSION`
- * increment second number in `DYLIB_CURRENT_VERSION`
- * if any functions have been added, increment first number in
- `DYLIB_CURRENT_VERSION` and set second number to 0
+ * increment first number in `DYLIB_CURRENT_VERSION`
+ * set second number in `DYLIB_CURRENT_VERSION` to 0
* if backwards compatibility has been broken,
increase `DYLIB_COMPATIBILITY_VERSION` (?)
@@ -33,11 +33,53 @@
* Do the release
-* Bump version number to 2.0.ODD for next development version
+## New bugfix release
+
+* Check that no new API/ABI was added
+
+ * If it was, do a new feature release (see above) instead
+
+* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is even)
+
+ * Same places as listed above
+
+* Bump ABI version information
+
+ * `configure.ac`: `CMakeLists.txt`: `SDL_INTERFACE_AGE`, `SDL_BINARY_AGE`
+ * `SDL_INTERFACE_AGE += 1`
+ * `SDL_BINARY_AGE += 1`
+ * `Xcode/SDL/SDL.xcodeproj/project.pbxproj`: `DYLIB_CURRENT_VERSION`,
+ `DYLIB_COMPATIBILITY_VERSION`
+ * increment second number in `DYLIB_CURRENT_VERSION`
+
+* Regenerate `configure`
+
+* Do the release
+
+## After a feature release
+
+* Create a branch like `release-2.24.x`
+
+* Bump version number to 2.ODD.0 for next development branch
+
+ * Same places as listed above
+
+* Bump ABI version information
+
+ * Same places as listed above
+ * Assume that the next feature release will contain new API/ABI
+
+## New development prerelease
+
+* Bump version number from 2.Y.Z to 2.Y.(Z+1) (Y is odd)
* Same places as listed above
* Bump ABI version information
* Same places as listed above
- * initially assume that there is no new ABI
+ * Assume that the next feature release will contain new API/ABI
+
+* Regenerate `configure`
+
+* Do the release
diff --git a/include/SDL_version.h b/include/SDL_version.h
index c42b93b..302e462 100644
--- a/include/SDL_version.h
+++ b/include/SDL_version.h
@@ -58,8 +58,8 @@ typedef struct SDL_version
/* Printable format: "%d.%d.%d", MAJOR, MINOR, PATCHLEVEL
*/
#define SDL_MAJOR_VERSION 2
-#define SDL_MINOR_VERSION 0
-#define SDL_PATCHLEVEL 23
+#define SDL_MINOR_VERSION 23
+#define SDL_PATCHLEVEL 0
/**
* Macro to determine SDL version program was compiled against.
diff --git a/src/main/windows/version.rc b/src/main/windows/version.rc
index 25cd68a..66ab620 100644
--- a/src/main/windows/version.rc
+++ b/src/main/windows/version.rc
@@ -9,8 +9,8 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 2,0,23,0
- PRODUCTVERSION 2,0,23,0
+ FILEVERSION 2,23,0,0
+ PRODUCTVERSION 2,23,0,0
FILEFLAGSMASK 0x3fL
FILEFLAGS 0x0L
FILEOS 0x40004L
@@ -23,12 +23,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "\0"
VALUE "FileDescription", "SDL\0"
- VALUE "FileVersion", "2, 0, 23, 0\0"
+ VALUE "FileVersion", "2, 23, 0, 0\0"
VALUE "InternalName", "SDL\0"
VALUE "LegalCopyright", "Copyright (C) 2022 Sam Lantinga\0"
VALUE "OriginalFilename", "SDL2.dll\0"
VALUE "ProductName", "Simple DirectMedia Layer\0"
- VALUE "ProductVersion", "2, 0, 23, 0\0"
+ VALUE "ProductVersion", "2, 23, 0, 0\0"
END
END
BLOCK "VarFileInfo"