forked from bartvdbraak/blender
Fix various Blender 3.0 versioning issues
This changes the following items: - package name is now `blender-3.0.0-git.09eb04c0a865-windows64` rather than `blender-3.00.0-git.09eb04c0a865-windows64` - Fix version resource for blender.exe not building - Data directories are now `3.0\...` rather than `3.00\....` - User prefs are now in: `c:\Users\users\AppData\Roaming\Blender Foundation\Blender\3.0\` rather than: `c:\Users\users\AppData\Roaming\Blender Foundation\Blender\3.00\` - Updating startup & preferences from previous release has a special exception for 3.0 to check for 3.93 and older. See T87532 Ref D10986
This commit is contained in:
parent
ec241eb0d0
commit
62bff15377
@ -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]
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
)
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user