diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-09-13 11:19:36 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-09-13 11:19:36 +0400 |
commit | 9c4165fde0ba8c8d05b49240dab8abdf2d187861 (patch) | |
tree | cfdcc3a869884c74b126496205632c89a315483b /build_files | |
parent | b310a76a1b8964fd776620f8444c1c1a7a308a8e (diff) | |
parent | 70e3541f3a4327db0fd3fd4070091ddfda313cfe (diff) |
svn merge -r39800:39900 https://svn.blender.org/svnroot/bf-blender/trunk/blender
Diffstat (limited to 'build_files')
-rw-r--r-- | build_files/scons/config/darwin-config.py | 32 | ||||
-rw-r--r-- | build_files/scons/config/win32-vc-config.py | 2 | ||||
-rw-r--r-- | build_files/scons/tools/Blender.py | 14 | ||||
-rw-r--r-- | build_files/scons/tools/btools.py | 3 |
4 files changed, 36 insertions, 15 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py index 06abaf468dd..102ec73a4e3 100644 --- a/build_files/scons/config/darwin-config.py +++ b/build_files/scons/config/darwin-config.py @@ -14,7 +14,7 @@ USE_SDK=True ################### Cocoa & architecture settings ################## ############################################################################# WITH_GHOST_COCOA=True -MACOSX_ARCHITECTURE = 'i386' # valid archs: ppc, i386, ppc64, x86_64 +MACOSX_ARCHITECTURE = 'x86_64' # valid archs: ppc, i386, ppc64, x86_64 cmd = 'uname -p' @@ -104,14 +104,26 @@ BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib' 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_OSX_STATICPYTHON = True + +if WITH_OSX_STATICPYTHON: + # 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 @@ -315,6 +327,10 @@ if WITH_BF_QUICKTIME: else: PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime'] +if not WITH_OSX_STATICPYTHON: + 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': diff --git a/build_files/scons/config/win32-vc-config.py b/build_files/scons/config/win32-vc-config.py index 2f8fa297667..2950ca9380f 100644 --- a/build_files/scons/config/win32-vc-config.py +++ b/build_files/scons/config/win32-vc-config.py @@ -40,7 +40,7 @@ BF_JACK_INC = '${BF_JACK}/include ${BF_FFMPEG}/include/msvc' BF_JACK_LIB = 'libjack' BF_JACK_LIBPATH = '${BF_JACK}/lib' -WITH_BF_SNDFILE = False +WITH_BF_SNDFILE = True BF_SNDFILE = LIBDIR + '/sndfile' BF_SNDFILE_INC = '${BF_SNDFILE}/include' BF_SNDFILE_LIB = 'libsndfile-1' diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py index 94d09732be7..c537e435de8 100644 --- a/build_files/scons/tools/Blender.py +++ b/build_files/scons/tools/Blender.py @@ -536,7 +536,10 @@ def AppIt(target=None, source=None, env=None): 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_OSX_STATICPYTHON']: + 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,11 @@ def AppIt(target=None, source=None, env=None): 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) - 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 env['WITH_OSX_STATICPYTHON']: + cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(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) diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py index d222c0bcc18..be059241727 100644 --- a/build_files/scons/tools/btools.py +++ b/build_files/scons/tools/btools.py @@ -78,7 +78,7 @@ def print_arguments(args, bc): def validate_arguments(args, bc): opts_list = [ - 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'WITH_BF_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS', + 'WITH_BF_PYTHON', 'WITH_BF_PYTHON_SAFETY', 'BF_PYTHON', 'BF_PYTHON_VERSION', 'BF_PYTHON_INC', 'BF_PYTHON_BINARY', 'BF_PYTHON_LIB', 'BF_PYTHON_LIBPATH', 'WITH_BF_STATICPYTHON', 'WITH_OSX_STATICPYTHON', 'BF_PYTHON_LIB_STATIC', 'BF_PYTHON_DLL', 'BF_PYTHON_ABI_FLAGS', 'WITH_BF_OPENAL', 'BF_OPENAL', 'BF_OPENAL_INC', 'BF_OPENAL_LIB', 'BF_OPENAL_LIBPATH', 'WITH_BF_STATICOPENAL', 'BF_OPENAL_LIB_STATIC', 'WITH_BF_SDL', 'BF_SDL', 'BF_SDL_INC', 'BF_SDL_LIB', 'BF_SDL_LIBPATH', 'BF_LIBSAMPLERATE', 'BF_LIBSAMPLERATE_INC', 'BF_LIBSAMPLERATE_LIB', 'BF_LIBSAMPLERATE_LIBPATH', 'WITH_BF_STATICLIBSAMPLERATE', 'BF_LIBSAMPLERATE_LIB_STATIC', @@ -230,6 +230,7 @@ def read_opts(env, cfg, args): ('BF_PYTHON_LIBPATH', 'Library path', ''), ('BF_PYTHON_LINKFLAGS', 'Python link flags', ''), (BoolVariable('WITH_BF_STATICPYTHON', 'Staticly link to python', False)), + (BoolVariable('WITH_OSX_STATICPYTHON', 'Staticly link to python', True)), ('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''), (BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)), |