Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Verwiebe <info@jensverwiebe.de>2011-08-31 18:15:14 +0400
committerJens Verwiebe <info@jensverwiebe.de>2011-08-31 18:15:14 +0400
commit5e8d1919308fc93e55fe9bf0d0c86125692dfcb9 (patch)
treed300842c3525e5478a4e968c58fe8ab04760a250 /build_files
parentfde215025eff7f3581435bfdb90fb9d354538d07 (diff)
OSX/scons: fix compile with static python, my patch was a bit outdates, sorry
Diffstat (limited to 'build_files')
-rw-r--r--build_files/scons/config/darwin-config.py8
-rw-r--r--build_files/scons/tools/Blender.py11
-rw-r--r--build_files/scons/tools/btools.py3
3 files changed, 10 insertions, 12 deletions
diff --git a/build_files/scons/config/darwin-config.py b/build_files/scons/config/darwin-config.py
index c09f326bedf..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'
@@ -105,9 +105,9 @@ BF_FFMPEG_LIB = 'avcodec avdevice avformat avutil mp3lame swscale x264 xvidcore
#bz2 is a standard osx dynlib
BF_PYTHON_VERSION = '3.2'
-WITH_BF_STATICPYTHON ='True'
+WITH_OSX_STATICPYTHON = True
-if BF_PYTHON_VERSION=='3.2' and WITH_BF_STATICPYTHON =='True':
+if WITH_OSX_STATICPYTHON:
# python 3.2 uses precompiled libraries in bf svn /lib by default
BF_PYTHON = LIBDIR + '/python'
@@ -327,7 +327,7 @@ if WITH_BF_QUICKTIME:
else:
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
-if WITH_BF_STATICPYTHON == 'False':
+if not WITH_OSX_STATICPYTHON:
PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','Python']
diff --git a/build_files/scons/tools/Blender.py b/build_files/scons/tools/Blender.py
index 50486dab591..c537e435de8 100644
--- a/build_files/scons/tools/Blender.py
+++ b/build_files/scons/tools/Blender.py
@@ -536,7 +536,7 @@ 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
- if env['WITH_BF_STATICPYTHON'] == 'True':
+ 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")
@@ -572,15 +572,12 @@ 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)
- if env['WITH_BF_STATICPYTHON'] == 'True':
- cmd = 'mkdir %s/%s.app/Contents/MacOS/%s/python/'%(builddir,binary, VERSION)
+ 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,builddir,binary,VERSION)
+ cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/%s/python/'%(libdir,python_zip,installdir,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)
-
if binary == 'blender':#not copy everything for blenderplayer
cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/%s/'%(bldroot,installdir,binary,VERSION)
commands.getoutput(cmd)
diff --git a/build_files/scons/tools/btools.py b/build_files/scons/tools/btools.py
index d222c0bcc18..8bb8d17954e 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', False)),
('BF_PYTHON_ABI_FLAGS', 'Python ABI flags (suffix in library version: m, mu, etc)', ''),
(BoolVariable('BF_NO_ELBEEM', 'Disable Fluid Sim', False)),