diff options
-rw-r--r-- | build_files/buildbot/buildbot_utils.py | 4 | ||||
-rw-r--r-- | build_files/cmake/macros.cmake | 4 | ||||
-rw-r--r-- | release/scripts/startup/bl_operators/userpref.py | 9 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/appdir.c | 2 | ||||
-rw-r--r-- | source/creator/CMakeLists.txt | 9 | ||||
-rw-r--r-- | source/creator/creator_intern.h | 2 |
6 files changed, 16 insertions, 14 deletions
diff --git a/build_files/buildbot/buildbot_utils.py b/build_files/buildbot/buildbot_utils.py index 057c2155fb6..7e9858d9268 100644 --- a/build_files/buildbot/buildbot_utils.py +++ b/build_files/buildbot/buildbot_utils.py @@ -85,8 +85,8 @@ class VersionInfo: version_number = int(self._parse_header_file(blender_h, 'BLENDER_VERSION')) version_number_patch = int(self._parse_header_file(blender_h, 'BLENDER_VERSION_PATCH')) version_numbers = (version_number // 100, version_number % 100, version_number_patch) - self.short_version = "%d.%02d" % (version_numbers[0], version_numbers[1]) - self.version = "%d.%02d.%d" % version_numbers + self.short_version = "%d.%d" % (version_numbers[0], version_numbers[1]) + self.version = "%d.%d.%d" % version_numbers self.version_cycle = self._parse_header_file(blender_h, 'BLENDER_VERSION_CYCLE') self.hash = self._parse_header_file(buildinfo_h, 'BUILD_HASH')[1:-1] diff --git a/build_files/cmake/macros.cmake b/build_files/cmake/macros.cmake index 91881441c95..813ac013cdf 100644 --- a/build_files/cmake/macros.cmake +++ b/build_files/cmake/macros.cmake @@ -923,10 +923,6 @@ function(get_blender_version) math(EXPR _out_version_major "${_out_version} / 100") math(EXPR _out_version_minor "${_out_version} % 100") - # Zero pad the minor version so `_out_version_minor` is always two characters. - # This is needed if the minor version is a single digit. - string(REGEX REPLACE "^([0-9])$" "0\\1" _out_version_minor "${_out_version_minor}") - # output vars set(BLENDER_VERSION "${_out_version_major}.${_out_version_minor}" PARENT_SCOPE) set(BLENDER_VERSION_MAJOR "${_out_version_major}" PARENT_SCOPE) diff --git a/release/scripts/startup/bl_operators/userpref.py b/release/scripts/startup/bl_operators/userpref.py index 7547184dc04..f77f00d2234 100644 --- a/release/scripts/startup/bl_operators/userpref.py +++ b/release/scripts/startup/bl_operators/userpref.py @@ -99,6 +99,15 @@ class PREFERENCES_OT_copy_prev(Operator): version = bpy.app.version version_new = ((version[0] * 100) + version[1]) version_old = ((version[0] * 100) + version[1]) - 1 + + # Special case, remove when the version is > 3.0. + if version_new == 300: + version_new = 294 + version_old = 293 + else: + print("TODO: remove exception!") + # End special case. + # Ensure we only try to copy files from a point release. # The check below ensures the second numbers match. while (version_new % 100) // 10 == (version_old % 100) // 10: diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c index 1075a46e72b..bcfd34ab42f 100644 --- a/source/blender/blenkernel/intern/appdir.c +++ b/source/blender/blenkernel/intern/appdir.c @@ -137,7 +137,7 @@ static char *blender_version_decimal(const int version) { static char version_str[5]; BLI_assert(version < 1000); - BLI_snprintf(version_str, sizeof(version_str), "%d.%02d", version / 100, version % 100); + BLI_snprintf(version_str, sizeof(version_str), "%d.%d", version / 100, version % 100); return version_str; } diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index cb5fc538e69..f1741c3b495 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -130,14 +130,11 @@ set(SRC # MSVC 2010 gives linking errors with the manifest if(WIN32 AND NOT UNIX) - string(SUBSTRING ${BLENDER_VERSION} 0 1 bver1) - string(SUBSTRING ${BLENDER_VERSION} 2 1 bver2) - string(SUBSTRING ${BLENDER_VERSION} 3 1 bver3) add_definitions( -DBLEN_VER_RC_STR="${BLENDER_VERSION}" - -DBLEN_VER_RC_1=${bver1} - -DBLEN_VER_RC_2=${bver2} - -DBLEN_VER_RC_3=${bver3} + -DBLEN_VER_RC_1=${BLENDER_VERSION_MAJOR} + -DBLEN_VER_RC_2=${BLENDER_VERSION_MINOR} + -DBLEN_VER_RC_3=${BLENDER_VERSION_PATCH} -DBLEN_VER_RC_4=0 ) diff --git a/source/creator/creator_intern.h b/source/creator/creator_intern.h index bcc8a15355a..2260da8db11 100644 --- a/source/creator/creator_intern.h +++ b/source/creator/creator_intern.h @@ -72,7 +72,7 @@ enum { /* for the callbacks: */ #ifndef WITH_PYTHON_MODULE -# define BLEND_VERSION_FMT "Blender %d.%02d.%d" +# define BLEND_VERSION_FMT "Blender %d.%d.%d" # define BLEND_VERSION_ARG (BLENDER_VERSION / 100), (BLENDER_VERSION % 100), BLENDER_VERSION_PATCH #endif |