From c6667c53e3134f06ce208094e67fb0081ef8d3e7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 15 Nov 2007 12:16:03 +0000 Subject: put the revision number in the splash screen (scons and make) --- tools/Blender.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools') diff --git a/tools/Blender.py b/tools/Blender.py index a3452f4d593..58f5ea7b661 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -191,12 +191,15 @@ def buildinfo(lenv, build_type): """ build_date = time.strftime ("%Y-%m-%d") build_time = time.strftime ("%H:%M:%S") + build_rev = os.popen('svnversion').read()[:-1] # remove \n + obj = [] if lenv['BF_BUILDINFO']==1: #user_options_dict['USE_BUILDINFO'] == 1: if sys.platform=='win32': build_info_file = open("source/creator/winbuildinfo.h", 'w') build_info_file.write("char *build_date=\"%s\";\n"%build_date) build_info_file.write("char *build_time=\"%s\";\n"%build_time) + build_info_file.write("char *build_rev=\"%s\";\n"%build_rev) build_info_file.write("char *build_platform=\"win32\";\n") build_info_file.write("char *build_type=\"dynamic\";\n") build_info_file.close() @@ -205,6 +208,7 @@ def buildinfo(lenv, build_type): lenv.Append (CPPDEFINES = ['BUILD_TIME=\'"%s"\''%(build_time), 'BUILD_DATE=\'"%s"\''%(build_date), 'BUILD_TYPE=\'"dynamic"\'', + 'BUILD_REV=\'"%s"\''%(build_rev), 'NAN_BUILDINFO', 'BUILD_PLATFORM=\'"%s"\''%(sys.platform)]) obj = [lenv.Object (root_build_dir+'source/creator/%s_buildinfo'%build_type, -- cgit v1.2.3