Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-09-18 14:37:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-09-18 14:37:51 +0400
commit6963574a55152bcd475f86439e0453350da8e728 (patch)
treee803f11d995ff572743000ba94d6d793578c3790 /build_files/scons
parent90b57077ccdc959b89ed1507cc067e89b53cc6fc (diff)
scons now gets the blender version from BKE_blender.h.
Diffstat (limited to 'build_files/scons')
-rw-r--r--build_files/scons/tools/btools.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index 5c4a4c527d5..563b3d42f5c 100644
--- a/build_files/scons/tools/btools.py
+++ b/build_files/scons/tools/btools.py
@@ -15,7 +15,15 @@ import sys
Variables = SCons.Variables
BoolVariable = SCons.Variables.BoolVariable
-VERSION = '2.54' # This is used in creating the local config directories
+def get_version():
+ fname = os.path.join(os.path.dirname(__file__), "..", "..", "..", "source", "blender", "blenkernel", "BKE_blender.h")
+ for l in open(fname, "r"):
+ if "BLENDER_VERSION" in l:
+ ver = int(l.split()[-1])
+ return "%d.%d" % (ver / 100, ver % 100)
+ raise Exception("%s: missing version string" % fname)
+
+VERSION = get_version() # This is used in creating the local config directories
def print_arguments(args, bc):
if len(args):