[Bf-committers] SConstruct OS X patch
Michael Velikanje
bf-committers@blender.org
Tue, 23 Mar 2004 18:02:34 -0900
This patch adds more information to -DBUILD_PLATFORM=, from this
'-DBUILD_PLATFORM='"darwin"' to this
-DBUILD_PLATFORM='"Darwin-7.3.0-powerpc"'' . For those that are using
USE_BUILDINFO = 'true' on OS X and want more info.
Index: SConstruct
===================================================================
RCS file: /cvsroot/bf-blender/blender/SConstruct,v
retrieving revision 1.34
diff -u -r1.34 SConstruct
--- SConstruct 22 Mar 2004 22:01:20 -0000 1.34
+++ SConstruct 24 Mar 2004 02:47:35 -0000
@@ -963,10 +963,22 @@
dy_blender.Append (CPPDEFINES = ['NAN_BUILDINFO',
'BUILD_DATE'])
else:
dy_blender.Append (CPPDEFINES =
['BUILD_TIME=\'"%s"\''%(build_time),
-
'BUILD_DATE=\'"%s"\''%(build_date),
- 'BUILD_TYPE=\'"dynamic"\'',
- 'NAN_BUILDINFO',
-
'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
+
'BUILD_DATE=\'"%s"\''%(build_date),
+
'BUILD_TYPE=\'"dynamic"\'',
+ 'NAN_BUILDINFO'])
+ if sys.platform =='darwin': # Adds the system build info,
os type, version no, and processor type
+ f = os.popen('uname -s -r -p')
+ a = f.readline()
+ f.close()
+ b = a.split()
+ osys = b[0]
+ version_no = b[1]
+ processor = b[2]
+ platform = osys + "-" + version_no + "-" + processor
+ dy_blender.Append(CPPDEFINES = [
'BUILD_PLATFORM=\'"%s"\''%platform ])
+ else:
+ dy_blender.Append(CPPDEFINES = [
'BUILD_PLATFORM=\'"%s"\''%(sys.platform)])
+
d_obj = [dy_blender.Object
(root_build_dir+'source/creator/d_buildinfo',
[root_build_dir+'source/creator/buildinfo.c'])]
if sys.platform == 'win32':
Why? Just because.
Michael Velikanje