* scons changes for mac osx intel / precompiled python 3.1
Feedback (especially on < 10.5) would be most appreciated!
This commit is contained in:
@@ -10,8 +10,6 @@ import commands
|
||||
# IMPORTANT NOTE : OFFICIAL BUILDS SHOULD BE DONE WITH SDKs
|
||||
USE_SDK=True
|
||||
|
||||
BF_PYTHON_VERSION = '2.3'
|
||||
|
||||
cmd = 'uname -p'
|
||||
MAC_PROC=commands.getoutput(cmd)
|
||||
cmd = 'uname -r'
|
||||
@@ -32,9 +30,12 @@ LIBDIR = '${LCGDIR}'
|
||||
if MAC_PROC== 'powerpc' and BF_PYTHON_VERSION == '2.3':
|
||||
MAC_MIN_VERS = '10.3'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.3.9.sdk'
|
||||
else:
|
||||
elif MAC_CUR_VER=='10.4':
|
||||
MAC_MIN_VERS = '10.4'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.4u.sdk'
|
||||
else:
|
||||
MAC_MIN_VERS = '10.5'
|
||||
MACOSX_SDK='/Developer/SDKs/MacOSX10.5.sdk'
|
||||
|
||||
|
||||
# enable ffmpeg support
|
||||
@@ -46,23 +47,34 @@ if USE_SDK==True:
|
||||
#BF_FFMPEG_LIBPATH='${BF_FFMPEG}/lib'
|
||||
#BF_FFMPEG_LIB = 'avformat.a avcodec.a avutil.a'
|
||||
|
||||
# python.org libs install in /library we want to use that for 2.5
|
||||
#
|
||||
# if you want py2.5 on leopard without installing
|
||||
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
# BEWARE: in that case it will work only on leopard
|
||||
BF_PYTHON_VERSION = '3.1'
|
||||
|
||||
if BF_PYTHON_VERSION=='2.3':
|
||||
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
|
||||
if BF_PYTHON_VERSION=='3.1':
|
||||
# python 3.1 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:
|
||||
BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
# python 2.5 etc. uses built-in framework
|
||||
|
||||
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}'
|
||||
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'
|
||||
BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
|
||||
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
|
||||
# python.org libs install in /library we want to use that for 2.5
|
||||
#
|
||||
# if you want py2.5 on leopard without installing
|
||||
# change value to BF_PYTHON = '/Library/Frameworks/Python.framework/Versions/'
|
||||
# BEWARE: in that case it will work only on leopard
|
||||
|
||||
BF_PYTHON = '/System/Library/Frameworks/Python.framework/Versions/'
|
||||
|
||||
BF_PYTHON_INC = '${BF_PYTHON}${BF_PYTHON_VERSION}/include/python${BF_PYTHON_VERSION}'
|
||||
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'
|
||||
BF_PYTHON_LINKFLAGS = '-u _PyMac_Error -framework System -framework Python'
|
||||
if MAC_CUR_VER=='10.3' or MAC_CUR_VER=='10.4':
|
||||
BF_PYTHON_LINKFLAGS ='-u __dummy '+BF_PYTHON_LINKFLAGS
|
||||
|
||||
BF_QUIET = '1'
|
||||
|
||||
@@ -323,6 +323,7 @@ def AppIt(target=None, source=None, env=None):
|
||||
|
||||
a = '%s' % (target[0])
|
||||
builddir, b = os.path.split(a)
|
||||
libdir = env['LCGDIR'][1:]
|
||||
|
||||
bldroot = env.Dir('.').abspath
|
||||
binary = env['BINARYKIND']
|
||||
@@ -355,6 +356,10 @@ def AppIt(target=None, source=None, env=None):
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp %s/bin/.blender/.Blanguages %s/%s.app/Contents/Resources/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'mkdir %s/%s.app/Contents/MacOS/.blender/python/'%(builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'unzip -q %s/release/python.zip -d %s/%s.app/Contents/MacOS/.blender/python/'%(libdir,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary)
|
||||
commands.getoutput(cmd)
|
||||
cmd = 'cp -R %s/release/ui %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary)
|
||||
|
||||
Reference in New Issue
Block a user