[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39813] trunk/blender/build_files/scons: OSX: additionally choice to link against python-framework again
jens verwiebe
info at jensverwiebe.de
Wed Aug 31 01:52:12 CEST 2011
Revision: 39813
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39813
Author: jensverwiebe
Date: 2011-08-30 23:52:12 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
OSX: additionally choice to link against python-framework again
Modified Paths:
--------------
trunk/blender/build_files/scons/config/darwin-config.py
trunk/blender/build_files/scons/tools/Blender.py
Modified: trunk/blender/build_files/scons/config/darwin-config.py
===================================================================
--- trunk/blender/build_files/scons/config/darwin-config.py 2011-08-30 23:37:46 UTC (rev 39812)
+++ trunk/blender/build_files/scons/config/darwin-config.py 2011-08-30 23:52:12 UTC (rev 39813)
@@ -104,15 +104,27 @@
BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore theora theoradec theoraenc vorbis vorbisenc vorbisfile ogg bz2'
#bz2 is a standard osx dynlib
-# python 3.1 uses precompiled libraries in bf svn /lib by default
BF_PYTHON_VERSION = '3.2'
-BF_PYTHON = LIBDIR + '/python'
-BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
-# BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
-BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
-# BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
+WITH_BF_STATICPYTHON ='True'
+
+if BF_PYTHON_VERSION=='3.2' and WITH_BF_STATICPYTHON =='True':
+ # python 3.2 uses precompiled libraries in bf svn /lib by default
+
+ BF_PYTHON = LIBDIR + '/python'
+ BF_PYTHON_INC = '${BF_PYTHON}/include/python${BF_PYTHON_VERSION}'
+ # BF_PYTHON_BINARY = '${BF_PYTHON}/bin/python${BF_PYTHON_VERSION}'
+ BF_PYTHON_LIB = 'python${BF_PYTHON_VERSION}'
+ BF_PYTHON_LIBPATH = '${BF_PYTHON}/lib/python${BF_PYTHON_VERSION}'
+ # BF_PYTHON_LINKFLAGS = ['-u', '_PyMac_Error', '-framework', 'System']
+else:
+ # python 3.2 uses Python-framework additionally installed in /Library/Frameworks
+ BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
+ BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}m'
+ BF_PYTHON_BINARY = '${BF_PYTHON}${BF_PYTHON_VERSION}/bin/python${BF_PYTHON_VERSION}'
+ #BF_PYTHON_LIB = ''
+ BF_PYTHON_LIBPATH = '${BF_PYTHON}${BF_PYTHON_VERSION}/lib/python${BF_PYTHON_VERSION}/config-3.2m'
+
WITH_BF_OPENAL = True
#different lib must be used following version of gcc
# for gcc 3.3
@@ -315,6 +327,10 @@
else:
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
+if WITH_BF_STATICPYTHON == 'False':
+ PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','Python']
+
+
#note to build succesfully on 10.3.9 SDK you need to patch 10.3.9 by adding the SystemStubs.a lib from 10.4
#for 10.7.sdk, SystemStubs needs to be excluded (lib doesn't exist anymore)
if MACOSX_DEPLOYMENT_TARGET == '10.7':
Modified: trunk/blender/build_files/scons/tools/Blender.py
===================================================================
--- trunk/blender/build_files/scons/tools/Blender.py 2011-08-30 23:37:46 UTC (rev 39812)
+++ trunk/blender/build_files/scons/tools/Blender.py 2011-08-30 23:52:12 UTC (rev 39813)
@@ -536,7 +536,10 @@
print("Installing to %s"%(installdir))
# TODO, use tar.
python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip
- print("unzipping to app-bundle: %s"%(python_zip))
+ if env['WITH_BF_STATICPYTHON'] == 'True':
+ print("unzipping to app-bundle: %s"%(python_zip))
+ else:
+ print("dynamic build - make sure to have python3.x-framework installed")
bldroot = env.Dir('.').abspath
binary = env['BINARYKIND']
@@ -569,10 +572,14 @@
commands.getoutput(cmd)
cmd = 'cp %s/release/bin/%s/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,VERSION,installdir,binary)
commands.getoutput(cmd)
- cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(installdir,binary, VERSION)
+ if env['WITH_BF_STATICPYTHON'] == 'True':
+ cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(builddir,binary, VERSION)
+ commands.getoutput(cmd)
+ cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,builddir,binary,VERSION)
+ commands.getoutput(cmd)
+
+ cmd = 'cp -R -L %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
- cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,binary,VERSION)
- commands.getoutput(cmd)
if binary == 'blender':#not copy everything for blenderplayer
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
More information about the Bf-blender-cvs
mailing list