diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2009-10-27 16:40:41 +0300 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2009-10-27 16:40:41 +0300 |
commit | b8a7f844ca2bf07a70b4e33ca6b28bb7312df11d (patch) | |
tree | b832df93007e65df862fb16a0626ccbdd4cca0f1 /tools/Blender.py | |
parent | 54facb5cfe2134d17790a1c24f910bbaaab4e272 (diff) |
Mac:
Fixed gcc-4.0 compile error (cocoa)
Updated scons to build cocoa (32bit & 64bit) (Thx Jens Verwiebe for the patch):
- make sure right python is unzipped to app-bundle ( printing information at the end of compiling )
- make sure arch-setting appends needed flags ( depending on OSX-version obsolete sometimes but harmless )
- link correct frameworks depending on gfx-api ( cocoa/carbon)
- conscript prepared for cocoa objC-files
- link to openAL-framework, using the headers from blender-lib + the symbols in framework
Usage instruction:
The default build is Cocoa 32bit.
To change it, copy config/darwin-config.py to user-config.py in the blender folder, and edit:
- WITH_GHOST_COCOA & MACOSX_ARCHITECTURE variables to select cocoa/carbon, and the arch (i386, X86_64, ppc, ..)
- the libs options as usual
Diffstat (limited to 'tools/Blender.py')
-rw-r--r-- | tools/Blender.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/tools/Blender.py b/tools/Blender.py index 5641104ab15..8a2ef93bb26 100644 --- a/tools/Blender.py +++ b/tools/Blender.py @@ -456,7 +456,13 @@ def AppIt(target=None, source=None, env=None): a = '%s' % (target[0]) builddir, b = os.path.split(a) libdir = env['LCGDIR'][1:] - + osxarch = env['MACOSX_ARCHITECTURE'] + print("compiled architecture: %s"%(osxarch)) + if libdir == '../lib/darwin-9.x.universal': + python_zip = 'python_' + osxarch + '.zip' # set specific python_arch.zip + else: + python_zip = 'python.zip' # compatibility for darwin8 python.zip + print("unzipping to app-bundle: %s"%(python_zip)) bldroot = env.Dir('.').abspath binary = env['BINARYKIND'] @@ -477,7 +483,7 @@ def AppIt(target=None, source=None, env=None): cmd = 'cp %s/%s %s/%s.app/Contents/MacOS/%s'%(builddir, binary,builddir, binary, binary) commands.getoutput(cmd) cmd = 'mkdir %s/%s.app/Contents/MacOS/.blender/'%(builddir, binary) - print cmd +# print cmd commands.getoutput(cmd) cmd = builddir + '/%s.app/Contents/MacOS/.blender'%binary shutil.copy(bldroot + '/bin/.blender/.bfont.ttf', cmd) @@ -490,7 +496,7 @@ def AppIt(target=None, source=None, env=None): 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) + cmd = 'unzip -q %s/release/%s -d %s/%s.app/Contents/MacOS/.blender/python/'%(libdir,python_zip,builddir,binary) commands.getoutput(cmd) cmd = 'cp -R %s/release/scripts %s/%s.app/Contents/MacOS/.blender/'%(bldroot,builddir,binary) commands.getoutput(cmd) @@ -504,6 +510,8 @@ def AppIt(target=None, source=None, env=None): commands.getoutput(cmd) cmd = 'find %s/%s.app -name .DS_Store -exec rm -rf {} \;'%(builddir, binary) commands.getoutput(cmd) + cmd = 'find %s/%s.app -name __MACOSX -exec rm -rf {} \;'%(builddir, binary) + commands.getoutput(cmd) # extract copy system python, be sure to update other build systems # when making changes to the files that are copied. |