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